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
a4cc6b27
Commit
a4cc6b27
authored
Apr 03, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some ultra ugly workaround to get unmazimized state right
parent
716f4f91
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
pronterface.py
printrun/pronterface.py
+13
-1
No files found.
printrun/pronterface.py
View file @
a4cc6b27
...
@@ -290,6 +290,17 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -290,6 +290,17 @@ class PronterWindow(MainWindow, pronsole.pronsole):
def
on_resize
(
self
,
event
):
def
on_resize
(
self
,
event
):
maximized
=
self
.
IsMaximized
()
maximized
=
self
.
IsMaximized
()
self
.
set
(
"last_window_maximized"
,
maximized
)
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
():
if
not
maximized
and
not
self
.
IsIconized
():
size
=
self
.
GetClientSize
()
size
=
self
.
GetClientSize
()
self
.
set
(
"last_window_width"
,
size
[
0
])
self
.
set
(
"last_window_width"
,
size
[
0
])
...
@@ -297,7 +308,8 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -297,7 +308,8 @@ class PronterWindow(MainWindow, pronsole.pronsole):
event
.
Skip
()
event
.
Skip
()
def
on_maximize
(
self
,
event
):
def
on_maximize
(
self
,
event
):
self
.
on_resize
(
event
)
self
.
set
(
"last_window_maximized"
,
self
.
IsMaximized
())
event
.
Skip
()
def
on_exit
(
self
,
event
):
def
on_exit
(
self
,
event
):
self
.
Close
()
self
.
Close
()
...
...
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