Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorManuel QuiƱones <manuq@laptop.org>2012-09-25 02:31:14 (GMT)
committer Simon Schampijer <simon@laptop.org>2012-09-25 14:15:28 (GMT)
commit42fc93826f0d28c9cd43194df16c1fa47f930b2f (patch)
treeec1c08e00d27b45ef681df8c0d643060994d1078 /src
parent9ba0a8b04d5cbb43f6bea7061221993873dbbf2f (diff)
Fix layout of Clear search button in Journal and Activity List - SL #3809
To do it, add the button to a ButtonBox with layout Gtk.ButtonBoxStyle.CENTER. Signed-off-by: Manuel QuiƱones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'src')
-rw-r--r--src/jarabe/desktop/activitieslist.py7
-rw-r--r--src/jarabe/journal/listview.py7
2 files changed, 12 insertions, 2 deletions
diff --git a/src/jarabe/desktop/activitieslist.py b/src/jarabe/desktop/activitieslist.py
index b111164..b830526 100644
--- a/src/jarabe/desktop/activitieslist.py
+++ b/src/jarabe/desktop/activitieslist.py
@@ -333,11 +333,16 @@ class ClearMessageBox(Gtk.EventBox):
box.pack_start(label, expand=True, fill=False, padding=0)
label.show()
+ button_box = Gtk.HButtonBox()
+ button_box.set_layout(Gtk.ButtonBoxStyle.CENTER)
+ box.pack_start(button_box, False, True, 0)
+ button_box.show()
+
button = Gtk.Button(label=_('Clear search'))
button.connect('clicked', button_callback)
button.props.image = Icon(icon_name='dialog-cancel',
icon_size=Gtk.IconSize.BUTTON)
- box.pack_start(button, expand=True, fill=False, padding=0)
+ button_box.pack_start(button, expand=True, fill=False, padding=0)
button.show()
diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
index 46c3440..917beb0 100644
--- a/src/jarabe/journal/listview.py
+++ b/src/jarabe/journal/listview.py
@@ -403,11 +403,16 @@ class BaseListView(Gtk.Bin):
box.pack_start(label, expand=True, fill=False, padding=0)
if show_clear_query:
+ button_box = Gtk.HButtonBox()
+ button_box.set_layout(Gtk.ButtonBoxStyle.CENTER)
+ box.pack_start(button_box, False, True, 0)
+ button_box.show()
+
button = Gtk.Button(label=_('Clear search'))
button.connect('clicked', self.__clear_button_clicked_cb)
button.props.image = Icon(icon_name='dialog-cancel',
icon_size=Gtk.IconSize.BUTTON)
- box.pack_start(button, expand=True, fill=False, padding=0)
+ button_box.pack_start(button, expand=True, fill=False, padding=0)
background_box.show_all()