Browse Source

wxGUI dbmgr: Fix dbmgr widgets layout on the wxMSW (#637)

* wxGUI dbmgr: fix sql simple where sizer widgets layout on the wxMSW

* wxGUI dbmgr: fix ComboBox widget vertical position on the wxMSW
Tomas Zigo 5 years ago
parent
commit
a2b08cfa94
1 changed files with 13 additions and 13 deletions
  1. 13 13
      gui/wxpython/dbmgr/base.py

+ 13 - 13
gui/wxpython/dbmgr/base.py

@@ -61,8 +61,8 @@ from dbmgr.vinfo import VectorDBInfo, GetUnicodeValue, CreateDbInfoDesc, GetDbEn
 from core.debug import Debug
 from dbmgr.dialogs import ModifyTableRecord, AddColumnDialog
 from core.settings import UserSettings
-from gui_core.wrap import SpinCtrl, Button, TextCtrl, ListCtrl, CheckBox, \
-    StaticText, StaticBox, Menu, NewId
+from gui_core.wrap import Button, CheckBox, ComboBox, ListCtrl, Menu, \
+    NewId, SpinCtrl, StaticBox, StaticText, TextCtrl
 from core.utils import cmp
 
 if sys.version_info.major >= 3:
@@ -1208,9 +1208,9 @@ class DbMgrBrowsePage(DbMgrNotebookBase):
             parent=simpleSqlPanel,
             id=wx.ID_ANY,
             name='wherePanel')
-        sqlWhereColumn = wx.ComboBox(
+        sqlWhereColumn = ComboBox(
             parent=whereSimpleSqlPanel, id=wx.ID_ANY, size=(150, -1),
-            style=wx.CB_SIMPLE | wx.CB_READONLY,
+            style=wx.CB_READONLY,
             choices=self.dbMgrData['mapDBInfo'].GetColumns(
                 self.dbMgrData['mapDBInfo'].layers[layer]['table']))
         sqlWhereColumn.SetSelection(0)
@@ -1262,16 +1262,16 @@ class DbMgrBrowsePage(DbMgrNotebookBase):
 
         sqlSimpleWhereSizer.Add(
             sqlWhereColumn,
-            flag=wx.EXPAND | wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
+            flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
             border=3)
         sqlSimpleWhereSizer.Add(
             sqlWhereCond,
-            flag=wx.EXPAND | wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
+            flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
             border=3)
         sqlSimpleWhereSizer.Add(
             sqlWhereValue,
             proportion=1,
-            flag=wx.EXPAND | wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
+            flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
             border=3)
         whereSimpleSqlPanel.SetSizer(sqlSimpleWhereSizer)
         simpleSqlSizer.Add(sqlLabel, border=5, pos=(0, 0),
@@ -2384,9 +2384,9 @@ class DbMgrTablesPage(DbMgrNotebookBase):
                               label=" %s " % _("Rename column"))
         renameSizer = wx.StaticBoxSizer(renameBox, wx.HORIZONTAL)
 
-        columnFrom = wx.ComboBox(
+        columnFrom = ComboBox(
             parent=panel, id=wx.ID_ANY, size=(150, -1),
-            style=wx.CB_SIMPLE | wx.CB_READONLY,
+            style=wx.CB_READONLY,
             choices=self.dbMgrData['mapDBInfo'].GetColumns(table))
         columnFrom.SetSelection(0)
         self.layerPage[layer]['renameCol'] = columnFrom.GetId()
@@ -3276,9 +3276,9 @@ class LayerBook(wx.Notebook):
         label = StaticText(parent=self.deletePanel, id=wx.ID_ANY,
                            label='%s:' % _("Layer to remove"))
 
-        self.deleteLayer = wx.ComboBox(
+        self.deleteLayer = ComboBox(
             parent=self.deletePanel, id=wx.ID_ANY, size=(100, -1),
-            style=wx.CB_SIMPLE | wx.CB_READONLY,
+            style=wx.CB_READONLY,
             choices=list(map(str, self.mapDBInfo.layers.keys())))
         self.deleteLayer.SetSelection(0)
         self.deleteLayer.Bind(wx.EVT_COMBOBOX, self.OnChangeLayer)
@@ -3351,9 +3351,9 @@ class LayerBook(wx.Notebook):
         self.modifyLayerWidgets = {'layer':
                                    (StaticText(parent=self.modifyPanel, id=wx.ID_ANY,
                                                label='%s:' % _("Layer")),
-                                    wx.ComboBox(parent=self.modifyPanel, id=wx.ID_ANY,
+                                    ComboBox(parent=self.modifyPanel, id=wx.ID_ANY,
                                                 size=(100, -1),
-                                                style=wx.CB_SIMPLE | wx.CB_READONLY,
+                                                style=wx.CB_READONLY,
                                                 choices=list(map(str,
                                                             self.mapDBInfo.layers.keys())))),
                                    'driver':