Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Quiñones <manuq@laptop.org>2012-10-26 18:32:36 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2012-11-01 12:06:21 (GMT)
commitbb71f181e6ee5b05daaf8c167fc55610ece9baa3 (patch)
treebd545aa5c1e7d540ed2deb73a4a3ebaaa4efc750
parentccf965e462f3c3440e418949af7c4b750439ad50 (diff)
Journal details view: correct spacing of metadata - SL #3956
- Align the metadata next to the preview image, packing it with expand=False. - Get back style.DEFAULT_SPACING between the metadata lines. This was introduced in the hippo removal, d9fbf9db. Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r--src/jarabe/journal/expandedentry.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/jarabe/journal/expandedentry.py b/src/jarabe/journal/expandedentry.py
index eda4c4e..19e8144 100644
--- a/src/jarabe/journal/expandedentry.py
+++ b/src/jarabe/journal/expandedentry.py
@@ -112,7 +112,7 @@ class ExpandedEntry(Gtk.EventBox):
first_column.pack_start(self._preview_box, False, True, 0)
self._technical_box = Gtk.VBox()
- first_column.pack_start(self._technical_box, True, False, 0)
+ first_column.pack_start(self._technical_box, False, False, 0)
# Second body column
description_box, self._description = self._create_description()
@@ -265,20 +265,22 @@ class ExpandedEntry(Gtk.EventBox):
vbox = Gtk.VBox()
vbox.props.spacing = style.DEFAULT_SPACING
- label = \
- _('Kind: %s') % (self._metadata.get('mime_type') or \
- _('Unknown'),) + '\n' + \
- _('Date: %s') % (self._format_date(),) + '\n' + \
+ lines = [
+ _('Kind: %s') % (self._metadata.get('mime_type') or _('Unknown'),),
+ _('Date: %s') % (self._format_date(),),
_('Size: %s') % (format_size(int(self._metadata.get(
'filesize',
model.get_file_size(self._metadata['uid'])))))
+ ]
- text = Gtk.Label()
- text.set_markup('<span foreground="%s">%s</span>' % (
- style.COLOR_BUTTON_GREY.get_html(), label))
- halign = Gtk.Alignment.new(0, 0, 0, 0)
- halign.add(text)
- vbox.pack_start(halign, False, False, 0)
+ for line in lines:
+ linebox = Gtk.HBox()
+ vbox.pack_start(linebox, False, False, 0)
+
+ text = Gtk.Label()
+ text.set_markup('<span foreground="%s">%s</span>' % (
+ style.COLOR_BUTTON_GREY.get_html(), line))
+ linebox.pack_start(text, False, False, 0)
return vbox