[gnome-builder] style: make some css styling a bit more theme agnostic



commit de1244364d7f59e797f0d9651e5f590a8be712d2
Author: Christian Hergert <christian hergert me>
Date:   Tue Apr 21 12:23:56 2015 -0700

    style: make some css styling a bit more theme agnostic
    
    Some of this isn't specific to Adwaita. To get the level of quality we
    have put into the theme we support (Adwaita), theme authors are going
    to have to spend some time getting the details right in their themes
    on a per-application basis.
    
    Builder has a lot of detailed modifications to Adwaita. In particular,
    you'll notice the columns in the editor workspace. We highlight things
    appropriately based on focus.
    
    You'll also need to determine what entries you want linked for your theme.
    We've done a few work-arounds to get the aesthetics we want there as well.
    
    Some stuff, like setting treeview colors needs to be done by theme authors.
    We can't get that right for ever theme using named colors.

 data/theme/Adwaita-shared.css             |   99 +----------------------------
 data/theme/shared.css                     |   99 +++++++++++++++++++++++++++++
 src/resources/gnome-builder.gresource.xml |    1 +
 3 files changed, 101 insertions(+), 98 deletions(-)
---
diff --git a/data/theme/Adwaita-shared.css b/data/theme/Adwaita-shared.css
index e13e661..06397c4 100644
--- a/data/theme/Adwaita-shared.css
+++ b/data/theme/Adwaita-shared.css
@@ -1,64 +1,9 @@
-.floating-bar {
-  padding: 2px;
-  background-color: @theme_base_color;
-  border-width: 1px;
-  border-style: solid solid none;
-  border-color: @borders;
-  border-radius: 3px 3px 0 0;
-}
-
-.floating-bar.bottom.left { /* axes left border and border radius */
-  border-left-style: none;
-  border-top-left-radius: 0;
-}
-.floating-bar.bottom.right { /* axes right border and border radius */
-  border-right-style: none;
-  border-top-right-radius: 0;
-}
-
-.floating-bar:backdrop {
-  background-color: @theme_unfocused_base_color;
-  border-color: @unfocused_borders;
-}
-
-.floating-bar .button {
-  padding: 4px;
-}
-
-
-/*
- * Editor Floating Search Entry.
- */
-GbEditorFrame .gb-search-slider {
-  background-color: @theme_base_color;
-  padding: 6px;
-  border-color: shade (@theme_base_color, 0.60);
-  border-radius: 0 0 5px 5px;
-  border-width: 0 1px 1px 1px;
-  border-style: solid;
-}
-.gb-search-entry-occurrences-tag {
-  color: shade (@theme_unfocused_fg_color, 0.8);
-  margin: 2px;
-  padding: 2px;
-}
-GdTaggedEntry {
-  color: @theme_fg_color;
-}
+ import url("resource:///org/gnome/builder/theme/shared.css");
 
 
 /*
  * Preferences styling.
  */
