Browse Source

wxGUI: pretify quit dialog

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67635 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 9 năm trước cách đây
mục cha
commit
1ac5449091
1 tập tin đã thay đổi với 10 bổ sung3 xóa
  1. 10 3
      gui/wxpython/gui_core/dialogs.py

+ 10 - 3
gui/wxpython/gui_core/dialogs.py

@@ -2104,7 +2104,7 @@ class HyperlinkDialog(wx.Dialog):
 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 @@ class QuitDialog(wx.Dialog):
         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 @@ class QuitDialog(wx.Dialog):
         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)