From: Steven Morlock Date: Sat, 26 Jan 2013 06:17:45 +0000 (-0500) Subject: UI update to support MacOS X-Git-Tag: 13.03~64^2~2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=5b52116aa7d4a7faba35dd638a31ff212a518091;p=cura.git UI update to support MacOS --- diff --git a/Cura/gui/configBase.py b/Cura/gui/configBase.py index 6388822e..f8e5323c 100644 --- a/Cura/gui/configBase.py +++ b/Cura/gui/configBase.py @@ -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 diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 9cbbc5ee..2558d9c2 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -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())