[gnome-builder] command-bar: change command bar design to be closer to firefox



commit d94521cbdf4ee598a9a5a91afc434975b642beef
Author: Christian Hergert <christian hergert me>
Date:   Fri Nov 14 19:58:56 2014 -0800

    command-bar: change command bar design to be closer to firefox
    
    The command history should probably be moved into a popover.

 src/commands/gb-command-bar.c         |    6 +--
 src/resources/css/builder.Adwaita.css |   46 +++++----------------------
 src/resources/ui/gb-command-bar.ui    |   57 +++++++++++++++++----------------
 src/resources/ui/gb-workbench.ui      |    3 +-
 4 files changed, 40 insertions(+), 72 deletions(-)
---
diff --git a/src/commands/gb-command-bar.c b/src/commands/gb-command-bar.c
index 3b9c6da..07c3bec 100644
--- a/src/commands/gb-command-bar.c
+++ b/src/commands/gb-command-bar.c
@@ -29,7 +29,6 @@ struct _GbCommandBarPrivate
 {
   GtkSizeGroup      *result_size_group;
   GtkEntry          *entry;
-  GtkFrame          *frame;
   GtkListBox        *list_box;
   GtkScrolledWindow *scroller;
 };
@@ -45,7 +44,7 @@ gb_command_bar_new (void)
 /**
  * gb_command_bar_hide:
  * @bar: A #GbCommandBar
- * 
+ *
  * Hides the command bar in an animated fashion.
  */
 void
@@ -59,7 +58,7 @@ gb_command_bar_hide (GbCommandBar *bar)
 /**
  * gb_command_bar_show:
  * @bar: A #GbCommandBar
- * 
+ *
  * Shows the command bar in an animated fashion.
  */
 void
@@ -277,7 +276,6 @@ gb_command_bar_class_init (GbCommandBarClass *klass)
                                                "/org/gnome/builder/ui/gb-command-bar.ui");
 
   gtk_widget_class_bind_template_child_private (widget_class, GbCommandBar, entry);
-  gtk_widget_class_bind_template_child_private (widget_class, GbCommandBar, frame);
   gtk_widget_class_bind_template_child_private (widget_class, GbCommandBar, list_box);
   gtk_widget_class_bind_template_child_private (widget_class, GbCommandBar, scroller);
   gtk_widget_class_bind_template_child_private (widget_class, GbCommandBar, result_size_group);
