[gnome-software] Fix color of add button on add to app folder dialog



commit 5fa5a35e97a302d6328f69651fdd2230f1df5613
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Fri Dec 19 13:42:55 2014 -0600

    Fix color of add button on add to app folder dialog
    
    This button should be blue when sensitive.
    
    Instead of manually packing the buttons into the header bar, let GTK+
    handle them, so we don't screw with its heuristics for setting the color
    of the buttons.
    
    https://developer.gnome.org/Dialogs/
    
    https://bugzilla.gnome.org/show_bug.cgi?id=741781

 src/app-folder-dialog.ui |   56 +++++++++++++++------------------------------
 1 files changed, 19 insertions(+), 37 deletions(-)
---
diff --git a/src/app-folder-dialog.ui b/src/app-folder-dialog.ui
index 992eeca..d1cc066 100644
--- a/src/app-folder-dialog.ui
+++ b/src/app-folder-dialog.ui
@@ -7,44 +7,22 @@
     <property name="type-hint">dialog</property>
     <property name="modal">True</property>
     <property name="resizable">True</property>
-    <child type="titlebar">
-      <object class="GtkHeaderBar" id="header">
+    <property name="use_header_bar">1</property>
+    <child type="action">
+      <object class="GtkButton" id="cancel_button">
         <property name="visible">True</property>
-        <property name="has-subtitle">False</property>
-        <child type="title">
-          <object class="GtkLabel" id="title">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">Add to Application Folder</property>
-            <style>
-              <class name="title"/>
-            </style>
-          </object>
-        </child>
-        <child>
-          <object class="GtkButton" id="cancel_button">
-            <property name="visible">True</property>
-            <property name="use_underline">True</property>
-            <property name="label" translatable="yes">_Cancel</property>
-          </object>
-          <packing>
-            <property name="pack_type">start</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButton" id="done_button">
-            <property name="visible">True</property>
-            <property name="sensitive">False</property>
-            <property name="use_underline">True</property>
-            <property name="label" translatable="yes">_Add</property>
-            <property name="receives_default">True</property>
-            <style>
-              <class name="suggested-action"/>
-            </style>
-          </object>
-          <packing>
-            <property name="pack_type">end</property>
-          </packing>
-        </child>
+        <property name="use_underline">True</property>
+        <property name="label" translatable="yes">_Cancel</property>
+      </object>
+    </child>
+    <child type="action">
+      <object class="GtkButton" id="done_button">
+        <property name="visible">True</property>
+        <property name="sensitive">False</property>
+        <property name="use_underline">True</property>
+        <property name="label" translatable="yes">_Add</property>
+        <property name="can_default">True</property>
+        <property name="receives_default">True</property>
       </object>
     </child>
     <child internal-child="vbox">
@@ -85,5 +63,9 @@
         </child>
       </object>
     </child>
+    <action-widgets>
+      <action-widget response="cancel">cancel_button</action-widget>
+      <action-widget response="apply" default="true">done_button</action-widget>
+    </action-widgets>
   </template>
 </interface>


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