[gnome-themes-standard] HighContrast: make the theme a GResource
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard] HighContrast: make the theme a GResource
- Date: Fri, 10 Feb 2012 14:56:31 +0000 (UTC)
commit ba98b437bfa42db459ca7445226e63c48be1bdbb
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Feb 10 00:48:01 2012 -0500
HighContrast: make the theme a GResource
And split colors from the style definitions, so that we can make a
HighContrastInverse easily now.
themes/HighContrast/gtk-3.0/Makefile.am | 10 +-
themes/HighContrast/gtk-3.0/gtk.css | 310 +------------------------
themes/HighContrast/gtk-3.0/gtk.gresource.xml | 6 +
themes/Makefile.am | 3 +
themes/a11y-base.css | 305 ++++++++++++++++++++++++
5 files changed, 328 insertions(+), 306 deletions(-)
---
diff --git a/themes/HighContrast/gtk-3.0/Makefile.am b/themes/HighContrast/gtk-3.0/Makefile.am
index 67bd2c8..87a4fd4 100644
--- a/themes/HighContrast/gtk-3.0/Makefile.am
+++ b/themes/HighContrast/gtk-3.0/Makefile.am
@@ -1,7 +1,13 @@
+gtk.gresource: gtk.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies $(srcdir)/gtk.gresource.xml)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) $<
+
themedir = $(datadir)/themes/HighContrast/gtk-3.0
theme_DATA = \
- gtk.css
+ gtk.css \
+ gtk.gresource
-EXTRA_DIST = $(theme_DATA)
+EXTRA_DIST = \
+ gtk.css \
+ gtk.gresource.xml
-include $(top_srcdir)/git.mk
diff --git a/themes/HighContrast/gtk-3.0/gtk.css b/themes/HighContrast/gtk-3.0/gtk.css
index 7759c88..62f90bb 100644
--- a/themes/HighContrast/gtk-3.0/gtk.css
+++ b/themes/HighContrast/gtk-3.0/gtk.css
@@ -1,305 +1,7 @@
-* {
- -GtkRange-stepper-size: 20;
+ define-color theme_base_color #fff;
+ define-color theme_fg_color #000;
+ define-color theme_active_color #b8b891;
+ define-color theme_insensitive_color #999;
+ define-color theme_insensitive_bg #ccf;
- -GtkTreeView-expander-size: 16;
-
- -GtkWidget-cursor-color: #cc0000;
- -GtkWidget-cursor-aspect-ratio: 0.1;
- -GtkWidget-focus-line-width: 30;
- -GtkWidget-focus-padding: 1;
- -GtkWidget-focus-line-width: 2;
- -GtkWidget-focus-line-pattern: "\002\001";
- -GtkWidget-link-color: #000060;
- -GtkWidget-visited-link-color: #600000;
-
- -GtkMenu-horizontal-padding: 0;
- -GtkMenu-vertical-padding: 0;
-
- -GtkScrolledWindow-scrollbar-spacing: 0;
- -GtkScrolledWindow-scrollbars-within-bevel: 1;
-
- /* Pidgin */
- -GtkIMHtml-hyperlink-color: #000060;
- -GtkIMHtml-hyperlink-visited-color: #600000;
- -GtkIMHtml-hyperlink-prelight-color: #404080;
-
- /* Evolution */
- -GtkHTML-link-color: #000060;
- -GtkHTML-vlink-color: #600000;
- -GtkHTML-cite-color: #003000;
-
- -GtkComboBox-arrow-scaling: 0.9;
-}
-
-GtkWindow {
- background-color: #fff;
- color: #000;
-}
-
-*:insensitive {
- color: #999;
- background-color: #ccf;
- border-color: #999;
-}
-
-*:selected {
- background-color: #b8b891;
- color: #000;
-}
-
-*:selected:focused {
- background-color: #000;
- color: #fff;
-}
-
-GtkImage:insensitive {
- background-color: transparent;
-}
-
-.tooltip {
- background-color: #000;
- color: #ccf;
-}
-
-.grip {
- background-color: #999;
-}
-
-.button,
-.trough,
-.entry {
- border-width: 2px;
- border-style: solid;
- border-color: #000;
-}
-
-.button:hover {
- background-color: #000;
- border-color: #ccf;
- color: #ccf;
-}
-
-GtkComboBox *:hover {
- color: #ccf;
-}
-
-GtkComboBox .separator {
- color: transparent;
-}
-
-.button:insensitive,
-.trough:insensitive,
-.entry:insensitive {
- border-color: #999;
-}
-
-.trough {
- background-color: #b8b891;
- color: #000;
-}
-
-.trough:active {
- color: #fff;
-}
-
-.trough:insensitive {
- background-color: #ccf;
- color: #999;
-}
-
-.button:active,
-.trough:active {
- background-color: #b8b891;
-}
-
-.button:hover:active {
- background-color: #000;
-}
-
-.button:insensitive:active,
-.trough:insensitive:active {
- background-color: #ccf;
-}
-
-.entry {
- padding: 4px;
-}
-
-.button {
- padding: 1px 4px;
-}
-
-GtkComboBox .button {
- padding: 0 4px;
-}
-
-.combobox-entry .entry:first-child {
- border-right-width: 0px;
-}
-
-.combobox-entry .entry:last-child {
- border-left-width: 0px;
-}
-
-.spinbutton .button {
- padding: 2px 6px;
- border-width: 0px 2px;
- color: #000;
-}
-
-.spinbutton .button:hover {
- color: #ccf;
- border-color: #000;
-}
-
-.spinbutton .button:insensitive {
- color: #999;
-}
-
-.spinbutton .button:first-child,
-.spinbutton .button:last-child {
- border-width: 0px;
-}
-
-.menubar .menuitem {
- padding: 3px 5px;
-}
-
-.menubar .menuitem:hover {
- background-color: #000;
- color: #ccf;
-}
-
-.menu .menuitem {
- padding: 4px;
-}
-
-.menu .menuitem:hover {
- background-color: #000;
- color: #ccf;
-}
-
-.menu {
- border-style: solid;
- border-color: red;
- border-width: 0px;
-}
-
-.menuitem.separator {
- -GtkMenuItem-horizontal-padding: 0;
-}
-
-.toolbar {
- padding: 4px;
- border-width: 2px 0;
- border-style: solid;
-}
-
-.toolbar .button *:insensitive,
-.toolbar .button:insensitive {
- background-color: #fff;
-}
-
-.toolbar .button *:insensitive:active,
-.toolbar .button:insensitive:active {
- background-color: #ccf;
-}
-
-.inline-toolbar {
- border-width: 0 2px 2px;
-}
-
-.primary-toolbar.toolbar,
-.primary-toolbar .toolbar,
-.menubar.toolbar,
-.inline-toolbar {
- -GtkToolbar-button-relief: normal;
-}
-
-.primary-toolbar .button {
- border-color: transparent;
-}
-
-.primary-toolbar .button.raised,
-.primary-toolbar .raised .button {
- border-color: #000;
-}
-
-.primary-toolbar .button:active {
- border-color: #000;
-}
-
-.primary-toolbar .button:hover:active {
- border-color: #ccf;
-}
-
-.primary-toolbar .button:active:insensitive {
- border-color: #999;
-}
-
-.slider {
- background-color: #fff;
- border-width: 2px;
- border-style: solid;
- border-color: #000;
-
- color: transparent;
-}
-
-.slider:hover {
- background-color: #000;
- border-color: #000;
-}
-
-.slider:hover:active {
- border-color: #ccf;
-}
-
-GtkSwitch.slider {
- padding: 2px;
- border-width: 1px;
- border-color: #ccf;
-}
-
-.notebook {
- border-width: 2px;
- border-color: #000;
- border-style: solid;
-}
-
-tab {
- background-color: #b8b891;
- padding: 3px;
-}
-
-tab:active,
-row:hover {
- background-color: #fff;
- color: #000;
-}
-
-GtkScrolledWindow.frame {
- border-width: 2px;
- border-style: solid;
-}
-
-column-header .button {
- border-top-width: 0;
- border-right-width: 0;
-}
-
-column-header .button:hover {
- background-color: #000;
- color: #fff;
- border-color: #000;
-}
-
-column-header:first-child .button {
- border-left-width: 0;
-}
-
-.check,
-.radio {
- border-width: 1px;
- border-style: solid;
-}
+ import url("resource:///org/gnome/HighContrast/a11y.css");
diff --git a/themes/HighContrast/gtk-3.0/gtk.gresource.xml b/themes/HighContrast/gtk-3.0/gtk.gresource.xml
new file mode 100644
index 0000000..b43dab7
--- /dev/null
+++ b/themes/HighContrast/gtk-3.0/gtk.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/HighContrast">
+ <file alias="a11y.css">../../a11y-base.css</file>
+ </gresource>
+</gresources>
diff --git a/themes/Makefile.am b/themes/Makefile.am
index c27c955..2a0e0c0 100644
--- a/themes/Makefile.am
+++ b/themes/Makefile.am
@@ -1,4 +1,7 @@
SUBDIRS = Adwaita LowContrast HighContrast HighContrastInverse
+EXTRA_DIST = \
+ a11y-base.css
+
-include $(top_srcdir)/git.mk
diff --git a/themes/a11y-base.css b/themes/a11y-base.css
new file mode 100644
index 0000000..5714c90
--- /dev/null
+++ b/themes/a11y-base.css
@@ -0,0 +1,305 @@
+* {
+ -GtkRange-stepper-size: 20;
+
+ -GtkTreeView-expander-size: 16;
+
+ -GtkWidget-cursor-color: #cc0000;
+ -GtkWidget-cursor-aspect-ratio: 0.1;
+ -GtkWidget-focus-line-width: 30;
+ -GtkWidget-focus-padding: 1;
+ -GtkWidget-focus-line-width: 2;
+ -GtkWidget-focus-line-pattern: "\002\001";
+ -GtkWidget-link-color: #000060;
+ -GtkWidget-visited-link-color: #600000;
+
+ -GtkMenu-horizontal-padding: 0;
+ -GtkMenu-vertical-padding: 0;
+
+ -GtkScrolledWindow-scrollbar-spacing: 0;
+ -GtkScrolledWindow-scrollbars-within-bevel: 1;
+
+ /* Pidgin */
+ -GtkIMHtml-hyperlink-color: #000060;
+ -GtkIMHtml-hyperlink-visited-color: #600000;
+ -GtkIMHtml-hyperlink-prelight-color: #404080;
+
+ /* Evolution */
+ -GtkHTML-link-color: #000060;
+ -GtkHTML-vlink-color: #600000;
+ -GtkHTML-cite-color: #003000;
+
+ -GtkComboBox-arrow-scaling: 0.9;
+}
+
+GtkWindow {
+ background-color: @theme_base_color;
+ color: @theme_fg_color;
+}
+
+*:insensitive {
+ color: @theme_insensitive_color;
+ background-color: @theme_insensitive_bg;
+ border-color: @theme_insensitive_color;
+}
+
+*:selected {
+ background-color: @theme_active_color;
+ color: @theme_fg_color;
+}
+
+*:selected:focused {
+ background-color: @theme_fg_color;
+ color: @theme_base_color;
+}
+
+GtkImage:insensitive {
+ background-color: transparent;
+}
+
+.tooltip {
+ background-color: @theme_fg_color;
+ color: @theme_insensitive_bg;
+}
+
+.grip {
+ background-color: @theme_insensitive_color;
+}
+
+.button,
+.trough,
+.entry {
+ border-width: 2px;
+ border-style: solid;
+ border-color: @theme_fg_color;
+}
+
+.button:hover {
+ background-color: @theme_fg_color;
+ border-color: @theme_insensitive_bg;
+ color: @theme_insensitive_bg;
+}
+
+GtkComboBox *:hover {
+ color: @theme_insensitive_bg;
+}
+
+GtkComboBox .separator {
+ color: transparent;
+}
+
+.button:insensitive,
+.trough:insensitive,
+.entry:insensitive {
+ border-color: @theme_insensitive_color;
+}
+
+.trough {
+ background-color: @theme_active_color;
+ color: @theme_fg_color;
+}
+
+.trough:active {
+ color: @theme_base_color;
+}
+
+.trough:insensitive {
+ background-color: @theme_insensitive_bg;
+ color: @theme_insensitive_color;
+}
+
+.button:active,
+.trough:active {
+ background-color: @theme_active_color;
+}
+
+.button:hover:active {
+ background-color: @theme_fg_color;
+}
+
+.button:insensitive:active,
+.trough:insensitive:active {
+ background-color: @theme_insensitive_bg;
+}
+
+.entry {
+ padding: 4px;
+}
+
+.button {
+ padding: 1px 4px;
+}
+
+GtkComboBox .button {
+ padding: 0 4px;
+}
+
+.combobox-entry .entry:first-child {
+ border-right-width: 0px;
+}
+
+.combobox-entry .entry:last-child {
+ border-left-width: 0px;
+}
+
+.spinbutton .button {
+ padding: 2px 6px;
+ border-width: 0px 2px;
+ color: @theme_fg_color;
+}
+
+.spinbutton .button:hover {
+ color: @theme_insensitive_bg;
+ border-color: @theme_fg_color;
+}
+
+.spinbutton .button:insensitive {
+ color: @theme_insensitive_color;
+}
+
+.spinbutton .button:first-child,
+.spinbutton .button:last-child {
+ border-width: 0px;
+}
+
+.menubar .menuitem {
+ padding: 3px 5px;
+}
+
+.menubar .menuitem:hover {
+ background-color: @theme_fg_color;
+ color: @theme_insensitive_bg;
+}
+
+.menu .menuitem {
+ padding: 4px;
+}
+
+.menu .menuitem:hover {
+ background-color: @theme_fg_color;
+ color: @theme_insensitive_bg;
+}
+
+.menu {
+ border-style: solid;
+ border-color: red;
+ border-width: 0px;
+}
+
+.menuitem.separator {
+ -GtkMenuItem-horizontal-padding: 0;
+}
+
+.toolbar {
+ padding: 4px;
+ border-width: 2px 0;
+ border-style: solid;
+}
+
+.toolbar .button *:insensitive,
+.toolbar .button:insensitive {
+ background-color: @theme_base_color;
+}
+
+.toolbar .button *:insensitive:active,
+.toolbar .button:insensitive:active {
+ background-color: @theme_insensitive_bg;
+}
+
+.inline-toolbar {
+ border-width: 0 2px 2px;
+}
+
+.primary-toolbar.toolbar,
+.primary-toolbar .toolbar,
+.menubar.toolbar,
+.inline-toolbar {
+ -GtkToolbar-button-relief: normal;
+}
+
+.primary-toolbar .button {
+ border-color: transparent;
+}
+
+.primary-toolbar .button.raised,
+.primary-toolbar .raised .button {
+ border-color: @theme_fg_color;
+}
+
+.primary-toolbar .button:active {
+ border-color: @theme_fg_color;
+}
+
+.primary-toolbar .button:hover:active {
+ border-color: @theme_insensitive_bg;
+}
+
+.primary-toolbar .button:active:insensitive {
+ border-color: @theme_insensitive_color;
+}
+
+.slider {
+ background-color: @theme_base_color;
+ border-width: 2px;
+ border-style: solid;
+ border-color: @theme_fg_color;
+
+ color: transparent;
+}
+
+.slider:hover {
+ background-color: @theme_fg_color;
+ border-color: @theme_fg_color;
+}
+
+.slider:hover:active {
+ border-color: @theme_insensitive_bg;
+}
+
+GtkSwitch.slider {
+ padding: 2px;
+ border-width: 1px;
+ border-color: @theme_insensitive_bg;
+}
+
+.notebook {
+ border-width: 2px;
+ border-color: @theme_fg_color;
+ border-style: solid;
+}
+
+tab {
+ background-color: @theme_active_color;
+ padding: 3px;
+}
+
+tab:active,
+row:hover {
+ background-color: @theme_base_color;
+ color: @theme_fg_color;
+}
+
+GtkScrolledWindow.frame {
+ border-width: 2px;
+ border-style: solid;
+}
+
+column-header .button {
+ border-top-width: 0;
+ border-right-width: 0;
+}
+
+column-header .button:hover {
+ background-color: @theme_fg_color;
+ color: @theme_base_color;
+ border-color: @theme_fg_color;
+}
+
+column-header:first-child .button {
+ border-left-width: 0;
+}
+
+.check,
+.radio {
+ border-width: 1px;
+ border-style: solid;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]