chiark / gitweb /
Change the overlay for ImageButton and fix layout when selecting an image
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Tue, 28 Jul 2015 20:04:06 +0000 (16:04 -0400)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Tue, 28 Jul 2015 20:04:06 +0000 (16:04 -0400)
Cura/gui/configWizard.py
resources/images/ImageButton_Overlay.png

index 88162d5a2e61e3f210ec45793f36c61398f9a7c1..f2dff42cd66f1c8b07e5c893d011b56dc91f786d 100644 (file)
@@ -164,6 +164,7 @@ class ImageButton(wx.Panel):
                                if ib == self:
                                        continue
                                ib.SetValue(False)
+               self.Layout()
 
        def createOverlay(self, bitmap, overlay):
                result = bitmap.GetSubBitmap(wx.Rect(0, 0, *bitmap.Size))
@@ -1163,8 +1164,8 @@ class LulzbotToolheadSelectPage(InfoPage):
                self.panel = self.AddPanel()
                ib1 = ImageButton(self.panel, "Mini", wx.Bitmap(resources.getPathForImage('Lulzbot_Toolhead_TAZ_Flexystruder_v1.jpg')), "Some description", style=ImageButton.IB_GROUP)
                ib2 = ImageButton(self.panel, "TAZ 4 ", wx.Bitmap(resources.getPathForImage('Lulzbot_Toolhead_TAZ_Single_v2.jpg')), "Some description 2")
-               ib3 = ImageButton(self.panel, "TAZ 5 ", wx.Bitmap(resources.getPathForImage('Lulzbot_Toolhead_TAZ_Flexystruder_v1.jpg')), "Some description 3")
-               ib4 = ImageButton(self.panel, "Others ", wx.Bitmap(resources.getPathForImage('Lulzbot_Toolhead_TAZ_Dually_v1.jpg')), "Some description\n4")
+               ib3 = ImageButton(self.panel, "TAZ 5 ", wx.Bitmap(resources.getPathForImage('Lulzbot_Toolhead_TAZ_Flexystruder_v1.jpg')))
+               ib4 = ImageButton(self.panel, "Others ", wx.Bitmap(resources.getPathForImage('Lulzbot_Toolhead_TAZ_Dually_v1.jpg')))
                self.panel.GetSizer().Add(ib1, pos=(0, 0), flag=wx.EXPAND)
                self.panel.GetSizer().Add(ib2, pos=(0, 1), flag=wx.EXPAND)
                self.panel.GetSizer().Add(ib3, pos=(1, 0), flag=wx.EXPAND)
index 663ccea4acfff1b01c13f6505eb7304ae923f31e..b5e3da7adb102b2ab078c2ad02935a8c1ddd7774 100644 (file)
Binary files a/resources/images/ImageButton_Overlay.png and b/resources/images/ImageButton_Overlay.png differ