diff --git a/src/resources/css/builder.Adwaita.css b/src/resources/css/builder.Adwaita.css
index 15b6e3a..2ae0601 100644
--- a/src/resources/css/builder.Adwaita.css
+++ b/src/resources/css/builder.Adwaita.css
@@ -141,52 +141,22 @@ GtkStackSwitcher.gb-workspace-switcher > GtkRadioButton:active {
 
 
 /*
- * Command bar styling.
+ * Command Bar styling.
  */
-.gb-command-bar-frame {
-    background-color: shade (@theme_base_color, 0.8);
-    padding: 6px 6px 8px 6px;
-    border-color: shade (@theme_base_color, 0.6);
-    border-radius: 3px 3px 0 0;
-    border-width: 1px 1px 0 1px;
-    border-style: solid;
-}
-GtkEntry.gb-command-bar {
-    padding: 6px;
-    font-family: Monospace;
-}
-GtkLabel.gb-command-bar-placeholder {
-    font-size: 1.2em;
-    font-weight: bold;
-    color: shade (@theme_base_color, 0.5);
-}
-GbCommandBarItem .gb-command-bar-item-command {
-    font-size: 1.1em;
-    font-family: Monospace;
-}
-GbCommandBarItem .gb-command-bar-item-result {
-    font-size: 1.1em;
-    font-family: Monospace;
-}
-GbCommandBarItem .gb-command-bar-item-equal {
-    font-size: 1.2em;
-    font-weight: bold;
-    color: shade (@theme_base_color, 0.5);
-    padding-left: 12px;
-    padding-right: 12px;
-    font-family: Monospace;
-}
-
-GtkBox.shift-bar {
+GbCommandBar GtkBox {
     border: none;
     background-image: linear-gradient(to bottom, #2e3436, #555753 10%);
     box-shadow: none;
-    color: #eeeeec;
     font-family: Monospace;
 }
 
-GtkBox.shift-bar GtkEntry {
+GbCommandBar GtkLabel {
+    color: #eeeeec;
+}
+
+GbCommandBar GtkEntry {
     background-image: none;
     padding: 6px 6px 6px 6px;
+    color: #eeeeec;
 }
 
diff --git a/src/resources/ui/gb-command-bar.ui b/src/resources/ui/gb-command-bar.ui
index 386b43f..6bf0e4d 100644
--- a/src/resources/ui/gb-command-bar.ui
+++ b/src/resources/ui/gb-command-bar.ui
@@ -6,50 +6,51 @@
     <property name="reveal-child">False</property>
     <property name="can-focus">False</property>
     <child>
-      <object class="GtkFrame" id="frame">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
-        <property name="can-focus">False</property>
-        <property name="vexpand">True</property>
-        <style>
-          <class name="gb-command-bar-frame"/>
-        </style>
+        <property name="orientation">vertical</property>
         <child>
-          <object class="GtkBox" id="vbox1">
-            <property name="visible">True</property>
-            <property name="orientation">vertical</property>
+          <object class="GtkScrolledWindow" id="scroller">
+            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+            <property name="visible">False</property>
+            <property name="expand">True</property>
+            <property name="height_request">300</property>
             <child>
-              <object class="GtkScrolledWindow" id="scroller">
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+              <object class="GtkListBox" id="list_box">
                 <property name="visible">True</property>
                 <property name="expand">True</property>
-                <property name="height_request">300</property>
-                <child>
-                  <object class="GtkListBox" id="list_box">
-                    <property name="visible">True</property>
-                    <property name="expand">True</property>
-                    <property name="selection_mode">GTK_SELECTION_NONE</property>
-                  </object>
-                  <style>
-                    <class name="view"/>
-                  </style>
-                </child>
+                <property name="selection_mode">GTK_SELECTION_NONE</property>
               </object>
+              <style>
+                <class name="view"/>
+              </style>
             </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkSeparator" id="hsep1">
+            <property name="orientation">horizontal</property>
+            <property name="visible">False</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="visible">True</property>
+            <property name="orientation">horizontal</property>
+            <property name="spacing">3</property>
             <child>
-              <object class="GtkSeparator" id="hsep1">
-                <property name="orientation">horizontal</property>
+              <object class="GtkLabel">
                 <property name="visible">True</property>
+                <property name="label">&gt;&gt;</property>
+                <property name="margin-start">6</property>
               </object>
             </child>
             <child>
               <object class="GtkEntry" id="entry">
                 <property name="visible">True</property>
-                <property name="expand">False</property>
+                <property name="hexpand">True</property>
                 <property name="valign">end</property>
                 <property name="has_frame">False</property>
-                <style>
-                  <class name="gb-command-bar"/>
-                </style>
               </object>
             </child>
           </object>
diff --git a/src/resources/ui/gb-workbench.ui b/src/resources/ui/gb-workbench.ui
index 5532b51..7856009 100644
--- a/src/resources/ui/gb-workbench.ui
+++ b/src/resources/ui/gb-workbench.ui
@@ -164,9 +164,8 @@
         <property name="visible">True</property>
         <child type="overlay">
           <object class="GbCommandBar" id="command_bar">
-            <property name="width-request">500</property>
             <property name="transition-type">GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP</property>
-            <property name="halign">center</property>
+            <property name="halign">fill</property>
             <property name="valign">end</property>
             <property name="visible">True</property>
           </object>


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