[gnome-builder] style: track lots of upstream gtk+ theme changes



commit 84d8fa13091579799a9f3ab4bd035efba8a12e1d
Author: Christian Hergert <christian hergert me>
Date:   Fri Jan 15 10:09:24 2016 -0800

    style: track lots of upstream gtk+ theme changes
    
    Lots to do, but this is a giant leap in the right direction.

 contrib/egg/egg-search-bar.c                     |    7 +-
 data/theme/Adwaita-dark.css                      |  272 +++-------------------
 data/theme/Adwaita-shared.css                    |  252 ++++++++++++++++++--
 data/theme/Adwaita.css                           |  256 +++------------------
 data/theme/shared.css                            |  166 -------------
 data/ui/ide-layout-tab.ui                        |    1 +
 data/ui/ide-workbench.ui                         |    2 +-
 libide/Makefile.am                               |    2 +
 libide/ide-layout-grid.c                         |    6 +-
 libide/ide-perspective-switcher.c                |   39 +++
 libide/ide-perspective-switcher.h                |   32 +++
 libide/preferences/ide-preferences-bin.c         |    2 +
 libide/preferences/ide-preferences-flow-box.c    |    2 +
 libide/preferences/ide-preferences-group.c       |    1 +
 libide/preferences/ide-preferences-perspective.c |    1 +
 libide/search/ide-omni-search-display.c          |    2 +
 libide/search/ide-omni-search-group.c            |   21 +--
 17 files changed, 378 insertions(+), 686 deletions(-)
---
diff --git a/contrib/egg/egg-search-bar.c b/contrib/egg/egg-search-bar.c
index 2ece233..52be4e8 100644
--- a/contrib/egg/egg-search-bar.c
+++ b/contrib/egg/egg-search-bar.c
@@ -323,6 +323,8 @@ egg_search_bar_class_init (EggSearchBarClass *klass)
                                 G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
                                 G_CALLBACK (egg_search_bar_reveal),
                                 NULL, NULL, NULL, G_TYPE_NONE, 0);
+
+  gtk_widget_class_set_css_name (widget_class, "eggsearchbar");
 }
 
 static void
@@ -364,7 +366,10 @@ egg_search_bar_init (EggSearchBar *self)
   priv->box =
     g_object_new (GTK_TYPE_BOX,
                   "hexpand", TRUE,
-                  "margin", 6,
+                  "margin-bottom", 3,
+                  "margin-end", 6,
+                  "margin-start", 6,
+                  "margin-top", 3,
                   "orientation", GTK_ORIENTATION_HORIZONTAL,
                   "visible", TRUE,
                   NULL);
diff --git a/data/theme/Adwaita-dark.css b/data/theme/Adwaita-dark.css
index 58cfcd1..b202d92 100644
--- a/data/theme/Adwaita-dark.css
+++ b/data/theme/Adwaita-dark.css
@@ -1,268 +1,60 @@
 @import url("resource:///org/gnome/builder/theme/Adwaita-shared.css");
 
 
