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
acc9117d
Commit
acc9117d
authored
Feb 02, 2015
by
Miro Hrončok
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resize input fields so they work in GTK3
parent
f2b96fca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
controls.py
printrun/gui/controls.py
+5
-5
No files found.
printrun/gui/controls.py
View file @
acc9117d
...
@@ -192,7 +192,7 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None, mini_mode
...
@@ -192,7 +192,7 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None, mini_mode
root
.
speed_slider
=
wx
.
Slider
(
speedpanel
,
-
1
,
100
,
1
,
300
)
root
.
speed_slider
=
wx
.
Slider
(
speedpanel
,
-
1
,
100
,
1
,
300
)
speedsizer
.
Add
(
root
.
speed_slider
,
1
,
flag
=
wx
.
EXPAND
)
speedsizer
.
Add
(
root
.
speed_slider
,
1
,
flag
=
wx
.
EXPAND
)
root
.
speed_spin
=
FloatSpin
(
speedpanel
,
-
1
,
value
=
100
,
min_val
=
1
,
max_val
=
300
,
digits
=
0
,
style
=
wx
.
ALIGN_LEFT
,
size
=
(
6
0
,
-
1
))
root
.
speed_spin
=
FloatSpin
(
speedpanel
,
-
1
,
value
=
100
,
min_val
=
1
,
max_val
=
300
,
digits
=
0
,
style
=
wx
.
ALIGN_LEFT
,
size
=
(
8
0
,
-
1
))
speedsizer
.
Add
(
root
.
speed_spin
,
0
,
flag
=
wx
.
ALIGN_CENTER_VERTICAL
)
speedsizer
.
Add
(
root
.
speed_spin
,
0
,
flag
=
wx
.
ALIGN_CENTER_VERTICAL
)
root
.
speed_label
=
wx
.
StaticText
(
speedpanel
,
-
1
,
_
(
"
%
"
))
root
.
speed_label
=
wx
.
StaticText
(
speedpanel
,
-
1
,
_
(
"
%
"
))
speedsizer
.
Add
(
root
.
speed_label
,
flag
=
wx
.
ALIGN_CENTER_VERTICAL
|
wx
.
ALIGN_RIGHT
)
speedsizer
.
Add
(
root
.
speed_label
,
flag
=
wx
.
ALIGN_CENTER_VERTICAL
|
wx
.
ALIGN_RIGHT
)
...
@@ -269,7 +269,7 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None, mini_mode
...
@@ -269,7 +269,7 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None, mini_mode
esettingspanel
=
root
.
newPanel
(
parentpanel
)
esettingspanel
=
root
.
newPanel
(
parentpanel
)
esettingssizer
=
wx
.
GridBagSizer
()
esettingssizer
=
wx
.
GridBagSizer
()
esettingssizer
.
SetEmptyCellSize
((
0
,
0
))
esettingssizer
.
SetEmptyCellSize
((
0
,
0
))
root
.
edist
=
FloatSpin
(
esettingspanel
,
-
1
,
value
=
root
.
settings
.
last_extrusion
,
min_val
=
0
,
max_val
=
1000
,
size
=
(
7
0
,
-
1
),
digits
=
1
)
root
.
edist
=
FloatSpin
(
esettingspanel
,
-
1
,
value
=
root
.
settings
.
last_extrusion
,
min_val
=
0
,
max_val
=
1000
,
size
=
(
9
0
,
-
1
),
digits
=
1
)
root
.
edist
.
SetBackgroundColour
((
225
,
200
,
200
))
root
.
edist
.
SetBackgroundColour
((
225
,
200
,
200
))
root
.
edist
.
SetForegroundColour
(
"black"
)
root
.
edist
.
SetForegroundColour
(
"black"
)
root
.
edist
.
Bind
(
wx
.
EVT_SPINCTRL
,
root
.
setfeeds
)
root
.
edist
.
Bind
(
wx
.
EVT_SPINCTRL
,
root
.
setfeeds
)
...
@@ -280,7 +280,7 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None, mini_mode
...
@@ -280,7 +280,7 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None, mini_mode
add
(
"edist_unit"
,
wx
.
StaticText
(
esettingspanel
,
-
1
,
unit_label
),
container
=
esettingssizer
,
flag
=
wx
.
ALIGN_CENTER
|
wx
.
RIGHT
,
border
=
5
)
add
(
"edist_unit"
,
wx
.
StaticText
(
esettingspanel
,
-
1
,
unit_label
),
container
=
esettingssizer
,
flag
=
wx
.
ALIGN_CENTER
|
wx
.
RIGHT
,
border
=
5
)
root
.
edist
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"Amount to Extrude or Retract (mm)"
)))
root
.
edist
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"Amount to Extrude or Retract (mm)"
)))
if
not
mini_mode
:
if
not
mini_mode
:
root
.
efeedc
=
FloatSpin
(
esettingspanel
,
-
1
,
value
=
root
.
settings
.
e_feedrate
,
min_val
=
0
,
max_val
=
50000
,
size
=
(
7
0
,
-
1
),
digits
=
1
)
root
.
efeedc
=
FloatSpin
(
esettingspanel
,
-
1
,
value
=
root
.
settings
.
e_feedrate
,
min_val
=
0
,
max_val
=
50000
,
size
=
(
9
0
,
-
1
),
digits
=
1
)
root
.
efeedc
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"Extrude / Retract speed (mm/min)"
)))
root
.
efeedc
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"Extrude / Retract speed (mm/min)"
)))
root
.
efeedc
.
SetBackgroundColour
((
225
,
200
,
200
))
root
.
efeedc
.
SetBackgroundColour
((
225
,
200
,
200
))
root
.
efeedc
.
SetForegroundColour
(
"black"
)
root
.
efeedc
.
SetForegroundColour
(
"black"
)
...
@@ -379,12 +379,12 @@ class ControlsSizer(wx.GridBagSizer):
...
@@ -379,12 +379,12 @@ class ControlsSizer(wx.GridBagSizer):
else
:
else
:
self
.
extra_buttons
[
key
]
=
btn
self
.
extra_buttons
[
key
]
=
btn
root
.
xyfeedc
=
wx
.
SpinCtrl
(
lltspanel
,
-
1
,
str
(
root
.
settings
.
xy_feedrate
),
min
=
0
,
max
=
50000
,
size
=
(
70
,
-
1
))
root
.
xyfeedc
=
wx
.
SpinCtrl
(
lltspanel
,
-
1
,
str
(
root
.
settings
.
xy_feedrate
),
min
=
0
,
max
=
50000
,
size
=
(
97
,
-
1
))
root
.
xyfeedc
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"Set Maximum Speed for X & Y axes (mm/min)"
)))
root
.
xyfeedc
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"Set Maximum Speed for X & Y axes (mm/min)"
)))
llts
.
Add
(
wx
.
StaticText
(
lltspanel
,
-
1
,
_
(
"XY:"
)),
flag
=
wx
.
ALIGN_RIGHT
|
wx
.
ALIGN_CENTER_VERTICAL
)
llts
.
Add
(
wx
.
StaticText
(
lltspanel
,
-
1
,
_
(
"XY:"
)),
flag
=
wx
.
ALIGN_RIGHT
|
wx
.
ALIGN_CENTER_VERTICAL
)
llts
.
Add
(
root
.
xyfeedc
)
llts
.
Add
(
root
.
xyfeedc
)
llts
.
Add
(
wx
.
StaticText
(
lltspanel
,
-
1
,
_
(
"mm/min Z:"
)),
flag
=
wx
.
ALIGN_RIGHT
|
wx
.
ALIGN_CENTER_VERTICAL
)
llts
.
Add
(
wx
.
StaticText
(
lltspanel
,
-
1
,
_
(
"mm/min Z:"
)),
flag
=
wx
.
ALIGN_RIGHT
|
wx
.
ALIGN_CENTER_VERTICAL
)
root
.
zfeedc
=
wx
.
SpinCtrl
(
lltspanel
,
-
1
,
str
(
root
.
settings
.
z_feedrate
),
min
=
0
,
max
=
50000
,
size
=
(
7
0
,
-
1
))
root
.
zfeedc
=
wx
.
SpinCtrl
(
lltspanel
,
-
1
,
str
(
root
.
settings
.
z_feedrate
),
min
=
0
,
max
=
50000
,
size
=
(
9
0
,
-
1
))
root
.
zfeedc
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"Set Maximum Speed for Z axis (mm/min)"
)))
root
.
zfeedc
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"Set Maximum Speed for Z axis (mm/min)"
)))
llts
.
Add
(
root
.
zfeedc
,)
llts
.
Add
(
root
.
zfeedc
,)
...
...
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