win32 theme: Fix combobox

https://bugzilla.gnome.org/show_bug.cgi?id=773221
This commit is contained in:
Jaime Velasco Juan 2016-10-14 14:13:09 +01:00 committed by Benjamin Otte
parent 16926308a8
commit d1dafbeaef

View File

@ -1038,72 +1038,68 @@ progressbar.vertical progress.pulse {
/* Combobox */ /* Combobox */
combobox-entry button { combobox entry {
background-color: transparent; margin-right: calc( -2ex - -gtk-win32-part-width(combobox, 6, 1));
border-width: 0; background-image: -gtk-win32-theme-part(combobox, 4, 1));
background-image: -gtk-win32-theme-part(combobox, 1, 1); }
color: rgba(0, 0, 0, 0); combobox entry:hover {
/* Remove padding from comboboxbutton (GtkArrow inside of it is hardcoded to be background-image: -gtk-win32-theme-part(combobox, 4, 2);
16x16, but we draw even smaller arrow instead, so padding is completely unnecessary, }
it only makes thebutton bigger for not good reason). combobox entry:focus {
Only do this for combobox-entry, because non-entry combobox IS thebutton, background-image: -gtk-win32-theme-part(combobox, 4, 3);
and it does need to be as thick as the items of the list it pops up (and it's }
still slimmer than padded combobox-entry!). */ combobox:disabled entry {
padding: 0px; background-image: -gtk-win32-theme-part(combobox, 5, 4);
} }
combobox-entry button:hover, combobox entry, combobox entry:disabled, combobox entry:focus {
combobox-entry button:focus, padding-left: 1ex;
combobox-entry button:hover:focus {
background-image: -gtk-win32-theme-part(combobox, 1, 2);
}
combobox-entry button:active,
combobox-entry button:active:focus,
combobox-entry button:active:hover,
combobox-entry button:active:focus:hover {
background-image: -gtk-win32-theme-part(combobox, 1, 3);
}
combobox-entry button:disabled {
background-image: -gtk-win32-theme-part(combobox, 1, 4);
} }
/* Dropdown list should have "window" color, as listbox contents do (usually it's "white") */ combobox button {
combobox cellview * { padding: 2px;
background-color: -gtk-win32-color(listview, window);
} }
/* Draw "arrow" for non-entry comboboxes. Select the box, since selecting combobox entry + button {
the arrow itself does not seem to work as intended. */ padding: 0;
combobox box { background-image: none;
color: rgba(255, 0, 0, 0); }
combobox button arrow {
background-image: -gtk-win32-theme-part(combobox, 6, 1); background-image: -gtk-win32-theme-part(combobox, 6, 1);
min-height: -gtk-win32-part-height(combobox, 6, 1);
/* this width is too small, so better put some padding */
min-width: -gtk-win32-part-width(combobox, 6, 1);
padding: 0 1ex;
} }
combobox box:disabled { combobox entry + button:hover arrow {
color: rgba(255, 0, 0, 0); background-image: -gtk-win32-theme-part(combobox, 6, 2);
}
combobox entry + button:disabled {
background-image: none;
}
combobox entry + button:disabled arrow {
background-image: -gtk-win32-theme-part(combobox, 6, 4); background-image: -gtk-win32-theme-part(combobox, 6, 4);
} }
/* Make sure the style above does not touch comboboxes with entries by combobox entry + button:checked arrow {
disabling background image for the box again */ background-image: -gtk-win32-theme-part(combobox, 6, 3);
combobox-entry box {
color: rgba(255, 0, 0, 0);
background-image: none;
} }
combobox-entry box:disabled {
color: rgba(255, 0, 0, 0); combobox menu {
background-image: none; /* Dropdown list should have "window" color, as listbox
contents do (usually it's "white") */
background-color: -gtk-win32-color(listview, window);
padding: 2px;
} }
/* The arrow is part of the background image drawn by the theme, don't draw GTK's own arrow */
combobox-entry GtkArrow { combobox menuitem {
color: rgba(255, 0, 0, 0); padding: 0 2px;
} }
combobox-entry GtkArrow:disabled {
color: rgba(255, 0, 0, 0); combobox menuitem > cellview {
} padding: 0px;
combobox arrow {
color: rgba(255, 0, 0, 0);
}
combobox arrow:disabled {
color: rgba(255, 0, 0, 0);
} }
/* Toolbar */ /* Toolbar */