[GRASS-SVN] r67635 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jan 23 05:49:15 PST 2016
Author: martinl
Date: 2016-01-23 05:49:15 -0800 (Sat, 23 Jan 2016)
New Revision: 67635
Modified:
grass/trunk/gui/wxpython/gui_core/dialogs.py
Log:
wxGUI: pretify quit dialog
Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py 2016-01-23 12:45:42 UTC (rev 67634)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py 2016-01-23 13:49:15 UTC (rev 67635)
@@ -2104,7 +2104,7 @@
class QuitDialog(wx.Dialog):
def __init__(self, parent, title=_("Quit GRASS GIS"), id=wx.ID_ANY,
style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER,
- size=(350, 150), **kwargs):
+ size=(350, 125), **kwargs):
"""Dialog to quit GRASS
:param parent: window
@@ -2112,6 +2112,9 @@
wx.Dialog.__init__(self, parent, id, title, style=style, **kwargs)
self.panel = wx.Panel(parent = self, id = wx.ID_ANY)
+ self._icon = wx.StaticBitmap(parent=self.panel, id=wx.ID_ANY,
+ bitmap=wx.ArtProvider().GetBitmap(wx.ART_QUESTION, client=wx.ART_MESSAGE_BOX))
+
self.informLabel = wx.StaticText(parent=self.panel, id=wx.ID_ANY,
label=_("Do you want to quit GRASS including shell "
"prompt or just close the GUI?"))
@@ -2139,8 +2142,12 @@
btnSizer.Add(item=self.btnClose, flag=wx.RIGHT, border=5)
btnSizer.Add(item=self.btnQuit, flag=wx.RIGHT, border=5)
- sizer.Add(item = self.informLabel, proportion = 1,
- flag = wx.EXPAND | wx.ALL, border = 25)
+ bodySizer = wx.BoxSizer(wx.HORIZONTAL)
+ bodySizer.Add(item=self._icon, flag=wx.RIGHT, border=10)
+ bodySizer.Add(item=self.informLabel, proportion=1, flag=wx.EXPAND)
+
+ sizer.Add(item = bodySizer, proportion = 1,
+ flag = wx.EXPAND | wx.ALL, border = 15)
sizer.Add(item = btnSizer, proportion = 0,
flag = wx.ALL | wx.ALIGN_RIGHT, border = 5)
More information about the grass-commit
mailing list