View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000563 | ascend | canvas-gui | public | 2012-08-16 10:16 | 2013-05-05 13:07 |
Reporter | john | ||||
Assigned To | saheb | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | assigned | Resolution | open | ||
Product Version | 0.9.8 | ||||
Target Version | 0.9.9 | Fixed in Version | |||
Summary | 0000563: canvas does not expand to fill window when window is resized | ||||
Description | When the main canvas window is resized, the canvas should expand to fill the space. Currently, the error panel is the bit that expands, but that's usually not what you want. | ||||
Tags | No tags attached. | ||||
|
I modified fill/expand options and added a callback function for updating the size of the canvas on resizing. |
|
0000563.patch (2,302 bytes)
Index: pygtk/canvas/blocklist.py =================================================================== --- pygtk/canvas/blocklist.py (revision 4460) +++ pygtk/canvas/blocklist.py (working copy) @@ -144,8 +144,11 @@ </toolbar> </ui> ''' - - def __init__(self,library,options=None): + def configure_event(self,view,window): + width = self.get_size()[0] + height = self.get_size()[1] + self.view.set_size_request(int(0.75*width),int(0.68*height)) + def __init__(self,library,opentions=None): """ Initialise the application -- create all the widgets, and populate the icon palette. @@ -166,7 +169,6 @@ self.iconinfo = self.render_icon(gtk.STOCK_DIALOG_INFO,gtk.ICON_SIZE_MENU) self.iconwarning = self.render_icon(gtk.STOCK_DIALOG_WARNING,gtk.ICON_SIZE_MENU) self.iconerror = self.render_icon(gtk.STOCK_DIALOG_ERROR,gtk.ICON_SIZE_MENU) - self.set_title("ASCEND Canvas Modeller") self.set_default_size(650,650) self.connect("destroy", gtk.main_quit) @@ -284,6 +286,7 @@ self.view.canvas = canvas self.view.zoom(1) self.view.set_size_request(600, 450) + self.view.connect('configure-event', self.configure_event) hs = gtk.HScrollbar(self.view.hadjustment) vs = gtk.VScrollbar(self.view.vadjustment) t.attach(self.view, 0, 1, 0, 1) @@ -305,7 +308,7 @@ paned.pack2(t, True, True) vbox.pack_start(paned, True, True) vpane = gtk.VPaned() - vpane.pack1(vbox) + vpane.pack1(vbox, True, True) lower_vbox = gtk.VBox() self.ET = errorreporter.ErrorReporter( self.reporter,self.iconok,self.iconinfo,self.iconwarning,self.iconerror) @@ -316,9 +319,9 @@ scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC) scrolledwindow.add(self.ET.errorview) self.notebook.append_page(scrolledwindow, label) - lower_vbox.pack_start(self.notebook,True, True) + lower_vbox.pack_start(self.notebook,False, False) lower_vbox.pack_start(self.status, False, False) - vpane.pack2(lower_vbox) + vpane.pack2(lower_vbox, resize=False) self.undo_manager = undo.undoManager(self) self.undo_manager.start() |
|
Hi Saket, Is your patch for trunk or for the saheb-canvas branch? As I recall this bug might have already been fixed in trunk (perhaps around changeset 4446) and I apologise for not updating this bug if that's correct. Cheers JP |
|
Hi John, Yes the patch was for saheb-trunk branch. Saket |
|
??? |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-08-16 10:16 | john | New Issue | |
2012-08-16 10:16 | john | Status | new => assigned |
2012-08-16 10:16 | john | Assigned To | => saheb |
2013-02-26 13:42 | john | Target Version | => 0.9.9 |
2013-04-24 17:55 | saketkc1 | Note Added: 0000968 | |
2013-04-24 17:56 | saketkc1 | File Added: 0000563.patch | |
2013-05-01 22:56 | john | Note Added: 0000972 | |
2013-05-05 00:47 | saketkc1 | Note Added: 0000973 | |
2013-05-05 13:07 | john | Note Added: 0000974 |