Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
poezio
poezio
Commits
d19f53c3
Commit
d19f53c3
authored
Jul 07, 2016
by
Link Mauve
Browse files
Remove unused SizeManager argument, and simplify its import.
parent
968ed665
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
poezio/core/core.py
poezio/core/core.py
+1
-1
poezio/size_manager.py
poezio/size_manager.py
+4
-5
No files found.
poezio/core/core.py
View file @
d19f53c3
...
...
@@ -104,7 +104,7 @@ class Core(object):
self
.
plugin_manager
=
PluginManager
(
self
)
self
.
events
=
events
.
EventHandler
()
self
.
size
=
SizeManager
(
self
,
windows
.
Win
)
self
.
size
=
SizeManager
(
self
)
# Set to True whenever we consider that we have been disconnected
# from the server because of a legitimate reason (bad credentials,
...
...
poezio/size_manager.py
View file @
d19f53c3
...
...
@@ -4,7 +4,7 @@ Size Manager:
specific tabs
"""
from
poezio
import
window
s
from
poezio
.windows
import
base_win
s
THRESHOLD_WIDTH_DEGRADE
=
45
THRESHOLD_HEIGHT_DEGRADE
=
10
...
...
@@ -14,18 +14,17 @@ FULL_HEIGHT_DEGRADE = 10
class
SizeManager
(
object
):
def
__init__
(
self
,
core
,
win_cls
):
self
.
_win_class
=
win_cls
def
__init__
(
self
,
core
):
self
.
_core
=
core
@
property
def
tab_degrade_x
(
self
):
_
,
x
=
windows
.
base_wins
.
TAB_WIN
.
getmaxyx
()
_
,
x
=
base_wins
.
TAB_WIN
.
getmaxyx
()
return
x
<
THRESHOLD_WIDTH_DEGRADE
@
property
def
tab_degrade_y
(
self
):
y
,
x
=
windows
.
base_wins
.
TAB_WIN
.
getmaxyx
()
y
,
x
=
base_wins
.
TAB_WIN
.
getmaxyx
()
return
y
<
THRESHOLD_HEIGHT_DEGRADE
@
property
...
...
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