Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/toolbar.py
diff options
context:
space:
mode:
Diffstat (limited to 'toolbar.py')
-rw-r--r--toolbar.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/toolbar.py b/toolbar.py
index dfb3a82..8490ef5 100644
--- a/toolbar.py
+++ b/toolbar.py
@@ -80,11 +80,18 @@ class PaintToolbar(ToolbarBox):
def set_drawing(self, drawing):
self._drawing = drawing
+ self._drawing.connect('width-changed', self._width_changed_cb)
self._update_buttons()
+ def _update_width_spin(self, width):
+ self._width_spin.props.value = width
+
def _update_buttons(self):
width = self._drawing.get_stroke_width()
- self._width_spin.props.value = width
+ self._update_width_spin(width)
+
+ def _width_changed_cb(self, widget, width):
+ self._update_width_spin(width)
def _width_spin_cb(self, width_spin):
width = width_spin.get_value_as_int()