chiark / gitweb /
Added ultimaker robot logo.
authordaid303 <daid303@gmail.com>
Fri, 1 Mar 2013 15:58:09 +0000 (16:58 +0100)
committerdaid303 <daid303@gmail.com>
Fri, 1 Mar 2013 15:58:09 +0000 (16:58 +0100)
Cura/gui/preview3d.py
Cura/gui/util/openglGui.py
Cura/resources/images/UltimakerRobot.png [new file with mode: 0644]
Cura/resources/images/glButtons.png

index 35b24c4e5d173e95f138f2efc1b09bd0148c6e8f..a4774c32f77b939d041a9725945687beec25c2a8 100644 (file)
@@ -124,7 +124,7 @@ class previewPanel(wx.Panel):
                self.scaleUniform = openglGui.glCheckbox(self.scaleForm, True, (1,8), None)
 
                self.viewSelection = openglGui.glComboButton(self.glCanvas, 'View mode', [0,1,2,3,4], ['3D Model', 'Transparent', 'X-Ray', 'Overhang', 'Layers'], (-1,0), self.OnViewChange)
-               self.layerSelect = openglGui.glSlider(self.glCanvas, 0, 0, 100, (-1,-1), self.OnLayerNrChange)
+               self.layerSelect = openglGui.glSlider(self.glCanvas, 0, 0, 100, (-1,-2), self.OnLayerNrChange)
 
                self.OnViewChange()
                self.OnToolSelect()
index e2cee9fcdf7aa21b237f0507367ad38d100d323e..97df430e32f9591bdf11295a2cd8581b4c45e0c9 100644 (file)
@@ -108,6 +108,7 @@ class glGuiPanel(glcanvas.GLCanvas):
 
                self._context = glcanvas.GLContext(self)
                self._glButtonsTexture = None
+               self._glRobotTexture = None
                self._buttonSize = 64
 
                wx.EVT_PAINT(self, self._OnGuiPaint)
@@ -174,6 +175,7 @@ class glGuiPanel(glcanvas.GLCanvas):
        def _drawGui(self):
                if self._glButtonsTexture is None:
                        self._glButtonsTexture = opengl.loadGLTexture('glButtons.png')
+                       self._glRobotTexture = opengl.loadGLTexture('UltimakerRobot.png')
 
                glDisable(GL_DEPTH_TEST)
                glEnable(GL_BLEND)
@@ -188,6 +190,25 @@ class glGuiPanel(glcanvas.GLCanvas):
                glLoadIdentity()
 
                self._container.draw()
+               glBindTexture(GL_TEXTURE_2D, self._glRobotTexture)
+               glEnable(GL_TEXTURE_2D)
+               glPushMatrix()
+               glColor4f(1,1,1,1)
+               glTranslate(size.GetWidth() - 8,size.GetHeight() - 16,0)
+               s = self._buttonSize * 1.4
+               glScale(s,s,s)
+               glBegin(GL_QUADS)
+               glTexCoord2f(1, 0)
+               glVertex2f(0,-1)
+               glTexCoord2f(0, 0)
+               glVertex2f(-1,-1)
+               glTexCoord2f(0, 1)
+               glVertex2f(-1, 0)
+               glTexCoord2f(1, 1)
+               glVertex2f(0, 0)
+               glEnd()
+               glDisable(GL_TEXTURE_2D)
+               glPopMatrix()
 
        def _OnEraseBackground(self,event):
                #Workaround for windows background redraw flicker.
@@ -500,7 +521,7 @@ class glFrame(glGuiContainer):
                glDisable(GL_TEXTURE_2D)
 
                size = self._layout.getLayoutSize()
-               glColor4ub(0x60,0x60,0x60,255)
+               glColor4ub(60,60,60,255)
                glBegin(GL_QUADS)
                glTexCoord2f(1, 0)
                glVertex2f( size[0], 0)
@@ -808,9 +829,9 @@ class glSlider(glGuiControl):
                glTranslatef(pos[0], pos[1], 0)
                glDisable(GL_TEXTURE_2D)
                if self.hasFocus():
-                       glColor4ub(32,32,32,255)
+                       glColor4ub(60,60,60,255)
                else:
-                       glColor4ub(32,32,32,192)
+                       glColor4ub(60,60,60,192)
                glBegin(GL_QUADS)
                glVertex2f( w/2,-h/2)
                glVertex2f(-w/2,-h/2)
diff --git a/Cura/resources/images/UltimakerRobot.png b/Cura/resources/images/UltimakerRobot.png
new file mode 100644 (file)
index 0000000..4cf6a53
Binary files /dev/null and b/Cura/resources/images/UltimakerRobot.png differ
index 235fb8113456e109363c7d9fa0c4484aa2f70977..444b8762125a1cc55336859ba788376897f2ac51 100644 (file)
Binary files a/Cura/resources/images/glButtons.png and b/Cura/resources/images/glButtons.png differ