W32: Fix double-arrowed combobox button

The arrow is part of the background image drawn by the theme, don't draw
GTK's own arrow. This also applies to non-entry comboboxes.

On XP the arrow-and-nothing-else part does not exist (W32 XP theme draws a
white rectangle) and has to be subtituted for a simple dropdown button even
for non-entry comboboxes.

https://bugzilla.gnome.org/show_bug.cgi?id=727035
This commit is contained in:
Руслан Ижбулатов 2014-03-25 17:25:47 +00:00
parent ce9437daf5
commit 2b36054a5d
2 changed files with 45 additions and 0 deletions

View File

@ -744,6 +744,41 @@ GtkComboBox .separator {
-GtkWidget-vertical-separator: 0;
}
/* Draw "arrow" for non-entry comboboxes. Select the box, since selecting
the arrow itself does not seem to work as intended. */
GtkComboBox GtkBox {
color: rgba(255, 0, 0, 0);
background-image: -gtk-win32-theme-part(combobox, 6 1);
}
GtkComboBox GtkBox:insensitive {
color: rgba(255, 0, 0, 0);
background-image: -gtk-win32-theme-part(combobox, 6 4);
}
/* Make sure the style above does not touch comboboxes with entries by
disabling background image for the box again */
GtkComboBox.combobox-entry GtkBox {
color: rgba(255, 0, 0, 0);
background-image: none;
}
GtkComboBox.combobox-entry GtkBox:insensitive {
color: rgba(255, 0, 0, 0);
background-image: none;
}
/* The arrow is part of the background image drawn by the theme, don't draw GTK's own arrow */
GtkComboBox.combobox-entry GtkArrow {
color: rgba(255, 0, 0, 0);
}
GtkComboBox.combobox-entry GtkArrow:insensitive {
color: rgba(255, 0, 0, 0);
}
GtkComboBox GtkArrow {
color: rgba(255, 0, 0, 0);
}
GtkComboBox GtkArrow:insensitive {
color: rgba(255, 0, 0, 0);
}
/* Notebook */
.notebook {

View File

@ -1,5 +1,15 @@
@import url("gtk-win32-base.css");
/* Override non-entry combobox arrow parts from the base theme,
since XP draws an empty white rectangle for parts 6 1 and 6 4.
Draw parts 1 1 and 1 4 instead */
GtkComboBox GtkBox {
background-image: -gtk-win32-theme-part(combobox, 1 1, margins (1 0 1 0));
}
GtkComboBox GtkBox:insensitive {
background-image: -gtk-win32-theme-part(combobox, 1 4, margins (1 0 1 0));
}
.menubar {
background-color: #f7f7f7;
/*background-color: -gtk-win32-color(button, 30);*/