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
fe1e6659
Commit
fe1e6659
authored
Nov 30, 2011
by
John Tapsell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the custom color dialog to resize properly
parent
75e1df75
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
pronterface.py
pronterface.py
+8
-11
No files found.
pronterface.py
View file @
fe1e6659
...
@@ -1600,15 +1600,12 @@ class ButtonEdit(wx.Dialog):
...
@@ -1600,15 +1600,12 @@ class ButtonEdit(wx.Dialog):
wx
.
Dialog
.
__init__
(
self
,
None
,
title
=
_
(
"Custom button"
),
style
=
wx
.
DEFAULT_DIALOG_STYLE
|
wx
.
RESIZE_BORDER
)
wx
.
Dialog
.
__init__
(
self
,
None
,
title
=
_
(
"Custom button"
),
style
=
wx
.
DEFAULT_DIALOG_STYLE
|
wx
.
RESIZE_BORDER
)
self
.
pronterface
=
pronterface
self
.
pronterface
=
pronterface
topsizer
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
topsizer
=
wx
.
BoxSizer
(
wx
.
VERTICAL
)
vbox
=
wx
.
StaticBoxSizer
(
wx
.
StaticBox
(
self
,
label
=
""
),
wx
.
VERTICAL
)
topsizer
.
Add
(
vbox
,
1
,
wx
.
ALL
+
wx
.
EXPAND
)
grid
=
wx
.
FlexGridSizer
(
rows
=
0
,
cols
=
2
,
hgap
=
4
,
vgap
=
2
)
grid
=
wx
.
FlexGridSizer
(
rows
=
0
,
cols
=
2
,
hgap
=
4
,
vgap
=
2
)
grid
.
AddGrowableCol
(
1
,
1
)
grid
.
AddGrowableCol
(
1
,
1
)
vbox
.
Add
(
grid
,
0
,
wx
.
EXPAND
)
grid
.
Add
(
wx
.
StaticText
(
self
,
-
1
,
_
(
"Button title"
)),
0
,
wx
.
BOTTOM
|
wx
.
RIGHT
)
grid
.
Add
(
wx
.
StaticText
(
self
,
-
1
,
_
(
"Button title"
)),
0
,
wx
.
BOTTOM
+
wx
.
RIGHT
)
self
.
name
=
wx
.
TextCtrl
(
self
,
-
1
,
""
)
self
.
name
=
wx
.
TextCtrl
(
self
,
-
1
,
""
)
grid
.
Add
(
self
.
name
,
1
,
wx
.
EXPAND
)
grid
.
Add
(
self
.
name
,
1
,
wx
.
EXPAND
)
grid
.
Add
(
wx
.
StaticText
(
self
,
-
1
,
_
(
"Command"
)),
0
,
wx
.
BOTTOM
+
wx
.
RIGHT
)
grid
.
Add
(
wx
.
StaticText
(
self
,
-
1
,
_
(
"Command"
)),
0
,
wx
.
BOTTOM
|
wx
.
RIGHT
)
self
.
command
=
wx
.
TextCtrl
(
self
,
-
1
,
""
)
self
.
command
=
wx
.
TextCtrl
(
self
,
-
1
,
""
)
xbox
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
xbox
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
xbox
.
Add
(
self
.
command
,
1
,
wx
.
EXPAND
)
xbox
.
Add
(
self
.
command
,
1
,
wx
.
EXPAND
)
...
@@ -1616,14 +1613,14 @@ class ButtonEdit(wx.Dialog):
...
@@ -1616,14 +1613,14 @@ class ButtonEdit(wx.Dialog):
self
.
macrob
=
wx
.
Button
(
self
,
-
1
,
".."
,
style
=
wx
.
BU_EXACTFIT
)
self
.
macrob
=
wx
.
Button
(
self
,
-
1
,
".."
,
style
=
wx
.
BU_EXACTFIT
)
self
.
macrob
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
macrob_handler
)
self
.
macrob
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
macrob_handler
)
xbox
.
Add
(
self
.
macrob
,
0
)
xbox
.
Add
(
self
.
macrob
,
0
)
grid
.
Add
(
xbox
)
grid
.
Add
(
xbox
,
1
,
wx
.
EXPAND
)
grid
.
Add
(
wx
.
StaticText
(
self
,
-
1
,
_
(
"Color"
)),
0
,
wx
.
BOTTOM
+
wx
.
RIGHT
)
grid
.
Add
(
wx
.
StaticText
(
self
,
-
1
,
_
(
"Color"
)),
0
,
wx
.
BOTTOM
|
wx
.
RIGHT
)
self
.
color
=
wx
.
TextCtrl
(
self
,
-
1
,
""
)
self
.
color
=
wx
.
TextCtrl
(
self
,
-
1
,
""
)
grid
.
Add
(
self
.
color
,
1
,
wx
.
EXPAND
)
grid
.
Add
(
self
.
color
,
1
,
wx
.
EXPAND
)
topsizer
.
Add
(
self
.
CreateSeparatedButtonSizer
(
wx
.
OK
+
wx
.
CANCEL
),
0
,
wx
.
EXPAND
)
topsizer
.
Add
(
grid
,
0
,
wx
.
EXPAND
)
topsizer
.
Add
(
(
0
,
0
),
1
)
topsizer
.
Add
(
self
.
CreateStdDialogButtonSizer
(
wx
.
OK
|
wx
.
CANCEL
),
0
,
wx
.
ALIGN_CENTER
)
self
.
SetSizer
(
topsizer
)
self
.
SetSizer
(
topsizer
)
topsizer
.
Layout
()
topsizer
.
Fit
(
self
)
def
macrob_enabler
(
self
,
e
):
def
macrob_enabler
(
self
,
e
):
macro
=
self
.
command
.
GetValue
()
macro
=
self
.
command
.
GetValue
()
valid
=
False
valid
=
False
...
...
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