[gnome-builder] omnibar: set background color while building



commit 90a206cbb9897ec1969508c3762e49634d19c004
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jul 22 20:37:20 2017 -0700

    omnibar: set background color while building

 data/themes/shared.css                |   19 -------------------
 data/themes/shared/shared-omnibar.css |   14 ++++++++++++++
 libide/workbench/ide-omni-bar.c       |    6 ++++++
 3 files changed, 20 insertions(+), 19 deletions(-)
---
diff --git a/data/themes/shared.css b/data/themes/shared.css
index 11830c4..3c3ebdd 100644
--- a/data/themes/shared.css
+++ b/data/themes/shared.css
@@ -150,25 +150,6 @@ popover.popover-selector list row .accel:dir(rtl) {
 }
 
 
-popover.omnibar list row {
-  border-bottom: 1px solid alpha(@borders, 0.4);
-}
-popover.omnibar list row:last-child {
-  border-bottom: none;
-}
-
-
-omnibar entry {
-  background-color: @theme_bg_color;
-  color: alpha(@theme_fg_color, 0.8);
-}
-omnibar:hover entry,
-omnibar:active entry {
-  background-color: mix(@theme_bg_color, @content_view_bg, 0.9);
-  color: @theme_fg_color;
-}
-
-
 buildperspective list.sidebar row:selected button:hover {
   border-color: transparent;
   box-shadow: none;
diff --git a/data/themes/shared/shared-omnibar.css b/data/themes/shared/shared-omnibar.css
index 01f1abd..b333de9 100644
--- a/data/themes/shared/shared-omnibar.css
+++ b/data/themes/shared/shared-omnibar.css
@@ -6,3 +6,17 @@ popover.messagepopover label.success {
   color: shade(@success_color, 0.8);
   font-weight: bold;
 }
+omnibar entry {
+  background-color: @theme_bg_color;
+  color: alpha(@theme_fg_color, 0.8);
+}
+omnibar.building:active entry,
+omnibar.building entry {
+  background-color: mix(@warning_color, @theme_bg_color, 0.9);
+  color: alpha(@theme_fg_color, 0.8);
+}
+omnibar:hover entry,
+omnibar:active entry {
+  background-color: mix(@theme_bg_color, @content_view_bg, 0.9);
+  color: @theme_fg_color;
+}
diff --git a/libide/workbench/ide-omni-bar.c b/libide/workbench/ide-omni-bar.c
index ab5b59f..079d32f 100644
--- a/libide/workbench/ide-omni-bar.c
+++ b/libide/workbench/ide-omni-bar.c
@@ -407,6 +407,8 @@ ide_omni_bar__build_manager__build_started (IdeOmniBar       *self,
   gtk_label_set_attributes (self->popover_build_result_label, NULL);
   dzl_gtk_widget_remove_style_class (GTK_WIDGET (self->popover_build_result_label), "error");
   dzl_gtk_widget_remove_style_class (GTK_WIDGET (self->popover_build_result_label), "success");
+
+  dzl_gtk_widget_add_style_class (GTK_WIDGET (self), "building");
 }
 
 static void
@@ -420,6 +422,8 @@ ide_omni_bar__build_manager__build_failed (IdeOmniBar       *self,
 
   gtk_label_set_label (self->popover_build_result_label, _("Failed"));
   dzl_gtk_widget_add_style_class (GTK_WIDGET (self->popover_build_result_label), "error");
+
+  dzl_gtk_widget_remove_style_class (GTK_WIDGET (self), "building");
 }
 
 static void
@@ -433,6 +437,8 @@ ide_omni_bar__build_manager__build_finished (IdeOmniBar       *self,
 
   gtk_label_set_label (self->popover_build_result_label, _("Success"));
   dzl_gtk_widget_add_style_class (GTK_WIDGET (self->popover_build_result_label), "success");
+
+  dzl_gtk_widget_remove_style_class (GTK_WIDGET (self), "building");
 }
 
 static void


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