self.ctrl.Bind(wx.EVT_ENTER_WINDOW, lambda e: panel.main.OnPopupDisplay(self))
self.ctrl.Bind(wx.EVT_LEAVE_WINDOW, panel.main.OnPopupHide)
+ self.defaultBGColour = self.ctrl.GetBackgroundColour()
+
panel.main.settingControlList.append(self)
sizer.Add(self.label, (x,y), flag=wx.ALIGN_CENTER_VERTICAL)
elif result == validators.WARNING:
self.ctrl.SetBackgroundColour('Yellow')
else:
- self.ctrl.SetBackgroundColour(wx.NullColour)
+ self.ctrl.SetBackgroundColour(self.defaultBGColour)
self.ctrl.Refresh()
self.validationMsg = '\n'.join(msgs)
configBase.TitleRow(right, "Filament")
c = configBase.SettingRow(right, "Diameter (mm)", 'filament_diameter', '2.89', 'Diameter of your filament, as accurately as possible.\nIf you cannot measure this value you will have to callibrate it, a higher number means less extrusion, a smaller number generates more extrusion.')
validators.validFloat(c, 1.0)
+ validators.warningAbove(c, 3.5, "Are you sure your filament is that thick? Normal filament is around 3mm or 1.75mm.")
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)