From 9f6070b4e2acbbcb7e8f430179c5b46375b43f2d Mon Sep 17 00:00:00 2001 From: Manuel QuiƱones Date: Thu, 28 Jun 2012 13:22:23 +0000 Subject: Revert "Set correct paddings in the Journal Detail View" This reverts commit c4aacc9f38376c87f5914d465fce0339e7e0b387. Is better to leave the styling of the Journal Detail View as a task after the switch to GTK+3, as explained here: http://wiki.sugarlabs.org/go/Features/GTK3/Shell/Hippo_Removal#Journal_Detail_View --- diff --git a/src/jarabe/journal/expandedentry.py b/src/jarabe/journal/expandedentry.py index 3cc14e0..b69cd10 100644 --- a/src/jarabe/journal/expandedentry.py +++ b/src/jarabe/journal/expandedentry.py @@ -70,54 +70,37 @@ class ExpandedEntry(gtk.EventBox): self.modify_bg(gtk.STATE_NORMAL, style.COLOR_WHITE.get_gdk_color()) # Create a header - header_alignment = gtk.Alignment(0, 0, 1, 1) - header_alignment.set_padding(padding_top=style.DEFAULT_PADDING, - padding_bottom=style.DEFAULT_PADDING, - padding_left=style.DEFAULT_PADDING, - padding_right=style.GRID_CELL_SIZE) - self._vbox.pack_start(header_alignment, True, True, 0) header = gtk.HBox() - header.set_spacing(style.DEFAULT_SPACING) - header_alignment.add(header) + self._vbox.pack_start(header, False, False, style.DEFAULT_SPACING * 2) # Create a two-column body body_box = gtk.EventBox() + body_box.set_border_width(style.DEFAULT_SPACING) body_box.modify_bg(gtk.STATE_NORMAL, style.COLOR_WHITE.get_gdk_color()) self._vbox.pack_start(body_box) - - body_alignment = gtk.Alignment(0, 0, 1, 1) - body_alignment.set_padding(padding_top=style.DEFAULT_SPACING * 3, - padding_bottom=0, - padding_left=style.GRID_CELL_SIZE, - padding_right=style.GRID_CELL_SIZE) - body_box.add(body_alignment) - body = gtk.HBox() - body.set_spacing(style.DEFAULT_SPACING * 3) - body_alignment.add(body) + body_box.add(body) first_column = gtk.VBox() - first_column.set_spacing(style.DEFAULT_SPACING) - body.pack_start(first_column, False, False, 0) + body.pack_start(first_column, False, False, style.DEFAULT_SPACING) second_column = gtk.VBox() - second_column.set_spacing(style.DEFAULT_SPACING) body.pack_start(second_column) # Header self._keep_icon = self._create_keep_icon() - header.pack_start(self._keep_icon, False, False, 0) + header.pack_start(self._keep_icon, False, False, style.DEFAULT_SPACING) self._icon = None self._icon_box = gtk.HBox() - header.pack_start(self._icon_box, False, False, 0) + header.pack_start(self._icon_box, False, False, style.DEFAULT_SPACING) self._title = self._create_title() header.pack_start(self._title) # TODO: create a version list popup instead of a date label self._date = self._create_date() - header.pack_start(self._date, False, False, 0) + header.pack_start(self._date, False, False, style.DEFAULT_SPACING) if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL: header.reverse() @@ -131,10 +114,12 @@ class ExpandedEntry(gtk.EventBox): # Second body column description_box, self._description = self._create_description() - second_column.pack_start(description_box, True, True, 0) + second_column.pack_start(description_box, True, True, + style.DEFAULT_SPACING) tags_box, self._tags = self._create_tags() - second_column.pack_start(tags_box, True, True, 0) + second_column.pack_start(tags_box, True, True, + style.DEFAULT_SPACING) self._buddy_list = gtk.VBox() second_column.pack_start(self._buddy_list) @@ -162,7 +147,7 @@ class ExpandedEntry(gtk.EventBox): self._technical_box.foreach(self._technical_box.remove) self._technical_box.pack_start(self._create_technical(), - False, False, 0) + False, False, style.DEFAULT_SPACING) self._buddy_list.foreach(self._buddy_list.remove) self._buddy_list.pack_start(self._create_buddy_list(), False, False, @@ -261,8 +246,8 @@ class ExpandedEntry(gtk.EventBox): label = \ _('Kind: %s') % (self._metadata.get('mime_type') or \ - _('Unknown'),) + '\n\n' + \ - _('Date: %s') % (self._format_date(),) + '\n\n' + \ + _('Unknown'),) + '\n' + \ + _('Date: %s') % (self._format_date(),) + '\n' + \ _('Size: %s') % (format_size(int(self._metadata.get( 'filesize', model.get_file_size(self._metadata['uid']))))) -- cgit v0.9.1