Re: Re: Different text style in menu and button possible?



Ahhhh, alright,

played around with that a little and even found some documentation.
This got me one step further but not quite to where I wanted.

I have:

style "xeno_thin_default" {
    fg[ACTIVE]                  = "#000000"
    bg[NORMAL]                  = "#eaf0f3"             # normal face color ...mod
    bg[PRELIGHT]                = "#c7d0d9"
    fg[PRELIGHT]                = "#000000"
....
}

style "xeno_thin_menuitem" {
    bg[PRELIGHT]        = "#424f63" # when mouse over
    fg[PRELIGHT]        = "#ffffff"
#    fg[NORMAL] = "#ffffff"
    engine "xeno" {
#               thickness = 2
#               out = thin out
    }
}

style "xeno_thin_menu" {
#    bg[PRELIGHT]       = "#424f63" # when mouse over
#    fg[PRELIGHT]       = "#ffffff"
    engine "xeno" {
                thickness = 2
                        out [PRELIGHT] = thin in
    }
}

and then:

class "GtkWidget"                       style "xeno_thin_default"

#class "GtkMenuBar"                     style "xeno_thin_menu"
class "GtkMenu"                         style "xeno_thin_menu"

#class "GtkMenuItem"            style "xeno_thin_menuitem"
#widget "*.GtkMenuItem*"        style "xeno_thin_menuitem"
widget_class "*.GtkMenuItem*"   style "xeno_thin_menuitem"
widget_class "*.GtkCheckMenuItem*"      style "xeno_thin_menuitem"
widget_class "*.GtkImageMenuItem*"      style "xeno_thin_menuitem"
widget_class "*.GtkRadioMenuItemItem*" style "xeno_thin_menuitem"
widget_class "*.GtkSeparatorMenuItem*" style "xeno_thin_menuitem"
widget_class "*.GtkTearoffMenuItem*" style "xeno_thin_menuitem"

I'd like to have:

a) Labels behave different in buttons and in menus
b) have menu-items with a changed bg and fg on prelight
c) the top level menus shouldn't change their color on prelight

Doing

widget_class "*.GtkMenuItem*"   style "xeno_thin_menuitem"

achieves (a)
It does not, however achieve (b) consistently for me, i.e. it works
in a GNOME panel, but not in an application's menu like gedit's.
Or even more correctly, in the panel the (b) works for all menu
items, in gedit it only works for the top-level menu items (like "File"
but I don't want it there, see (c))

?? I thought if I used widget_class I'd be identifying widgets by
their class names again and thus would be independent of how
the individual app calls the widget (as opposed to "widget) ?!?

Can't say I really understand this ... 
Esp. if I do

widget "*.GtkMenuItem*" style "xeno_thin_menuitem"

(b) still works fine for the panel but not entries in the menus in
gedit. However, the behaviour of the top-level menu items in
gedit changes. It will no longer have the white text but will still
use the right prelighted bg.

(Like the menuitem uses the right style, but the child label doesn't
for painting the text?!?)

Then (c):

Tried to assign GtkMenu and GtkMenuBar a different style, without
any effect.

#class "GtkMenuBar"                     style "xeno_thin_menu"
class "GtkMenu"                         style "xeno_thin_menu"

Also tried 
widget_class "*.GtkMenuBar*" style "xeno_thin_menu"

But it will still always show what the MenuItem definitions define.

How is the matching done?
Are the wildcard matches where GtkMenuItem is an explicit part
of the pattern beating the *.GtkMenuBar* stuff or am I on the
wrong track altogether ?

Ah, and if there's any rtfm's, don't hesitate to gimme pointers.

Thanks,

Karl.



Owen Taylor wrote:


class "GtkMenuItem" style "my-menu"


Note the two differences between that and:


widget_class "GtkMenuItem*" style "my-menu-style"



-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]