Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/readactivity.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-08-16 12:58:29 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-08-16 12:58:29 (GMT)
commit7ce9a8125303c9b2cd0ae79193a25f61a497d50a (patch)
treefb4b3f4db0b6af3f3c34624fbef0f4396f4ddb13 /readactivity.py
parentd38162a2497dd5903fc43f35cbb20127e302967e (diff)
Align the bookmark panel to the scrollbar.
Is using a hack. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'readactivity.py')
-rw-r--r--readactivity.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/readactivity.py b/readactivity.py
index 7decd10..909739c 100644
--- a/readactivity.py
+++ b/readactivity.py
@@ -267,7 +267,14 @@ class ReadActivity(activity.Activity):
self._sidebar.props.halign = Gtk.Align.END
self._sidebar.props.valign = Gtk.Align.START
- self._sidebar.props.margin_right = style.GRID_CELL_SIZE / 2
+ # HACK: This is to calculate the scrollbar width
+ # defined in sugar-artwork gtk-widgets.css.em
+ if style.zoom(1):
+ scrollbar_width = 15
+ else:
+ scrollbar_width = 11
+
+ self._sidebar.props.margin_right = scrollbar_width
overlay.add_overlay(self._sidebar)
overlay.show()
self._vbox.pack_start(overlay, True, True, 0)