[meld] diffmap: Update Diffmap to match its scrollbar's width
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] diffmap: Update Diffmap to match its scrollbar's width
- Date: Mon, 30 Dec 2013 21:22:09 +0000 (UTC)
commit b7da4b58f28294169706b26c38f426f2df86a041
Author: Kai Willadsen <kai willadsen gmail com>
Date: Mon Dec 30 07:36:07 2013 +1000
diffmap: Update Diffmap to match its scrollbar's width
meld/diffmap.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/meld/diffmap.py b/meld/diffmap.py
index 9cbb35b..77492cb 100644
--- a/meld/diffmap.py
+++ b/meld/diffmap.py
@@ -38,6 +38,7 @@ class DiffMap(Gtk.DrawingArea):
self._scroll_y = 0
self._scroll_height = 0
self._setup = False
+ self._width = 10
def setup(self, scrollbar, change_chunk_fn, color_map):
for (o, h) in self._handlers:
@@ -100,7 +101,8 @@ class DiffMap(Gtk.DrawingArea):
def on_scrollbar_size_allocate(self, scrollbar, allocation):
self._scroll_y = allocation.y
self._scroll_height = allocation.height
- self.queue_draw()
+ self._width = allocation.width
+ self.queue_resize()
def do_draw(self, context):
if not self._setup:
@@ -155,4 +157,4 @@ class DiffMap(Gtk.DrawingArea):
return False
def do_get_preferred_width(self):
- return 20, 20
+ return self._width, self._width
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]