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