Ticket #28 (closed defect: fixed)

Opened 6 years ago

Last modified 5 years ago

GtkComboBox styling woes

Reported by: mickey@… Owned by: michael@…
Priority: high Milestone:
Component: Theming - Gtk+ Version: unspecified
Severity: normal Keywords:
Cc: buglog@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

I can't seem to get the text color in the GtkComboBox? to be gray.
Also, the GtkComboBox? separator looks odd and it doesn't seem to be a way to
remove it programmatically nor via gtkrc. We might want to patch Gtk+ to remove it?

Change History

comment:1 Changed 6 years ago by ken_zhao@…

I find that the text color in GtkComboBox? has been defined in gtkrc.
style "moko-window-default" {
...

text[NORMAL] = "#666666" # mid grey
text[PRELIGHT] = "#ffffff" # white
text[ACTIVE] = "#e5e5e5" # light grey
text[SELECTED] = "#ffffff" # white
text[INSENSITIVE] = "#223344" # dark grey

...
}
If you want to change the color,please redefine GtkLabel? styling on
GtkComboBox?.

comment:2 Changed 6 years ago by ken_zhao@…

"GtkComboBox? separator",do you mean the wide orange line at the bottom?

comment:3 Changed 6 years ago by thomas@…

The text colour in GtkComboBox? is unfortunately controlled by the base[] and
text[] colours. This is because it is based on GtkCellRenderer? and there is a
bug report about it in GTK+: http://bugzilla.gnome.org/show_bug.cgi?id=382646

As far as I know, the vertical line on the combobox (between the label and the
little arrow) is drawn using a VLINE operation, so you should simply be able to
replace it with a blank image to get rid of it.

comment:4 Changed 6 years ago by thomas@…

This gtkrc snippet seems to do the trick of setting the combobox text color to
white:

style "gtkcombobox"
{

text[NORMAL] = "#fff"

}
widget "*.GtkComboBox?.*" style "gtkcombobox"

comment:5 Changed 6 years ago by thomas@…

I have committed my suggested change to gtkcombobox to fix the text colour.

comment:6 Changed 6 years ago by mickey@…

Thanks Thomas, that worked fine.

Next problem: The text on the Popup-Menu is not light grey as it's supposed to
be -- but black instead. Any idea for that as well?

comment:7 Changed 6 years ago by ken_zhao@…

I have committed some changes on "gtkmenuitem-label" to fix Popup-Menu text
color.

comment:8 Changed 6 years ago by laforge@…

  • Owner changed from ken_zhao@… to mickey@…

has this been fixed now?

comment:9 Changed 6 years ago by alphaone@…

Please check if this is still an issue with our new UI (OM-2007.2) and report
back here.

comment:10 Changed 5 years ago by tick@…

  • Owner changed from mickey@… to michael@…

comment:11 Changed 5 years ago by wolfgang

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.