[pitivi] medialibrary: Make the icon view items really compact
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] medialibrary: Make the icon view items really compact
- Date: Sun, 2 Sep 2012 04:04:36 +0000 (UTC)
commit 76f717c83cb6b8dd7396624d21c1cb0142f9e1ff
Author: Renà Stadler <mail renestadler de>
Date: Mon Aug 27 17:16:42 2012 -0700
medialibrary: Make the icon view items really compact
Instead of wasting space (what set_item_width does).
pitivi/medialibrary.py | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 142f98f..eafeea8 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -385,10 +385,25 @@ class MediaLibraryWidget(gtk.VBox, Loggable):
self.iconview.set_orientation(gtk.ORIENTATION_VERTICAL)
self.iconview.set_property("has_tooltip", True)
self.iconview.set_tooltip_column(COL_INFOTEXT)
- self.iconview.set_text_column(COL_SHORT_TEXT)
- self.iconview.set_pixbuf_column(COL_ICON_LARGE)
+ self.iconview.props.item_padding = 3
+ self.iconview.props.margin = 3
+
+ cell = gtk.CellRendererPixbuf()
+ self.iconview.pack_start(cell, False)
+ self.iconview.add_attribute(cell, "pixbuf", COL_ICON_LARGE)
+
+ cell = gtk.CellRendererText()
+ cell.props.alignment = pango.ALIGN_CENTER
+ cell.props.xalign = 0.5
+ cell.props.yalign = 0.0
+ cell.props.xpad = 0
+ cell.props.ypad = 0
+ cell.props.width = 128
+ cell.props.wrap_width = 128
+ self.iconview.pack_start(cell, False)
+ self.iconview.add_attribute(cell, "text", COL_SHORT_TEXT)
+
self.iconview.set_selection_mode(gtk.SELECTION_MULTIPLE)
- self.iconview.set_item_width(138) # Needs to be icon width +10
# Explanatory message InfoBar
self.infobar = gtk.InfoBar()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]