summaryrefslogtreecommitdiff
path: root/src/size_manager.py
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-03-31 18:54:41 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-06-11 20:49:43 +0100
commit332a5c2553db41de777473a1e1be9cd1522c9496 (patch)
tree3ee06a59f147ccc4009b35cccfbe2461bcd18310 /src/size_manager.py
parentcf44cf7cdec9fdb35caa372563d57e7045dc29dd (diff)
downloadpoezio-332a5c2553db41de777473a1e1be9cd1522c9496.tar.gz
poezio-332a5c2553db41de777473a1e1be9cd1522c9496.tar.bz2
poezio-332a5c2553db41de777473a1e1be9cd1522c9496.tar.xz
poezio-332a5c2553db41de777473a1e1be9cd1522c9496.zip
Move the src directory to poezio, for better cython compatibility.
Diffstat (limited to 'src/size_manager.py')
-rw-r--r--src/size_manager.py46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/size_manager.py b/src/size_manager.py
deleted file mode 100644
index 1cad83fd..00000000
--- a/src/size_manager.py
+++ /dev/null
@@ -1,46 +0,0 @@
-"""
-Size Manager:
- used to check size boundaries of the whole window and
- specific tabs
-"""
-THRESHOLD_WIDTH_DEGRADE = 45
-THRESHOLD_HEIGHT_DEGRADE = 10
-
-FULL_WIDTH_DEGRADE = 66
-FULL_HEIGHT_DEGRADE = 10
-
-class SizeManager(object):
-
- def __init__(self, core, win_cls):
- self._win_class = win_cls
- self._core = core
-
- @property
- def tab_scr(self):
- return self._win_class._tab_win
-
- @property
- def core_scr(self):
- return self._core.stdscr
-
- @property
- def tab_degrade_x(self):
- _, x = self.tab_scr.getmaxyx()
- return x < THRESHOLD_WIDTH_DEGRADE
-
- @property
- def tab_degrade_y(self):
- y, x = self.tab_scr.getmaxyx()
- return y < THRESHOLD_HEIGHT_DEGRADE
-
- @property
- def core_degrade_x(self):
- y, x = self.core_scr.getmaxyx()
- return x < FULL_WIDTH_DEGRADE
-
- @property
- def core_degrade_y(self):
- y, x = self.core_scr.getmaxyx()
- return y < FULL_HEIGHT_DEGRADE
-
-