mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-28 11:00:33 +00:00
Allowed float sizes of Popups between 0.0 and 1.0 which make them take specified amount of available screen space, made help popups larger
This commit is contained in:
parent
11e3a66484
commit
718bf57b5d
@ -1195,7 +1195,7 @@ class AllTorrents(BaseMode, component.Component):
|
||||
elif chr(c) == 'f':
|
||||
self._show_torrent_filter_popup()
|
||||
elif chr(c) == 'h':
|
||||
self.popup = Popup(self,"Help",init_lines=self.__help_lines)
|
||||
self.popup = Popup(self,"Help",init_lines=self.__help_lines, height_req = 0.75)
|
||||
elif chr(c) == 'p':
|
||||
self.show_preferences()
|
||||
return
|
||||
|
@ -106,8 +106,15 @@ class Popup:
|
||||
crow+=1
|
||||
|
||||
def handle_resize(self):
|
||||
hr = self.height_req
|
||||
wr = self.width_req
|
||||
if isinstance(self.height_req, float) and 0.0 < self.height_req <= 1.0:
|
||||
hr = int( (self.parent.rows - 2) * self.height_req )
|
||||
else:
|
||||
hr = self.height_req
|
||||
|
||||
if isinstance(self.width_req, float) and 0.0 < self.width_req <= 1.0:
|
||||
wr = int( (self.parent.cols - 2) * self.width_req )
|
||||
else:
|
||||
wr = self.width_req
|
||||
|
||||
log.debug("Resizing(or creating) popup window")
|
||||
|
||||
|
@ -740,6 +740,6 @@ class TorrentDetail(BaseMode, component.Component):
|
||||
torrent_actions_popup(self,[self.torrentid],action=ACTION.TORRENT_OPTIONS)
|
||||
return
|
||||
elif chr(c) == 'h':
|
||||
self.popup = Popup(self,"Help",init_lines=self.__help_lines)
|
||||
self.popup = Popup(self,"Help",init_lines=self.__help_lines, height_req=0.75)
|
||||
|
||||
self.refresh()
|
||||
|
Loading…
x
Reference in New Issue
Block a user