-treeview.view {
-  color: #eeeeec;
-  background-color: mix(#292929, #2e3436, 0.8);
-}
-treeview.view:backdrop {
-  color: #a1a1a1;
-  background-color: #2e3436;
-}
-treeview.view.cell:selected {
-  color: #fff;
-  background-color: #215d9c;
-}
-
-
-pillbox {
-  background-color: #1e1e1e;
-  border-radius: 3px;
-}
-
-
-RgGraph {
-  background-color: #2e3436;
-  background-size: 8px 8px;
-  background-image: repeating-linear-gradient(0deg, #32383a, #32383a 1px, transparent 1px, transparent 8px),
-                    repeating-linear-gradient(-90deg, #32383a, #32383a 1px, transparent 1px, transparent 
8px);
-}
-
-
-GbTerminalView {
-  background-color: #2e3436;
-  color: #babdb6;
-}
-
-
-treeview.dim-label {
-  color: #979a99;
-}
-
-treeview:backdrop.dim-label {
-  color: #6d6f70;
-}
-
-
-GbAccelLabel .frame {
-  background-color: #222;
-  border: 1px solid #cecece;
-  border-color: #1c1f1f;
-  border-radius: 5px;
-  color: #eeeeec;
-  padding: 3px 8px 3px 8px;
-  box-shadow: 0px 1px 0px #333 inset,
-              0px -1px 0px #111 inset;
-}
-
-
-box.horizontal.search-bar {
-  background: none;
+eggsearchbar box.search-bar {
   background-color: #303535;
-  box-shadow: inset 0 2px 3px -1px #242828, 0 1px rgba(238, 238, 236, 0.1);
-  border: none;
-  border-bottom: 1px solid #1c1f1f;
-}
-box.horizontal.search-bar:backdrop {
-  border-color: #1f2222;
-  background-color: #303535;
-  box-shadow: none;
-}
-
-
-workbench > GtkOverlay > stack > box > stackswitcher.vertical:first-child {
-  background: #2e3436;
-}
-workbench > GtkOverlay > stack > box > stackswitcher.vertical:first-child button {
-  padding: 6px;
-  color: #979a99;
-  background: transparent;
-  box-shadow: none;
-  border: none;
-  border-radius: 0px;
+  box-shadow: 0 4px 3px -5px #2c3030 inset,
+              0 -1px 0 #1c1f1f inset;
 }
-workbench > GtkOverlay > stack > box > stackswitcher.vertical:first-child button:checked {
-  color: #babdb6;
+eggsearchbar:backdrop box.search-bar {
+  box-shadow: 0 -1px 0 #2c3030 inset;
 }
 
 
-
-omnisearchrow {
-  color: #eeeeec;
-}
-
-
-
-
-layouttabbar {
-  background-image: none;
-  background-color: #2e3436;
-  border-style: none;
-  border-radius: 0px;
-  border-bottom: 1px solid #1c1f1f;
-  color: #2e3436;
-  box-shadow: 0px 5px 5px -10px #101010 inset;
-}
-
-layouttabbar button {
-  background-image: none;
-  background-color: transparent;
-  color: #585858;
-  border-style: none;
-  border-radius: 0px;
-  box-shadow: none;
-  padding: 9px;
+perspectiveswitcher {
+  background-color: #303535;
 }
-
-layouttab button:disabled {
-  opacity: 0.3;
+perspectiveswitcher button {
+  color: #696c6b;
 }
-
-layouttabbar > box > button:hover {
+perspectiveswitcher button:checked,
+perspectiveswitcher button:checked:hover {
   color: #eeeeec;
 }
-
-layouttab {
-  background-image: none;
-  background-color: transparent;
-  border-style: none;
-  border-radius: 0 0 3px 3px;
-  border-bottom: 1px solid @borders;
-  color: #c8c8c8;
+perspectiveswitcher button:hover {
+  color: #b2b4b2;
 }
 
-layoutstack.focus layouttab {
-  background-color: #343939;
-  border-bottom: 3px solid #215d9c;
-  border-left: 1px solid #282b2b;
-  border-right: 1px solid #282b2b;
-  box-shadow: 0px 5px 5px -10px #101010 inset;
-}
-
-layoutstack:not(.focus) layouttab:hover {
-  background-color: transparent;
-  border-bottom: 3px solid #888a85;
-  border-left: 1px solid #282b2b;
-  border-right: 1px solid #282b2b;
-  box-shadow: 0px 5px 5px -10px #101010 inset;
-}
 
-layouttab button {
-  background-image: none;
-  background-color: transparent;
-  color: #6c6f6e;
-  border-style: none;
-  border-radius: 0px;
-  box-shadow: none;
-}
-
-layouttab label {
-  color: #eeeeec;
-  text-shadow: 0 1px #101010;
-  margin-bottom: -2px;
+pillbox {
+  background-color: #333435;
 }
 
-layouttab label:backdrop {
-  text-shadow: none;
-}
 
-layouttab separator {
-  margin: 7px 0 8px 0;
-  padding: 0;
-  background-color: alpha(@borders,.2);
-  min-width: 0px;
+layouttabbar {
+  background-color: #303535;
+  box-shadow: 0 4px 3px -5px #2c3030 inset,
+              0 -1px 0 #1c1f1f inset;
 }
-
-layoutstack.focus layouttabbar layouttab:backdrop,
-layoutstack layouttabbar layouttab:backdrop,
-layoutstack layouttabbar layouttab:hover:backdrop,
 layouttabbar:backdrop {
-  box-shadow: none;
-}
-
-layoutstack layouttab button.close {
-  border-style: solid;
-  border-radius: 5px;
-  border-width: 1px;
-  border-color: transparent;
-  color: #acadae;
-  padding: 1px;
-  margin: 0px;
+  box-shadow: 0 -1px 0 #2c3030 inset;
 }
-
-layoutstack layouttab button.close:hover {
-  border-color: #1c1f1f;
-  color: #eeeeec;
-}
-
-layoutstack layouttab button.close:active {
-  border-color: #1c1f1f;
-  color: #eeeeec;
-  background-image: linear-gradient(#2e3436, #2d3232);
-}
-
-.views-list row {
-  padding: 6px;
-}
-
-.views-list row button {
-  box-shadow: none;
-  padding: 0px;
-  border-style: none;
-  border-width: 0px;
-  background-image: none;
-  background-color: transparent;
-  color: #acadae;
-  opacity: 0.0;
-}
-
-.views-list row:selected button {
-  color: white;
-}
-
-.views-list row:hover button {
-  opacity: 1.0;
-}
-
-
-/* this still needs better alignment with non-11pt cantarell */
-layoutpane > box > box:first-child {
-  background-image: none;
-  background-color: #2e3436;
-  border-style: none;
-  border-radius: 0px;
-  border-width: 0px;
-  color: #2e3436;
-  box-shadow: 0px 5px 5px -10px #101010 inset,
-              0px -1px 0px #1c1f1f inset;
+layouttab {
+  border-bottom-color: #215d9c;
+  box-shadow: 0 4px 3px -5px #2c3030 inset;
 }
-
-layoutpane > box > box:first-child > stackswitcher > button {
-  background-image: none;
-  background-color: transparent;
-  border-style: none;
-  border-radius: 0px;
-  border-bottom: 3px solid transparent;
+layouttab:backdrop {
+  background-color: #393f3f;
+  border-right-color: alpha(@borders, 0.5);
+  border-left-color: alpha(@borders, 0.5);
   box-shadow: none;
-  padding: 6px 1px 7px 1px;
-  color: #888a85;
-  text-shadow: none;
-  font-weight: bold;
-  min-width: 0;
-  margin-right: 6px;
 }
 
-layoutpane > box > box:first-child > stackswitcher > button:last-child {
-  margin-right: 0px;
-}
 
-layoutpane > box > box:first-child > stackswitcher > button > label {
-  margin-top: 2px;
-  margin-bottom: -2px;
+layoutpane > box.vertical:first-child > box.horizontal {
+  background: #d6d6d6;
+  box-shadow: inset 0 2px 3px -1px #b6b6b6;
 }
-
-layoutpane > box > box:first-child > stackswitcher > button:checked {
-  border-bottom: 3px solid @theme_selected_bg_color;
-  color: #fafafa;
-  text-shadow: 0 1px #101010;
+layoutpane stackswitcher button:checked {
+  box-shadow: 0 -2px 0 #4a90d9 inset;
 }
diff --git a/data/theme/Adwaita-shared.css b/data/theme/Adwaita-shared.css
index 417db75..7af75b5 100644
--- a/data/theme/Adwaita-shared.css
+++ b/data/theme/Adwaita-shared.css
@@ -2,51 +2,251 @@
 
 
 /*
- * Editor tweak widget.
+ * Titlebar adjustments for workbench
+ *
+ * This is needed due to our placement of headerbar inside of a
+ * stack. We were seeing black edges around the header bar, and
+ * improper radius on the headerbar.
  */
-GbEditorTweakWidget GtkScrolledWindow {
-  border-top: none;
+workbench stack.titlebar {
+  border-bottom: none;
+  border-radius: 6px 6px 0 0;
+  box-shadow: none;
+  padding: 0;
+}
+workbench stack.titlebar headerbar {
+  border-radius: 6px 6px 0 0;
+  margin: 0;
+  border-bottom: none;
+  box-shadow: 0 -1px 0 @borders inset;
+}
+workbench stack.titlebar headerbar:backdrop {
+  box-shadow: 0 -1px 0 alpha(@borders, 0.6) inset;
 }
 
 
+/*
+ * Greeter tweaks
+ *
+ * The following tweaks the greeter perspective by adding
+ * separator lines to the list box.
+ */
+greeter list row {
+  border-bottom: 1px solid alpha(@borders, 0.2);
+}
+greeter list row:last-child {
+  border-bottom: none;
+}
+greeter frame border {
+  border-color: alpha(@borders, 0.6);
+}
+
 
-/* FileChooserButton|Entry */
-box.linked-on-right button {
-  border-top-right-radius: 0px;
-  border-bottom-right-radius: 0px;
-  border-right: 0px;
+/*
+ * Global search results styling
+ *
+ * The following tweaks the sizing of listbox rows in the
+ * global search results to have a bit more padding and
+ * row separators after each line. Additionally, we tweak
+ * the selection color to ensure it has priority.
+ */
+omnisearchdisplay omnisearchgroup omnisearchrow {
+  background: transparent;
+  padding: 9px 12px 9px 12px;
+  border-bottom: 1px solid alpha(@borders, 0.2);
+}
+omnisearchdisplay omnisearchgroup omnisearchrow:last-child {
+  border-bottom: none;
+}
+omnisearchdisplay omnisearchgroup omnisearchrow:selected {
+  background-color: @theme_selected_bg_color;
+  color: @theme_selected_fg_color;
 }
 
 
 /*
- * Adjust devhelp styling.
+ * Preferences styling
+ *
+ * The following tweaks our preferences styling in the
+ * preferences perspective, including groups, rows,
+ * sidebar, etc.
  */
-devhelppanel entry:first-child {
-  border-left: none;
-  border-right: none;
-  border-top: none;
-  border-radius: 0px;
+workbench preferences preferencesgroup list row {
+  padding: 10px;
+  border-bottom: 1px solid alpha(@borders, 0.2);
+}
+workbench preferences preferencesgroup list row:last-child {
+  border-bottom: none;
+}
+workbench preferences preferencesgroup list entry {
+  background: none;
 }
 
 
 /*
- * Adjust symbol panel styling.
+ * Perspectives switcher
+ *
+ * The following tweaks the left-most sidebar containing
+ * the list of perspectives.
  */
-symboltree entry {
-  border-left: none;
-  border-right: none;
-  border-top: none;
-  border-radius: 0px;
+perspectiveswitcher button {
+  background: transparent;
+  border-radius: 0;
+  border: none;
+  box-shadow: none;
+  padding: 6px;
 }
 
 
+
 /*
- * WORKAROUND:
+ * Layout tab and tab bar tweaks
  *
- * Currently, the separator color is wrong in GtkTextView's popup menu.
- * See https://bugzilla.gnome.org/show_bug.cgi?id=759765
+ * The following makes the layout stack header look similar to a tab bar.
+ */
+layouttabbar > box > button {
+  opacity: 0.5;
+}
+layouttabbar > box > button:hover {
+  opacity: 0.75;
+}
+layouttabbar > box > button:active {
+  opacity: 1;
+}
+layouttabbar button {
+  border: none;
+  box-shadow: none;
+  background: transparent;
+}
+layouttab label {
+  padding: 5px;
+}
+layouttab {
+  background-color: @theme_bg_color;
+
+  border-bottom: 3px;
+  border-bottom-style: solid;
+
+  border-right: 1px solid alpha(@borders, 0.75);
+  border-left: 1px solid alpha(@borders, 0.75);
+
+  border-bottom-left-radius: 3px;
+  border-bottom-right-radius: 3px;
+}
+layouttab:backdrop {
+  border-right-color: alpha(@borders, 0.75);
+  border-left-color: alpha(@borders, 0.75);
+  box-shadow: none;
+}
+layouttabbar:backdrop {
+  box-shadow: none;
+}
+layouttab separator.vertical {
+  margin-top: 7px;
+  margin-bottom: 7px;
+  opacity: 0.75;
+}
+layouttab separator.vertical:backdrop {
+  opacity: 0.3;
+}
+layouttab button:disabled,
+layouttab button {
+  background: none;
+  border: none;
+  box-shadow: none;
+  padding-left: 4px;
+  padding-right: 4px;
+}
+
+
+/*
+ * Close button styling for layouttab.
+ */
+layouttab > box > button:last-child image {
+  color: @theme_fg_color;
+  opacity: 0.3;
+  margin: 2px;
+  border: 1px solid transparent;
+  border-radius: 3px;
+}
+layouttab > box > button:last-child:hover image {
+  opacity: .75;
+  transition-duration: 250ms;
+  border: 1px solid @borders;
+}
+layouttab > box > button:last-child:active image {
+  opacity: .8;
+  background-image: linear-gradient(shade(@theme_bg_color, 0.9), @theme_bg_color);
+}
+layouttab > box > button:last-child:backdrop image {
+  opacity: .1;
+}
+
+
+/*
+ * The following tweaks the layout panel headers
+ */
+layoutpane stackswitcher button {
+  min-width: 0;
+  border: none;
+  background: transparent;
+  box-shadow: none;
+  padding: 0 3px 0 3px;
+  border-radius: 0;
+}
+
+
+/*
+ * For our pattern of popover with lists (and close buttons).
+ */
+popover list row {
+  padding: 6px;
+}
+popover list row button {
+  background: transparent;
+  border: none;
+  box-shadow: none;
+  margin: 0;
+  padding: 0;
+  opacity: 0.25;
+}
+popover list row:selected button,
+popover list row:selected button:hover {
+  color: @theme_selected_fg_color;
+}
+popover list row button:hover {
+  opacity: 1;
+}
+
+
+/*
+ * Tweaks for the editortweak popover in the editor.
+ */
+editortweak button {
+  padding: 0 6px 0 6px;
+}
+editortweak list row {
+  padding: 0;
+}
+
+
+/*
+ * Keep search bar and layouttab height in sync.
+ */
+layouttabbar > box {
+  min-height: 39px;
+}
+eggsearchbar > revealer > box {
+  min-height: 39px;
+}
+eggsearchbar entry {
+  min-height: 24px;
+}
+
+
+/*
+ * Pillbox is used to render "languages" in the greeter.
  */
-menu separator {
-  color: alpha(@borders, 0.2);
-  background-color: alpha(@borders, 0.2);
+pillbox {
+  border-radius: 3px;
 }
diff --git a/data/theme/Adwaita.css b/data/theme/Adwaita.css
index d11d241..3444de0 100644
--- a/data/theme/Adwaita.css
+++ b/data/theme/Adwaita.css
@@ -1,260 +1,58 @@
 @import url("resource:///org/gnome/builder/theme/Adwaita-shared.css");
 
 
-workbench treeview.view {
-  color: #555753;
-  background-color: #f6f7f8;
-}
-workbench treeview.view:backdrop {
-  color: #888a85;
-  background-color: #f6f7f8;
-}
-workbench treeview.view.cell:selected {
-  color: #fff;
-  background-color: #4a90d9;
-}
-
-
-pillbox {
-  background-color: #eeeeec;
-  border-radius: 3px;
-}
-
-
-RgGraph {
-  background-color: #f6f7f8;
-  background-size: 8px 8px;
-  background-image: repeating-linear-gradient(0deg, #f0f1f2, #f0f1f2 1px, transparent 1px, transparent 8px),
-                    repeating-linear-gradient(-90deg, #f0f1f2, #f0f1f2 1px, transparent 1px, transparent 
8px);
-}
-
-
-GbTerminalView {
-  background-color: #f6f7f8;
-  color: #4d4e53;
-}
-
-
-treeview.dim-label {
-  color: #9a9b98;
-}
-
-treeview:backdrop.dim-label {
-  color: #b6b7b4;
-}
-
-
-box.horizontal.search-bar {
-  background: none;
+eggsearchbar box.search-bar {
   background-color: #d6d6d6;
-  box-shadow: inset 0 2px 3px -1px #b6b6b6, 0 1px white;
-  border: none;
-  border-bottom: 1px solid #a1a1a1;
+  box-shadow: 0 4px 3px -5px #aaa inset,
+              0 -1px 0 #a1a1a1 inset;
 }
-box.horizontal.search-bar:backdrop {
-  border-color: darkgrey;
+eggsearchbar:backdrop box.search-bar {
   background-color: #d5d5d5;
   box-shadow: none;
 }
 
 
-workbench > GtkOverlay > stack > box > stackswitcher.vertical:first-child {
+perspectiveswitcher {
   background: #f4f4f4;
 }
-workbench > GtkOverlay > stack > box > stackswitcher.vertical:first-child button {
-  padding: 6px;
+perspectiveswitcher button {
   color: #bebebe;
-  background: transparent;
-  box-shadow: none;
-  border: none;
-  border-radius: 0px;
 }
-workbench > GtkOverlay > stack > box > stackswitcher.vertical:first-child button:checked {
+perspectiveswitcher button:checked,
+perspectiveswitcher button:checked:hover {
   color: #2e3436;
 }
-
-
-omnisearchrow {
-  color: #2e3436;
+perspectiveswitcher button:hover {
+  color: mix(#bebebe, #2e3436, 0.3);
 }
 
 
-
+pillbox {
+  background-color: #e1e1e1;
+  border-radius: 3px;
+}
 
 
 layouttabbar {
-  background-image: none;
   background-color: #d6d6d6;
-  border-style: none;
-  border-radius: 0px;
-  border-bottom: 1px solid #919191;
-  color: #2e3436;
-  box-shadow: 0px 5px 5px -10px #2e3436 inset;
-}
-
-layouttabbar button {
-  background-image: none;
-  background-color: transparent;
-  color: #585858;
-  border-style: none;
-  border-radius: 0px;
-  box-shadow: none;
-  padding: 9px;
+  border-bottom: 1px solid #a1a1a1;
+  box-shadow: 0 4px 3px -5px #aaa inset;
 }
-
 layouttab {
-  background-image: none;
-  background-color: transparent;
-  border-style: none;
-  border-radius: 0 0 3px 3px;
-  border-bottom: 1px solid @borders;
-  color: #c8c8c8;
-  transition-duration: 300ms;
-  transition-timing-function: ease;
+  border-bottom-color: #4a90d9;
+  box-shadow: 0 4px 3px -5px #aaa inset;
 }
-
-layoutstack.focus layouttab {
-  background-color: #e1e1e1;
-  border-bottom: 3px solid #4a90d9;
-  border-left: 1px solid #c0c0c0;
-  border-right: 1px solid #c0c0c0;
-  box-shadow: 0px 5px 5px -10px #2e3436 inset;
+layouttab:backdrop {
+  background-color: #efefef;
+  border-right-color: alpha(@borders, 0.5);
+  border-left-color: alpha(@borders, 0.5);
 }
 
-layoutstack:not(.focus) layouttab:hover {
-  background-color: transparent;
-  border-bottom: 3px solid #888a85;
-  border-left: 1px solid #c0c0c0;
-  border-right: 1px solid #c0c0c0;
-  box-shadow: 0px 5px 5px -10px #2e3436 inset;
-}
 
-layouttab button {
-  background-image: none;
-  background-color: transparent;
-  color: #919191;
-  border-style: none;
-  border-radius: 0px;
-  box-shadow: none;
+layoutpane > box.vertical:first-child > box.horizontal {
+  background: #d6d6d6;
+  box-shadow: inset 0 2px 3px -1px #b6b6b6;
 }
-
-layouttab button:disabled {
-  opacity: 0.3;
-}
-
-layouttab label {
-  color: #2e3436;
-  text-shadow: 0 1px #eeeeec;
-  margin-bottom: -2px;
-}
-
-layouttab label:hover {
-  color: black;
-}
-
-layouttab label:backdrop {
-  text-shadow: none;
-}
-
-layouttab separator {
-  margin: 7px 0 8px 0;
-  padding: 0;
-  background-color: alpha(@borders,.2);
-  min-width: 0px;
-}
-
-layoutstack.focus layouttabbar layouttab:backdrop,
-layoutstack layouttabbar layouttab:backdrop,
-layoutstack layouttabbar layouttab:hover:backdrop,
-layouttabbar:backdrop {
-  box-shadow: none;
-}
-
-layoutstack layouttab button.close {
-  border-style: solid;
-  border-radius: 5px;
-  border-width: 1px;
-  border-color: transparent;
-  color: #acadae;
-  padding: 1px;
-  margin: 0px;
-}
-
-layoutstack layouttab button.close:hover {
-  border-color: #a1a1a1;
-  color: #2e3436;
-}
-
-layoutstack layouttab button.close:active {
-  border-color: #a1a1a1;
-  background-image: linear-gradient(#d6d6d6, #e0e0e0);
-  color: #2e3436;
-  box-shadow: 0px 0px 2px #c8c8c8 inset;
-}
-
-.views-list row {
-  padding: 6px;
-}
-
-.views-list row button {
-  box-shadow: none;
-  padding: 0px;
-  border-style: none;
-  border-width: 0px;
-  background-image: none;
-  background-color: transparent;
-  color: #babdb6;
-  opacity: 0.0;
-}
-
-.views-list row:selected button {
-  color: white;
-}
-
-.views-list row:hover button {
-  opacity: 1.0;
-}
-
-
-
-/* this still needs better alignment with non-11pt cantarell */
-layoutpane > box > box:first-child {
-  background-image: none;
-  background-color: #d6d6d6;
-  border-style: none;
-  border-radius: 0px;
-  border-width: 0px;
-  color: #2e3436;
-  box-shadow: 0px 5px 5px -10px #2e3436 inset,
-              0px -1px 0px @borders inset;
-}
-
-layoutpane > box > box:first-child > stackswitcher > button {
-  background-image: none;
-  background-color: transparent;
-  border-style: none;
-  border-radius: 0px;
-  border-bottom: 3px solid transparent;
-  box-shadow: none;
-  padding: 6px 1px 7px 1px;
-  color: #888a85;
-  text-shadow: none;
-  font-weight: bold;
-  min-width: 0;
-  margin-right: 6px;
-}
-
-layoutpane > box > box:first-child > stackswitcher > button:last-child {
-  margin-right: 0px;
-}
-
-layoutpane > box > box:first-child > stackswitcher > button > label {
-  margin-top: 2px;
-  margin-bottom: -2px;
-}
-
-layoutpane > box > box:first-child > stackswitcher > button:checked {
-  border-bottom: 3px solid @theme_selected_bg_color;
-  color: #2e3436;
-  text-shadow: 0 1px #eeeeec;
+layoutpane stackswitcher button:checked {
+  box-shadow: 0 -2px 0 #4a90d9 inset;
 }
diff --git a/data/theme/shared.css b/data/theme/shared.css
index bb8bb27..e69de29 100644
--- a/data/theme/shared.css
+++ b/data/theme/shared.css
@@ -1,166 +0,0 @@
-.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;
-}
-
-
-stack.titlebar {
-  padding: 0 0 0 0;
-  border-bottom: none;
-}
-
-
-GbEditorSettingsWidget row {
-  padding: 6px;
-  border-bottom: 1px solid @borders;
-}
-GbEditorSettingsWidget row:last-child {
-  border-bottom: none;
-}
-
-
-frame.gb-search-frame {
-  background-image: linear-gradient(shade(@theme_bg_color,1.05), @theme_bg_color);
-  border-bottom-left-radius: 5px;
-  border-top-style: none;
-  font-size: 0.9em;
-  padding: 6px;
-}
-
-
-/*
- * Style selector widget.
- */
-GtkSourceStyleSchemeChooserWidget textview {
-  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;
-}
-
-
-layoutpane {
-  -IdeLayoutPane-handle-size: 1;
-  -gtk-icon-source: none;
-}
-layoutpane .pane-separator {
-  background-color: @borders;
-}
-
-
-.filtered {
-  opacity: .2;
-}
-
-
-workbench IdePreferencesPerspective IdePreferencesGroup row {
-  border-bottom: 1px solid shade(@borders, 1.2);
-  padding: 10px;
-}
-workbench IdePreferencesPerspective IdePreferencesGroup row:last-child {
-  border-bottom: none;
-}
-
-workbench IdePreferencesBin entry {
-  background: transparent;
-  box-shadow: none;
-  opacity: 0.50;
-}
-
-
-omnisearchrow {
-  background-image: none;
-  background-color: transparent;
-  padding-top: 9px;
-  padding-left: 12px;
-  padding-right: 12px;
-  padding-bottom: 9px;
-}
-
-omnisearchrow:selected {
-  background-color: @theme_selected_bg_color;
-  color: @theme_selected_fg_color;
-}
-
-
-greeter scrolledwindow frame {
-  border: 1px solid alpha(@borders, 0.4);
-}
-greeter list row {
-  border-bottom: 1px solid alpha(@borders, 0.2);
-}
-greeter list row:last-child {
-  border-bottom: none;
-}
-
-
-genesisperspective > stack > box > frame {
-  border: 1px solid alpha(@borders, 0.4);
-}
-genesisperspective > stack > box > frame > list > row {
-  border-bottom: 1px solid alpha(@borders, 0.2);
-  padding: 12px;
-}
-genesisperspective > stack > box > frame > list > row:last-child {
-  border-bottom: none;
-}
-
-
-progressbar.osd trough {
-  background-image: none;
-  background: transparent;
-  border-style: none;
-  border-radius: 0;
-}
-progressbar.osd progress {
-  border-style: none;
-  border-radius: 0;
-}
-
-
-layouttab box.navigation button:first-child {
-  padding-right: 6px;
-}
-layouttab box.navigation button:last-child {
-  padding-left: 6px;
-}
-
-
-editortweak box.indentation button {
-  padding: 0px;
-}
-editortweak box.indentation button label {
-  padding: 2px 12px 2px 12px;
-}
-
-
-
-box.build-status {
-  background-image: none;
-  background-color: shade(@theme_bg_color, 1.05);
-}
diff --git a/data/ui/ide-layout-tab.ui b/data/ui/ide-layout-tab.ui
index 29dc84e..d1f113a 100644
--- a/data/ui/ide-layout-tab.ui
+++ b/data/ui/ide-layout-tab.ui
@@ -7,6 +7,7 @@
         <property name="visible">true</property>
         <child>
           <object class="GtkBox">
+            <property name="margin-start">3</property>
             <property name="visible">true</property>
             <style>
               <class name="navigation"/>
diff --git a/data/ui/ide-workbench.ui b/data/ui/ide-workbench.ui
index 6840b1a..ecc1dc0 100644
--- a/data/ui/ide-workbench.ui
+++ b/data/ui/ide-workbench.ui
@@ -32,7 +32,7 @@
                 <property name="orientation">horizontal</property>
                 <property name="visible">true</property>
                 <child>
-                  <object class="GtkStackSwitcher" id="perspectives_stack_switcher">
+                  <object class="IdePerspectiveSwitcher" id="perspectives_stack_switcher">
                     <property name="icon-size">3</property>
                     <property name="orientation">vertical</property>
                     <property name="stack">perspectives_stack</property>
diff --git a/libide/Makefile.am b/libide/Makefile.am
index 46b8867..42fdd5f 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -302,6 +302,8 @@ libide_1_0_la_SOURCES = \
        ide-line-change-gutter-renderer.h \
        ide-line-diagnostics-gutter-renderer.c \
        ide-line-diagnostics-gutter-renderer.h \
+       ide-perspective-switcher.c \
+       ide-perspective-switcher.h \
        ide-ref-ptr.c \
        ide-ref-ptr.h \
        ide-search-reducer.c \
diff --git a/libide/ide-layout-grid.c b/libide/ide-layout-grid.c
index 4573cb5..44356e2 100644
--- a/libide/ide-layout-grid.c
+++ b/libide/ide-layout-grid.c
@@ -645,7 +645,7 @@ ide_layout_grid_set_focus (IdeLayoutGrid  *self,
       GtkStyleContext *style_context;
 
       style_context = gtk_widget_get_style_context (GTK_WIDGET (self->last_focus));
-      gtk_style_context_remove_class (style_context, "focus");
+      gtk_style_context_remove_class (style_context, "focus-stack");
       ide_clear_weak_pointer (&self->last_focus);
     }
 
@@ -654,7 +654,7 @@ ide_layout_grid_set_focus (IdeLayoutGrid  *self,
       GtkStyleContext *style_context;
 
       style_context = gtk_widget_get_style_context (GTK_WIDGET (stack));
-      gtk_style_context_add_class (style_context, "focus");
+      gtk_style_context_add_class (style_context, "focus-stack");
       ide_set_weak_pointer (&self->last_focus, stack);
     }
 }
@@ -678,7 +678,7 @@ ide_layout_grid_toplevel_set_focus (GtkWidget     *toplevel,
       GtkStyleContext *style_context;
 
       style_context = gtk_widget_get_style_context (GTK_WIDGET (self->last_focus));
-      gtk_style_context_remove_class (style_context, "focus");
+      gtk_style_context_remove_class (style_context, "focus-stack");
     }
 
   if (focus != NULL)
diff --git a/libide/ide-perspective-switcher.c b/libide/ide-perspective-switcher.c
new file mode 100644
index 0000000..378ad50
--- /dev/null
+++ b/libide/ide-perspective-switcher.c
@@ -0,0 +1,39 @@
+/* ide-perspective-switcher.c
+ *
+ * Copyright (C) 2016 Christian Hergert <christian hergert me>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ide-perspective-switcher.h"
+
+struct _IdePerspectiveSwitcher
+{
+  GtkStackSwitcher parent_instance;
+};
+
+G_DEFINE_TYPE (IdePerspectiveSwitcher, ide_perspective_switcher, GTK_TYPE_STACK_SWITCHER)
+
+static void
+ide_perspective_switcher_class_init (IdePerspectiveSwitcherClass *klass)
+{
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+  gtk_widget_class_set_css_name (widget_class, "perspectiveswitcher");
+}
+
+static void
+ide_perspective_switcher_init (IdePerspectiveSwitcher *self)
+{
+}
diff --git a/libide/ide-perspective-switcher.h b/libide/ide-perspective-switcher.h
new file mode 100644
index 0000000..8852cd1
--- /dev/null
+++ b/libide/ide-perspective-switcher.h
@@ -0,0 +1,32 @@
+/* ide-perspective-switcher.h
+ *
+ * Copyright (C) 2016 Christian Hergert <christian hergert me>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef IDE_PERSPECTIVE_SWITCHER_H
+#define IDE_PERSPECTIVE_SWITCHER_H
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define IDE_TYPE_PERSPECTIVE_SWITCHER (ide_perspective_switcher_get_type)
+
+G_DECLARE_FINAL_TYPE (IdePerspectiveSwitcher, ide_perspective_switcher, IDE, PERSPECTIVE_SWITCHER, 
GtkStackSwitcher)
+
+G_END_DECLS
+
+#endif /* IDE_PERSPECTIVE_SWITCHER_H */
diff --git a/libide/preferences/ide-preferences-bin.c b/libide/preferences/ide-preferences-bin.c
index 64a7246..37555f1 100644
--- a/libide/preferences/ide-preferences-bin.c
+++ b/libide/preferences/ide-preferences-bin.c
@@ -370,6 +370,8 @@ ide_preferences_bin_class_init (IdePreferencesBinClass *klass)
 
   g_object_class_install_properties (object_class, LAST_PROP, properties);
 
+  gtk_widget_class_set_css_name (widget_class, "preferencesbin");
+
   settings_cache = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
 }
 
diff --git a/libide/preferences/ide-preferences-flow-box.c b/libide/preferences/ide-preferences-flow-box.c
index bd2ebc8..d6ebb77 100644
--- a/libide/preferences/ide-preferences-flow-box.c
+++ b/libide/preferences/ide-preferences-flow-box.c
@@ -317,6 +317,8 @@ ide_preferences_flow_box_class_init (IdePreferencesFlowBoxClass *klass)
   widget_class->get_preferred_width = ide_preferences_flow_box_get_preferred_width;
 
   container_class->add = ide_preferences_flow_box_add;
+
+  gtk_widget_class_set_css_name (widget_class, "preferencesflowbox");
 }
 
 static void
diff --git a/libide/preferences/ide-preferences-group.c b/libide/preferences/ide-preferences-group.c
index 46a37d7..db45d97 100644
--- a/libide/preferences/ide-preferences-group.c
+++ b/libide/preferences/ide-preferences-group.c
@@ -174,6 +174,7 @@ ide_preferences_group_class_init (IdePreferencesGroupClass *klass)
   g_object_class_install_properties (object_class, LAST_PROP, properties);
 
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/builder/ui/ide-preferences-group.ui");
+  gtk_widget_class_set_css_name (widget_class, "preferencesgroup");
   gtk_widget_class_bind_template_child (widget_class, IdePreferencesGroup, box);
   gtk_widget_class_bind_template_child (widget_class, IdePreferencesGroup, list_box);
   gtk_widget_class_bind_template_child (widget_class, IdePreferencesGroup, list_box_frame);
diff --git a/libide/preferences/ide-preferences-perspective.c 
b/libide/preferences/ide-preferences-perspective.c
index b1e0e7f..338bb6c 100644
--- a/libide/preferences/ide-preferences-perspective.c
+++ b/libide/preferences/ide-preferences-perspective.c
@@ -211,6 +211,7 @@ ide_preferences_perspective_class_init (IdePreferencesPerspectiveClass *klass)
   object_class->finalize = ide_preferences_perspective_finalize;
 
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/builder/ui/ide-preferences-perspective.ui");
+  gtk_widget_class_set_css_name (widget_class, "preferences");
   gtk_widget_class_bind_template_child (widget_class, IdePreferencesPerspective, back_button);
   gtk_widget_class_bind_template_child (widget_class, IdePreferencesPerspective, page_stack_sidebar);
   gtk_widget_class_bind_template_child (widget_class, IdePreferencesPerspective, page_stack);
diff --git a/libide/search/ide-omni-search-display.c b/libide/search/ide-omni-search-display.c
index 8596181..853ad5e 100644
--- a/libide/search/ide-omni-search-display.c
+++ b/libide/search/ide-omni-search-display.c
@@ -631,6 +631,8 @@ ide_omni_search_display_class_init (IdeOmniSearchDisplayClass *klass)
                                 G_TYPE_NONE,
                                 1,
                                 IDE_TYPE_SEARCH_RESULT);
+
+  gtk_widget_class_set_css_name (widget_class, "omnisearchdisplay");
 }
 
 static void
diff --git a/libide/search/ide-omni-search-group.c b/libide/search/ide-omni-search-group.c
index 187361b..9bea3c2 100644
--- a/libide/search/ide-omni-search-group.c
+++ b/libide/search/ide-omni-search-group.c
@@ -269,25 +269,6 @@ ide_omni_search_group_select_last (IdeOmniSearchGroup *self)
     }
 }
 
-static void
-ide_omni_search_group_header_cb (GtkListBoxRow *row,
-                                 GtkListBoxRow *before,
-                                 gpointer       user_data)
-{
-  g_return_if_fail (GTK_IS_LIST_BOX_ROW (row));
-
-  if (row)
-    {
-      GtkWidget *header;
-
-      header = g_object_new (GTK_TYPE_SEPARATOR,
-                             "orientation", GTK_ORIENTATION_HORIZONTAL,
-                             "visible", TRUE,
-                             NULL);
-      gtk_list_box_row_set_header (row, header);
-    }
-}
-
 static gboolean
 ide_omni_search_group_keynav_failed (IdeOmniSearchGroup *self,
                                      GtkDirectionType    dir,
@@ -392,6 +373,7 @@ ide_omni_search_group_class_init (IdeOmniSearchGroupClass *klass)
                   IDE_TYPE_SEARCH_RESULT);
 
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/builder/ui/ide-omni-search-group.ui");
+  gtk_widget_class_set_css_name (widget_class, "omnisearchgroup");
   gtk_widget_class_bind_template_child (widget_class, IdeOmniSearchGroup, rows);
 
   quarkRow = g_quark_from_static_string ("IDE_OMNI_SEARCH_ROW");
@@ -419,7 +401,6 @@ ide_omni_search_group_init (IdeOmniSearchGroup *self)
                            G_CONNECT_SWAPPED);
 
   gtk_list_box_set_sort_func (self->rows, compare_cb, NULL, NULL);
-  gtk_list_box_set_header_func (self->rows, ide_omni_search_group_header_cb, NULL, NULL);
 }
 
 gboolean


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