Re: Different text style in menu and button possible?



Hmm ... thanks for the hint, but that's not quite it,

(Note that I'm talking v. 1.2)

If I do:

style "my-menuitem" {
   fg[PRELIGHT] ="#ffffff"
}

and ...

class "GtkMenuItem" style "my-menu"

a menu that has sub-menus will have white arrows on mouse-over
and otherwise black ones. The text on the menu item will, however,
just stay black because that's the default fg  .... and apparently the
menu uses GtkLabels for drawing the text which in my case inherits
the default fg.

Now, if I do:

style "my-label" {
   fg[PRELIGHT] ="#ffffff"
}

class "GtkLabel" style "my-label"

it'll work OK for the menu, but the buttons also use the GtkLabel and
will have white fg on mouse-over .... which is smth. I don't want.

What I'd be looking for would be a way to have the label inherit A
from the menu container and B from the button .... possible?!?

Karl.


Owen Taylor wrote:

"Karl H. Beckers" <karl h beckers gmx net> writes:

Hello all,

am I right in supposing that you can't have a GTKLabel that's used
in a button behave differently from a Label in a Menu?

Thing is I'm in the process of creating a theme and would like to
have text in a prelighted menuitem white (dark bg) but black in a
button (bright bg).
Can't seem to find a way to do that. Is there one?

style "my-menu-style" {
 fg[PRELIGHT] = "#ffffff"
}

widget_class "GtkMenuItem*" style "my-menu-style"
widget_class "GtkCheckMenuItem*" style "my-menu-style"
widget_class "GtkImageMenuItem*" style "my-menu-style"
widget_class "GtkRadioMenuItemItem*" style "my-menu-style"
widget_class "GtkSeparatorMenuItem*" style "my-menu-style"
widget_class "GtkTearoffMenuItem*" style "my-menu-style"

(Yes, it's really ugly that you have to list all the different
subclasses of menu item here.)
Regards,
                                       Owen








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