mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Show the overlay when clicking on the top margin
This commit is contained in:
parent
202528eda9
commit
a715d5f5ea
@ -68,11 +68,17 @@ class View:
|
||||
'content_loaded': self.on_content_loaded,
|
||||
}
|
||||
self.currently_showing = {}
|
||||
document.getElementById('book-top-margin').addEventListener('click', self.top_margin_clicked)
|
||||
|
||||
@property
|
||||
def iframe(self):
|
||||
return document.getElementById(iframe_id)
|
||||
|
||||
def top_margin_clicked(self, event):
|
||||
if event.button is 0:
|
||||
event.preventDefault(), event.stopPropagation()
|
||||
self.overlay.show()
|
||||
|
||||
def set_margins(self, no_margins):
|
||||
sd = get_session_data()
|
||||
margin_left = 0 if no_margins else sd.get('margin_left')
|
||||
|
Loading…
x
Reference in New Issue
Block a user