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
775afa8f
Commit
775afa8f
authored
Apr 03, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop ugly hack of
a4cc6b27
by delaying the update with wx.CallAfter
parent
f13e4f32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
pronterface.py
printrun/pronterface.py
+5
-13
No files found.
printrun/pronterface.py
View file @
775afa8f
...
...
@@ -288,24 +288,16 @@ class PronterWindow(MainWindow, pronsole.pronsole):
self
.
Thaw
()
def
on_resize
(
self
,
event
):
wx
.
CallAfter
(
self
.
on_resize_real
)
event
.
Skip
()
def
on_resize_real
(
self
):
maximized
=
self
.
IsMaximized
()
self
.
set
(
"last_window_maximized"
,
maximized
)
# FIXME: Hack ! it seems IsMaximized() is not always up to date when
# getting this event during unmaximization, so let's compare the window
# size to the available screensize. Yes, it's horrible.
if
maximized
:
evtsz
=
event
.
GetSize
()
display
=
wx
.
Display
(
wx
.
Display
.
GetFromWindow
(
self
))
area
=
display
.
GetClientArea
()
# Ugly ! add some extra -20 padding to ensure we are not missing
# something
if
evtsz
[
0
]
<
area
[
2
]
-
20
or
evtsz
[
1
]
<
area
[
3
]
-
20
:
self
.
set
(
"last_window_maximized"
,
False
)
if
not
maximized
and
not
self
.
IsIconized
():
size
=
self
.
GetSize
()
size
=
self
.
Get
Client
Size
()
self
.
set
(
"last_window_width"
,
size
[
0
])
self
.
set
(
"last_window_height"
,
size
[
1
])
event
.
Skip
()
def
on_maximize
(
self
,
event
):
self
.
set
(
"last_window_maximized"
,
self
.
IsMaximized
())
...
...
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