-.preferences.sidebar GtkViewport {
-   border: 0px;
-}
-.preferences.sidebar GtkListBox {
-  background-color: shade(@theme_bg_color, 0.99);
-}
-.preferences.sidebar GtkListBoxRow {
-  padding: 10px;
-}
 GbPreferencesPageLanguage GtkSearchEntry {
   border-bottom-left-radius: 0;
   border-bottom-right-radius: 0;
@@ -66,36 +11,6 @@ GbPreferencesPageLanguage GtkSearchEntry {
 GbPreferencesPageLanguage GtkScrolledWindow {
   border-top-width: 0;
 }
-GbPreferencesSwitch:prelight {
-  background-color: shade(@theme_bg_color, 1.01);
-}
-
-
-/*
- * Command Bar styling.
- */
-GtkBox.gb-command-bar-box {
-  border: none;
-  background-image: linear-gradient(to bottom, #2e3436, #555753 10%);
-  box-shadow: inset 0px 3px 6px #2e3436;
-}
-GtkBox.gb-command-bar-box GtkLabel {
-  color: #eeeeec;
-}
-GtkEntry.gb-command-bar-entry {
-  font-family: Monospace;
-  background-image: none;
-  padding: 6px 6px 6px 6px;
-  color: #eeeeec;
-}
-
-
-/*
- * Style selector widget.
- */
-GbSourceStyleSchemeWidget GtkSourceView {
-  font-family: Monospace;
-}
 
 
 /*
@@ -107,18 +22,6 @@ GbEditorTweakWidget GtkScrolledWindow {
 
 
 /*
- * Disable various animatinos that are enabled by default and really annoying
- * to the overall flow of Builder.
- */
-GbSearchDisplayGroup GtkListBox .list-row {
-  transition: none;
-}
-GbDocumentStack .button {
-  transition: none;
-}
-
-
-/*
  * View stack styling.
  */
 GbViewStack GtkBox.header.notebook {
diff --git a/data/theme/shared.css b/data/theme/shared.css
new file mode 100644
index 0000000..d09ca91
--- /dev/null
+++ b/data/theme/shared.css
@@ -0,0 +1,99 @@
+.floating-bar {
+  padding: 2px;
+  background-color: @theme_base_color;
+  border-width: 1px;
+  border-style: solid solid none;
+  border-color: @borders;
+  border-radius: 3px 3px 0 0;
+}
+.floating-bar.bottom.left { /* axes left border and border radius */
+  border-left-style: none;
+  border-top-left-radius: 0;
+}
+.floating-bar.bottom.right { /* axes right border and border radius */
+  border-right-style: none;
+  border-top-right-radius: 0;
+}
+.floating-bar:backdrop {
+  background-color: @theme_unfocused_base_color;
+  border-color: @unfocused_borders;
+}
+.floating-bar .button {
+  padding: 4px;
+}
+
+
+.preferences.sidebar GtkViewport {
+   border: 0px;
+}
+.preferences.sidebar GtkListBox {
+  background-color: shade(@theme_bg_color, 0.99);
+}
+.preferences.sidebar GtkListBoxRow {
+  padding: 10px;
+}
+
+
+GbPreferencesSwitch:prelight {
+  background-color: shade(@theme_bg_color, 1.01);
+}
+
+
+/*
+ * Editor Floating Search Entry.
+ */
+GbEditorFrame .gb-search-slider {
+  background-color: @theme_base_color;
+  padding: 6px;
+  border-color: shade (@theme_base_color, 0.60);
+  border-radius: 0 0 5px 5px;
+  border-width: 0 1px 1px 1px;
+  border-style: solid;
+}
+.gb-search-entry-occurrences-tag {
+  color: shade (@theme_unfocused_fg_color, 0.8);
+  margin: 2px;
+  padding: 2px;
+}
+GdTaggedEntry {
+  color: @theme_fg_color;
+}
+
+
+/*
+ * Command Bar styling.
+ */
+GtkBox.gb-command-bar-box {
+  border: none;
+  background-image: linear-gradient(to bottom, #2e3436, #555753 10%);
+  box-shadow: inset 0px 3px 6px #2e3436;
+}
+GtkBox.gb-command-bar-box GtkLabel {
+  color: #eeeeec;
+}
+GtkEntry.gb-command-bar-entry {
+  font-family: Monospace;
+  background-image: none;
+  padding: 6px 6px 6px 6px;
+  color: #eeeeec;
+}
+
+
+/*
+ * Style selector widget.
+ */
+GbSourceStyleSchemeWidget GtkSourceView {
+  font-family: Monospace;
+}
+
+
+/*
+ * Disable various animations that are enabled by default and really annoying
+ * to the overall flow of Builder.
+ */
+GbSearchDisplayGroup GtkListBox .list-row {
+  transition: none;
+}
+GbDocumentStack .button {
+  transition: none;
+}
diff --git a/src/resources/gnome-builder.gresource.xml b/src/resources/gnome-builder.gresource.xml
index 3134ef6..c202e7f 100644
--- a/src/resources/gnome-builder.gresource.xml
+++ b/src/resources/gnome-builder.gresource.xml
@@ -36,6 +36,7 @@
     <file alias="theme/Adwaita.css">../../data/theme/Adwaita.css</file>
     <file alias="theme/Adwaita-dark.css">../../data/theme/Adwaita-dark.css</file>
     <file alias="theme/Adwaita-shared.css">../../data/theme/Adwaita-shared.css</file>
+    <file alias="theme/shared.css">../../data/theme/shared.css</file>
 
     <file alias="ui/gb-command-bar.ui">../../data/ui/gb-command-bar.ui</file>
     <file alias="ui/gb-devhelp-view.ui">../../data/ui/gb-devhelp-view.ui</file>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]