Use global elementary scale as a multiplier for the initial window size.
This commit is contained in:
parent
160b0d6ce7
commit
8b945073ef
|
@ -403,7 +403,7 @@ class AlertManager(object):
|
|||
try:
|
||||
cb(a, *args, **kwargs)
|
||||
except:
|
||||
log.exception("Exception while handling alerts")
|
||||
self.log.exception("Exception while handling alerts")
|
||||
|
||||
return True
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ try:
|
|||
Box, Label, Button, ELM_GENLIST_ITEM_FIELD_TEXT, \
|
||||
ELM_GENLIST_ITEM_FIELD_CONTENT, InnerWindow, Frame, \
|
||||
Fileselector, Entry, Panel, ELM_PANEL_ORIENT_BOTTOM, \
|
||||
ELM_OBJECT_SELECT_MODE_NONE, Table, Separator, Menu
|
||||
ELM_OBJECT_SELECT_MODE_NONE, Table, Separator, Menu, Configuration
|
||||
except ImportError:
|
||||
from efl.evas import EVAS_ASPECT_CONTROL_VERTICAL, Rectangle
|
||||
from efl.ecore import Timer
|
||||
|
@ -55,6 +55,7 @@ except ImportError:
|
|||
from efl.elementary.table import Table
|
||||
from efl.elementary.separator import Separator
|
||||
from efl.elementary.menu import Menu
|
||||
from efl.elementary.configuration import Configuration
|
||||
|
||||
from TorrentInfo import TorrentInfo
|
||||
from Preferences import Preferences
|
||||
|
@ -67,13 +68,17 @@ class MainInterface(object):
|
|||
self.parent = parent
|
||||
self.session = session
|
||||
|
||||
elm_conf = Configuration()
|
||||
scale = elm_conf.scale
|
||||
|
||||
self.log = logging.getLogger("epour.gui")
|
||||
|
||||
self.torrentitems = {}
|
||||
|
||||
win = self.win = StandardWindow("epour", "Epour")
|
||||
win.callback_delete_request_add(lambda x: elm.exit())
|
||||
win.size = 480, 480
|
||||
win.screen_constrain = True
|
||||
win.size = 480 * scale, 400 * scale
|
||||
|
||||
self.tlist = tlist = Genlist(win)
|
||||
tlist.select_mode_set(ELM_OBJECT_SELECT_MODE_NONE)
|
||||
|
@ -371,6 +376,8 @@ class SessionStatus(Table):
|
|||
sf.content = sel
|
||||
sf.show()
|
||||
|
||||
# TODO: Auto-paste magnet links from clipboard
|
||||
|
||||
magnet = Entry(self.top_widget)
|
||||
magnet.single_line = True
|
||||
magnet.scrollable = True
|
||||
|
|
Loading…
Reference in New Issue