Merge pull request #65 from PyroMani/master

Added icons for top toolbar of preview panel
master
daid 2012-04-18 11:41:02 -07:00
commit 2239b49db0
16 changed files with 15 additions and 7 deletions

View File

@ -47,16 +47,16 @@ class previewPanel(wx.Panel):
self.toolbar = toolbarUtil.Toolbar(self)
group = []
toolbarUtil.RadioButton(self.toolbar, group, 'object-mirror-x-on.png', 'object-mirror-x-off.png', '3D view', callback=self.On3DClick)
toolbarUtil.RadioButton(self.toolbar, group, 'object-mirror-x-on.png', 'object-mirror-x-off.png', 'Topdown view', callback=self.OnTopClick)
toolbarUtil.RadioButton(self.toolbar, group, 'object-3d-on.png', 'object-3d-off.png', '3D view', callback=self.On3DClick)
toolbarUtil.RadioButton(self.toolbar, group, 'object-top-on.png', 'object-top-off.png', 'Topdown view', callback=self.OnTopClick)
self.toolbar.AddSeparator()
group = []
self.normalViewButton = toolbarUtil.RadioButton(self.toolbar, group, 'object-mirror-x-on.png', 'object-mirror-x-off.png', 'Normal model view', callback=self.OnViewChange)
self.transparentViewButton = toolbarUtil.RadioButton(self.toolbar, group, 'object-mirror-x-on.png', 'object-mirror-x-off.png', 'Transparent model view', callback=self.OnViewChange)
self.xrayViewButton = toolbarUtil.RadioButton(self.toolbar, group, 'object-mirror-x-on.png', 'object-mirror-x-off.png', 'X-Ray view', callback=self.OnViewChange)
self.gcodeViewButton = toolbarUtil.RadioButton(self.toolbar, group, 'object-mirror-x-on.png', 'object-mirror-x-off.png', 'GCode view', callback=self.OnViewChange)
self.mixedViewButton = toolbarUtil.RadioButton(self.toolbar, group, 'object-mirror-x-on.png', 'object-mirror-x-off.png', 'Mixed model/GCode view', callback=self.OnViewChange)
self.normalViewButton = toolbarUtil.RadioButton(self.toolbar, group, 'view-normal-on.png', 'view-normal-off.png', 'Normal model view', callback=self.OnViewChange)
self.transparentViewButton = toolbarUtil.RadioButton(self.toolbar, group, 'view-transparent-on.png', 'view-transparent-off.png', 'Transparent model view', callback=self.OnViewChange)
self.xrayViewButton = toolbarUtil.RadioButton(self.toolbar, group, 'view-xray-on.png', 'view-xray-off.png', 'X-Ray view', callback=self.OnViewChange)
self.gcodeViewButton = toolbarUtil.RadioButton(self.toolbar, group, 'view-gcode-on.png', 'view-gcode-off.png', 'GCode view', callback=self.OnViewChange)
self.mixedViewButton = toolbarUtil.RadioButton(self.toolbar, group, 'view-mixed-on.png', 'view-mixed-off.png', 'Mixed model/GCode view', callback=self.OnViewChange)
self.OnViewChange()
self.toolbar.AddSeparator()

View File

@ -101,10 +101,14 @@ class ToggleButton(buttons.GenBitmapToggleButton):
def OnMouseEnter(self, event):
self.GetParent().OnPopupDisplay(event)
self.SetBitmap(True)
self.Refresh()
event.Skip()
def OnMouseLeave(self, event):
self.GetParent().OnPopupHide(event)
self.SetBitmap(self.GetValue())
self.Refresh()
event.Skip()
class RadioButton(buttons.GenBitmapButton):
@ -159,10 +163,14 @@ class RadioButton(buttons.GenBitmapButton):
def OnMouseEnter(self, event):
self.GetParent().OnPopupDisplay(event)
self.SetBitmap(True)
self.Refresh()
event.Skip()
def OnMouseLeave(self, event):
self.GetParent().OnPopupHide(event)
self.SetBitmap(self.GetValue())
self.Refresh()
event.Skip()
class NormalButton(buttons.GenBitmapButton):

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB