Mercurial > MadButterfly
changeset 1479:92a8497d0361
Make FSM editor scrollable
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 27 Apr 2011 15:41:47 +0800 |
parents | 6fe773e62b2a |
children | e11ffd5fd609 |
files | pyink/FSM_window.glade pyink/FSM_window.py |
diffstat | 2 files changed, 9 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/pyink/FSM_window.glade Mon Apr 25 17:52:51 2011 +0800 +++ b/pyink/FSM_window.glade Wed Apr 27 15:41:47 2011 +0800 @@ -198,19 +198,11 @@ </packing> </child> <child> - <object class="GtkScrolledWindow" id="svg_scroll"> + <object class="GtkVBox" id="view_box"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> + <property name="orientation">vertical</property> <child> - <object class="GtkViewport" id="view_box"> - <property name="visible">True</property> - <property name="resize_mode">queue</property> - <child> - <placeholder/> - </child> - </object> + <placeholder/> </child> </object> <packing>
--- a/pyink/FSM_window.py Mon Apr 25 17:52:51 2011 +0800 +++ b/pyink/FSM_window.py Wed Apr 27 15:41:47 2011 +0800 @@ -450,6 +450,11 @@ def set_svg_view(self, view): self._view_box.add(view) self._view_widget = view + + root = self._root() + root.setAttribute('width', '1024') + root.setAttribute('height', '768') + view.setResize(True, 800, 600) pass def on_close_window_activate(self, *args): @@ -528,7 +533,7 @@ doc = view.doc() rdoc = doc.rdoc root_node = doc.root().repr - + line_node = rdoc.createElement('svg:line') line_node.setAttribute('x1', '10') line_node.setAttribute('y1', '10')