chiark / gitweb /
UI update to support MacOS
authorSteven Morlock <smorloc@gmail.com>
Sat, 26 Jan 2013 06:17:45 +0000 (01:17 -0500)
committerSteven Morlock <smorloc@gmail.com>
Sat, 26 Jan 2013 06:17:45 +0000 (01:17 -0500)
Cura/gui/configBase.py
Cura/gui/mainWindow.py

index 6388822e7c63514c3ece61bd8ff791e454b4c33c..f8e5323c7e7f2b5b9b723f7d65e719e71adaeb29 100644 (file)
@@ -179,8 +179,8 @@ class SettingRow():
                # Set the minimum size of control to something other than the humungous default
                minSize = self.ctrl.GetMinSize()
                
-               if platform.system() == "Darwin":               
-                       # Under MacOS, it appears that the minSize is used for the actual size...
+               if platform.system() == "Darwin":
+                       # Under MacOS, it appears that the minSize is used for the actual size, so give the field a bit more room...
                        minSize[0] = 150
                else:
                        minSize[0] = 50
index 9cbbc5ee2995a1db45e76fd94b48e091438e0aab..2558d9c248d0c71324432b034145261584fe14c4 100644 (file)
@@ -608,11 +608,7 @@ class normalSettingsPanel(configBase.configPanelBase):
                c = configBase.SettingRow(right, "Packing Density", 'filament_density', '1.00', 'Packing density of your filament. This should be 1.00 for PLA and 0.85 for ABS')
                validators.validFloat(c, 0.5, 1.5)
 
-               leftWidth = self.getLabelColumnWidth(left)
-               rightWidth = self.getLabelColumnWidth(right)
-               maxWidth = max(leftWidth, rightWidth)
-               self.setLabelColumnWidth(left, maxWidth)
-               self.setLabelColumnWidth(right, maxWidth)
+               self.SizeLabelWidths(left, right)
                
                (left, right, self.advancedPanel) = self.CreateDynamicConfigTab(self.nb, 'Advanced config')
                
@@ -656,6 +652,8 @@ class normalSettingsPanel(configBase.configPanelBase):
                validators.warningAbove(c, lambda : (float(profile.getProfileSetting('nozzle_size')) * 3.0 / 4.0), "A bottom layer of more then %.2fmm (3/4 nozzle size) usually give bad results and is not recommended.")
                c = configBase.SettingRow(right, "Duplicate outlines", 'enable_skin', False, 'Skin prints the outer lines of the prints twice, each time with half the thickness. This gives the illusion of a higher print quality.')
 
+               self.SizeLabelWidths(left, right)
+
                #Plugin page
                self.pluginPanel = pluginPanel.pluginPanel(self.nb)
                if len(self.pluginPanel.pluginList) > 0:
@@ -669,6 +667,13 @@ class normalSettingsPanel(configBase.configPanelBase):
 
                self.Bind(wx.EVT_SIZE, self.OnSize)
 
+       def SizeLabelWidths(self, left, right):
+               leftWidth = self.getLabelColumnWidth(left)
+               rightWidth = self.getLabelColumnWidth(right)
+               maxWidth = max(leftWidth, rightWidth)
+               self.setLabelColumnWidth(left, maxWidth)
+               self.setLabelColumnWidth(right, maxWidth)
+
        def OnSize(self, e):
                # Make the size of the Notebook control the same size as this control
                self.nb.SetSize(self.GetSize())