win32: Get rid of XP theme

XP is not supported anymore. And we can massively simplify the win32
theme if we don't have to support 2 versions.
This commit is contained in:
Benjamin Otte 2016-02-04 14:25:46 +01:00
parent 7d4bf49cff
commit 8d515409c6
3 changed files with 2 additions and 168 deletions

View File

@ -1232,9 +1232,8 @@ gtk.gresource.xml: Makefile.am inspector/Makefile.inc
echo " <file>theme/HighContrast/gtk-contained.css</file>" >> $@; \
echo " <file>theme/HighContrast/gtk-contained-inverse.css</file>" >> $@; \
if test "$(win32_theme)" = "yes"; then \
echo " <file alias='theme/win32/gtk-base.css'>theme/win32/gtk-win32-base.css</file>" >> $@; \
echo " <file alias='theme/win32/gtk.css'>theme/win32/gtk-win32.css</file>" >> $@; \
echo " <file alias='theme/win32-xp/gtk.css'>theme/win32/gtk-win32-xp.css</file>" >> $@; \
echo " <file>theme/win32/gtk-win32-base.css</file>" >> $@; \
echo " <file>theme/win32/gtk.css</file>" >> $@; \
fi; \
for f in $(srcdir)/cursor/*.png; do \
n=`basename $$f`; \
@ -1276,7 +1275,6 @@ gesture_sources = \
theme_sources = \
theme/win32/gtk-win32.css \
theme/win32/gtk-win32-base.css \
theme/win32/gtk-win32-xp.css \
theme/Adwaita/assets.txt \
theme/Adwaita/assets.svg \
theme/Adwaita/_colors-public.scss \

View File

@ -1,164 +0,0 @@
@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);*/
border-width: 0 0 1px 0;
border-style: solid;
border-color: #ded3bd;
}
.menu > .menuitem:prelight {
background-color: -gtk-win32-color(button, 29);
}
.menubar > .menuitem:prelight,
.menubar > .menuitem:prelight:focused {
background-image: -gtk-win32-theme-part(toolbar, 1 2);
}
.notebook {
background-image: -gtk-win32-theme-part(tab, 9 1, margins(-1 -3 -3 -1));
border-image: -gtk-win32-theme-part(tab, 9 1, margins(0 -2 -2 0)) 1 1 1 1 repeat;
}
.menuitem.check,
.menuitem.check:prelight,
.menuitem.check:insensitive,
.menuitem.check:active,
.menuitem.check:active:prelight,
.menuitem.check:inconsistent,
.menuitem.check:inconsistent:insensitive,
.menuitem.check:inconsistent:prelight,
.menuitem.check:inconsistent:active,
.menuitem.check:inconsistent:active:prelight,
.menuitem.check:insensitive:active,
.menuitem.check:insensitive:active:prelight {
background-image: none;
border-width: 0;
}
.menuitem.radio,
.menuitem.radio:prelight,
.menuitem.radio:insensitive,
.menuitem.radio:active,
.menuitem.radio:active:prelight,
.menuitem.radio:inconsistent,
.menuitem.radio:inconsistent:insensitive,
.menuitem.radio:inconsistent:prelight,
.menuitem.radio:inconsistent:active,
.menuitem.radio:inconsistent:active:prelight,
.menuitem.radio:insensitive:active,
.menuitem.radio:insensitive:active:prelight {
background-image: none;
border-width: 0;
}
.spinbutton .button {
border-width: 1px;
border-style: solid;
border-color: #7b9ebd;
}
.spinbutton .button:last-child {
border-width: 1px 1px 1px 0px;
}
GtkProgressBar.progressbar {
border-width: 2px;
border-style: solid;
border-color: transparent;
}
/* Notebook */
.notebook {
background-color: #ffffff;
border-width: 1px 1px 1px 1px;
border-style: solid;
background-origin: padding-box;
background-clip: border-box;
background-image: -gtk-win32-theme-part(tab, 9 1, margins(-1 -3 -2 -1));
border-image: -gtk-win32-theme-part(tab, 9 1, margins(0 -2 -1 0)) 1 1 1 1 repeat;
-GtkNotebook-tab-overlap: 1;
-GtkNotebook-tab-curvature: 0;
}
.notebook tab {
border-width: 0;
background-image: -gtk-win32-theme-part(tab, 1 1);
padding: 0px 4px 0px 4px;
}
.notebook tab.left, .notebook tab.right {
padding: 4px 0px 4px 0px;
}
.notebook tab:active {
background-image: -gtk-win32-theme-part(tab, 1 3, margins(0 0 -1 0));
}
.notebook tab:active.top {
padding: 2px 4px 1px 4px;
}
.notebook tab:active.bottom {
padding: 1px 4px 2px 4px;
}
.notebook tab:active.right {
padding: 4px 4px 4px 1px;
}
.notebook tab:active.left {
padding: 4px 1px 4px 4px;
}
/* Listbox */
/* This is roughly similar to what Vista+ theme draws. The reason for using
this instead of changing background-color to @selection_bg_color is that
blanket "* { color: @text_color; }" style overrides ".list-row:selected {
color: @selected_fg_color; }", causing labels and widgets in list rows to have
black (not white) text over blue background. Fixing that requires overhauling
the whole theme to put narrow "color: @text_color" style everywhere, to be
able to remove the blanket style.
And the reason for not using appropriate W32 theme part is that the appropriate
W32 theme part does not exist in XP theme. */
.list-row:prelight {
background-image: -gtk-gradient (linear,
0 0, 0 1,
color-stop(0, rgb(253, 254, 255)),
color-stop(1, rgb(237, 245, 255)));
box-shadow: inset -1px -1px 0px rgba (128, 128, 255, 0.5), inset 1px 1px 0px rgba (128, 128, 255, 0.5);
}
.list-row:selected {
/* Override *:selected {} blanket style, keeping the background - bright
and the text - dark */
background-color: transparent;
color: @text_color;
background-image: -gtk-gradient (linear,
0 0, 0 1,
color-stop(0, rgb(236, 244, 255)),
color-stop(1, rgb(208, 230, 255)));
box-shadow: inset -1px -1px 0px rgba (128, 128, 255, 0.5), inset 1px 1px 0px rgba (128, 128, 255, 0.5);
}
.list-row:selected:prelight {
background-image: -gtk-gradient (linear,
0 0, 0 1,
color-stop(0, rgb(221, 236, 255)),
color-stop(1, rgb(194, 220, 255)));
box-shadow: inset -1px -1px 0px rgba (128, 128, 255, 0.5), inset 1px 1px 0px rgba (128, 128, 255, 0.5);
}