From 03c29618313af80978396693ffcddbab4ace5285 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Mon, 12 Dec 2011 03:24:47 +0400
Subject: [PATCH 4/4] Fix search tab label

* Put all buttons into alignments with 0 scale, to prevent them from
  scaling vertically every time tab gets bigger due to being focused
* Put all buttons into a size group to force them to have the same size

I'm still not happy with the way labels are resized (or rather NOT
resized)
---
 contrib/gnunet_fs_gtk_search_tab.glade |  109 ++++++++++++++++++++++----------
 1 files changed, 75 insertions(+), 34 deletions(-)

diff --git a/contrib/gnunet_fs_gtk_search_tab.glade b/contrib/gnunet_fs_gtk_search_tab.glade
index 9a8fa61..196a60d 100644
--- a/contrib/gnunet_fs_gtk_search_tab.glade
+++ b/contrib/gnunet_fs_gtk_search_tab.glade
@@ -172,22 +172,30 @@
           </object>
           <packing>
             <property name="expand">True</property>
-            <property name="fill">False</property>
+            <property name="fill">True</property>
             <property name="padding">5</property>
             <property name="position">0</property>
           </packing>
         </child>
         <child>
-          <object class="GtkButton" id="_search_result_label_play_button">
-            <property name="use_action_appearance">False</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
+          <object class="GtkAlignment" id="_search_result_label_play_button_alignment">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xscale">0</property>
+            <property name="yscale">0</property>
             <child>
-              <object class="GtkImage" id="play_icon_stock_image">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="stock">gtk-media-play</property>
-                <property name="icon-size">2</property>
+              <object class="GtkButton" id="_search_result_label_play_button">
+                <property name="use_action_appearance">False</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <child>
+                  <object class="GtkImage" id="play_icon_stock_image">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-media-play</property>
+                    <property name="icon-size">2</property>
+                  </object>
+                </child>
               </object>
             </child>
           </object>
@@ -198,17 +206,25 @@
           </packing>
         </child>
         <child>
-          <object class="GtkButton" id="_search_result_label_pause_button">
-            <property name="use_action_appearance">False</property>
+          <object class="GtkAlignment" id="_search_result_label_pause_button_alignment">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
+            <property name="can_focus">False</property>
+            <property name="xscale">0</property>
+            <property name="yscale">0</property>
             <child>
-              <object class="GtkImage" id="pause_icon_stock_image">
+              <object class="GtkButton" id="_search_result_label_pause_button">
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="stock">gtk-media-pause</property>
-                <property name="icon-size">2</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <child>
+                  <object class="GtkImage" id="pause_icon_stock_image">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-media-pause</property>
+                    <property name="icon-size">2</property>
+                  </object>
+                </child>
               </object>
             </child>
           </object>
@@ -219,16 +235,24 @@
           </packing>
         </child>
         <child>
-          <object class="GtkButton" id="_search_result_label_clear_button">
-            <property name="use_action_appearance">False</property>
+          <object class="GtkAlignment" id="_search_result_label_clear_button_alignment">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
+            <property name="can_focus">False</property>
+            <property name="xscale">0</property>
+            <property name="yscale">0</property>
             <child>
-              <object class="GtkImage" id="clear_icon_stock_image">
+              <object class="GtkButton" id="_search_result_label_clear_button">
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="stock">gtk-clear</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <child>
+                  <object class="GtkImage" id="clear_icon_stock_image">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-clear</property>
+                  </object>
+                </child>
               </object>
             </child>
           </object>
@@ -240,18 +264,26 @@
           </packing>
         </child>
         <child>
-          <object class="GtkButton" id="_search_result_label_close_button">
-            <property name="use_action_appearance">False</property>
+          <object class="GtkAlignment" id="_search_result_label_close_button_alignment">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <property name="relief">half</property>
+            <property name="can_focus">False</property>
+            <property name="xscale">0</property>
+            <property name="yscale">0</property>
             <child>
-              <object class="GtkImage" id="close_icon_stock_image">
+              <object class="GtkButton" id="_search_result_label_close_button">
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="stock">gtk-close</property>
-                <property name="icon-size">2</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="relief">half</property>
+                <child>
+                  <object class="GtkImage" id="close_icon_stock_image">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="stock">gtk-close</property>
+                    <property name="icon-size">2</property>
+                  </object>
+                </child>
               </object>
             </child>
           </object>
@@ -264,4 +296,13 @@
       </object>
     </child>
   </object>
+  <object class="GtkSizeGroup" id="_search_result_label_buttons_size_group">
+    <property name="mode">both</property>
+    <widgets>
+      <widget name="_search_result_label_play_button"/>
+      <widget name="_search_result_label_pause_button"/>
+      <widget name="_search_result_label_clear_button"/>
+      <widget name="_search_result_label_close_button"/>
+    </widgets>
+  </object>
 </interface>
-- 
1.7.4

