Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
47ff877d
Commit
47ff877d
authored
Mar 25, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if widget is Enabled or not in xyz buttons drawing
This is required to get correct drawing in Locked mode
parent
0779be49
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
xybuttons.py
printrun/xybuttons.py
+2
-2
zbuttons.py
printrun/zbuttons.py
+1
-1
No files found.
printrun/xybuttons.py
View file @
47ff877d
...
@@ -240,7 +240,7 @@ class XYButtons(BufferedCanvas):
...
@@ -240,7 +240,7 @@ class XYButtons(BufferedCanvas):
w
,
h
=
(
self
.
bg_bmp
.
GetWidth
(),
self
.
bg_bmp
.
GetHeight
())
w
,
h
=
(
self
.
bg_bmp
.
GetWidth
(),
self
.
bg_bmp
.
GetHeight
())
gc
.
DrawBitmap
(
self
.
bg_bmp
,
0
,
0
,
w
,
h
)
gc
.
DrawBitmap
(
self
.
bg_bmp
,
0
,
0
,
w
,
h
)
if
self
.
enabled
:
if
self
.
enabled
and
self
.
IsEnabled
()
:
# Brush and pen for grey overlay when mouse hovers over
# Brush and pen for grey overlay when mouse hovers over
gc
.
SetPen
(
wx
.
Pen
(
wx
.
Colour
(
100
,
100
,
100
,
172
),
4
))
gc
.
SetPen
(
wx
.
Pen
(
wx
.
Colour
(
100
,
100
,
100
,
172
),
4
))
gc
.
SetBrush
(
wx
.
Brush
(
wx
.
Colour
(
0
,
0
,
0
,
128
)))
gc
.
SetBrush
(
wx
.
Brush
(
wx
.
Colour
(
0
,
0
,
0
,
128
)))
...
@@ -473,7 +473,7 @@ class XYButtonsMini(XYButtons):
...
@@ -473,7 +473,7 @@ class XYButtonsMini(XYButtons):
w
,
h
=
(
self
.
bg_bmp
.
GetWidth
(),
self
.
bg_bmp
.
GetHeight
())
w
,
h
=
(
self
.
bg_bmp
.
GetWidth
(),
self
.
bg_bmp
.
GetHeight
())
gc
.
DrawBitmap
(
self
.
bg_bmp
,
0
,
0
,
w
,
h
)
gc
.
DrawBitmap
(
self
.
bg_bmp
,
0
,
0
,
w
,
h
)
if
self
.
enabled
:
if
self
.
enabled
and
self
.
IsEnabled
()
:
# Brush and pen for grey overlay when mouse hovers over
# Brush and pen for grey overlay when mouse hovers over
gc
.
SetPen
(
wx
.
Pen
(
wx
.
Colour
(
100
,
100
,
100
,
172
),
4
))
gc
.
SetPen
(
wx
.
Pen
(
wx
.
Colour
(
100
,
100
,
100
,
172
),
4
))
gc
.
SetBrush
(
wx
.
Brush
(
wx
.
Colour
(
0
,
0
,
0
,
128
)))
gc
.
SetBrush
(
wx
.
Brush
(
wx
.
Colour
(
0
,
0
,
0
,
128
)))
...
...
printrun/zbuttons.py
View file @
47ff877d
...
@@ -105,7 +105,7 @@ class ZButtons(BufferedCanvas):
...
@@ -105,7 +105,7 @@ class ZButtons(BufferedCanvas):
w
,
h
=
(
self
.
bg_bmp
.
GetWidth
(),
self
.
bg_bmp
.
GetHeight
())
w
,
h
=
(
self
.
bg_bmp
.
GetWidth
(),
self
.
bg_bmp
.
GetHeight
())
gc
.
DrawBitmap
(
self
.
bg_bmp
,
0
,
0
,
w
,
h
)
gc
.
DrawBitmap
(
self
.
bg_bmp
,
0
,
0
,
w
,
h
)
if
self
.
enabled
:
if
self
.
enabled
and
self
.
IsEnabled
()
:
# Draw label overlays
# Draw label overlays
gc
.
SetPen
(
wx
.
Pen
(
wx
.
Colour
(
255
,
255
,
255
,
128
),
1
))
gc
.
SetPen
(
wx
.
Pen
(
wx
.
Colour
(
255
,
255
,
255
,
128
),
1
))
gc
.
SetBrush
(
wx
.
Brush
(
wx
.
Colour
(
255
,
255
,
255
,
128
+
64
)))
gc
.
SetBrush
(
wx
.
Brush
(
wx
.
Colour
(
255
,
255
,
255
,
128
+
64
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment