From: daid303 Date: Wed, 6 Mar 2013 15:21:44 +0000 (+0100) Subject: Some updates to improve the button layout. X-Git-Tag: 13.03~24 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a085711296947fac1e6b004713b87821956f55b9;p=cura.git Some updates to improve the button layout. --- diff --git a/Cura/gui/preview3d.py b/Cura/gui/preview3d.py index abf3274c..18e449d6 100644 --- a/Cura/gui/preview3d.py +++ b/Cura/gui/preview3d.py @@ -84,11 +84,11 @@ class previewPanel(wx.Panel): self.scaleToolButton = openglGui.glRadioButton(self.glCanvas, 9, 'Scale', (1,-1), group, self.OnToolSelect) self.mirrorToolButton = openglGui.glRadioButton(self.glCanvas, 10, 'Mirror', (2,-1), group, self.OnToolSelect) - self.resetRotationButton = openglGui.glButton(self.glCanvas, 12, 'Reset rotation', (0,-2), self.OnRotateReset) + self.resetRotationButton = openglGui.glButton(self.glCanvas, 12, 'Reset', (0,-2), self.OnRotateReset) self.layFlatButton = openglGui.glButton(self.glCanvas, 16, 'Lay flat', (0,-3), self.OnLayFlat) - self.resetScaleButton = openglGui.glButton(self.glCanvas, 13, 'Scale reset', (1,-2), self.OnScaleReset) - self.scaleMaxButton = openglGui.glButton(self.glCanvas, 17, 'Scale to machine size', (1,-3), self.OnScaleMax) + self.resetScaleButton = openglGui.glButton(self.glCanvas, 13, 'Reset', (1,-2), self.OnScaleReset) + self.scaleMaxButton = openglGui.glButton(self.glCanvas, 17, 'To max', (1,-3), self.OnScaleMax) self.mirrorXButton = openglGui.glButton(self.glCanvas, 14, 'Mirror X', (2,-2), lambda : self.OnMirror(0)) self.mirrorYButton = openglGui.glButton(self.glCanvas, 18, 'Mirror Y', (2,-3), lambda : self.OnMirror(1)) diff --git a/Cura/gui/util/opengl.py b/Cura/gui/util/opengl.py index dd80b8ae..8d3f727c 100644 --- a/Cura/gui/util/opengl.py +++ b/Cura/gui/util/opengl.py @@ -37,6 +37,7 @@ def InitGL(window, view3D, zoom): glDisable(GL_BLEND) glClearColor(1.0, 1.0, 1.0, 1.0) + glClearColor(0.8, 0.8, 0.8, 1.0) glClearStencil(0) glClearDepth(1.0) diff --git a/Cura/gui/util/openglGui.py b/Cura/gui/util/openglGui.py index 4af5418d..5a2a92fe 100644 --- a/Cura/gui/util/openglGui.py +++ b/Cura/gui/util/openglGui.py @@ -254,7 +254,7 @@ class glGuiLayoutButtons(object): def update(self): bs = self._parent._base._buttonSize x0, y0, w, h = self._parent.getSize() - gridSize = bs * 1.2 + gridSize = bs * 1.0 for ctrl in self._parent._glGuiControlList: pos = ctrl._pos if pos[0] < 0: @@ -262,9 +262,9 @@ class glGuiLayoutButtons(object): else: x = pos[0] * gridSize + bs * 0.2 if pos[1] < 0: - y = h + pos[1] * gridSize - bs * 0.2 + y = h + pos[1] * gridSize * 1.2 - bs * 0.2 else: - y = pos[1] * gridSize + bs * 0.2 + y = pos[1] * gridSize * 1.2 + bs * 0.2 ctrl.setSize(x, y, gridSize, gridSize) def getLayoutSize(self): @@ -373,7 +373,8 @@ class glButton(glGuiControl): glDisable(GL_TEXTURE_2D) if self._focus: glColor4ub(0,0,0,255) - glTranslatef(0, -0.55*bs, 0) + glColor4ub(255,255,255,255) + glTranslatef(0, -0.55*bs*scale, 0) opengl.glDrawStringCenter(self._tooltip) glPopMatrix() diff --git a/Cura/resources/images/glButtons.png b/Cura/resources/images/glButtons.png index 3b3f8afe..6ac6e091 100644 Binary files a/Cura/resources/images/glButtons.png and b/Cura/resources/images/glButtons.png differ