mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
39dede0a58
commit
3d685b46b9
@ -35,14 +35,14 @@ def map_boundaries(cs, vertical, rtl):
|
|||||||
x_offset = 0
|
x_offset = 0
|
||||||
y_offset = 0
|
y_offset = 0
|
||||||
if not vertical:
|
if not vertical:
|
||||||
# Horizontal LTR
|
if rtl:
|
||||||
if not rtl:
|
# Horizontal RTL
|
||||||
if b.selected_prev:
|
|
||||||
x_offset = b.width
|
|
||||||
# Horizontal RTL
|
|
||||||
else:
|
|
||||||
if not b.selected_prev:
|
if not b.selected_prev:
|
||||||
x_offset = b.width
|
x_offset = b.width
|
||||||
|
else:
|
||||||
|
# Horizontal LTR
|
||||||
|
if b.selected_prev:
|
||||||
|
x_offset = b.width
|
||||||
else:
|
else:
|
||||||
# Vertical:
|
# Vertical:
|
||||||
if b.selected_prev:
|
if b.selected_prev:
|
||||||
@ -642,7 +642,7 @@ class SelectionBar:
|
|||||||
self.end_handle.style.display = 'none'
|
self.end_handle.style.display = 'none'
|
||||||
self.editor.style.display = 'none'
|
self.editor.style.display = 'none'
|
||||||
|
|
||||||
if not cs or cs.empty or jstype(cs.drag_mouse_position.x) is 'number' or cs.selection_change_caused_by_search:
|
if not cs or cs.empty or jstype(cs.drag_mouse_position?.x) is 'number' or cs.selection_change_caused_by_search:
|
||||||
return self.hide()
|
return self.hide()
|
||||||
|
|
||||||
if not cs.start.onscreen and not cs.end.onscreen:
|
if not cs.start.onscreen and not cs.end.onscreen:
|
||||||
@ -719,7 +719,7 @@ class SelectionBar:
|
|||||||
|
|
||||||
# Cap this to prevent very large handles when selecting images.
|
# Cap this to prevent very large handles when selecting images.
|
||||||
selection_size = min(60, selection_size)
|
selection_size = min(60, selection_size)
|
||||||
|
|
||||||
if not self.vertical:
|
if not self.vertical:
|
||||||
height = selection_size * 2
|
height = selection_size * 2
|
||||||
width = int(height * 2 / 3)
|
width = int(height * 2 / 3)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user