Remove overlay toggle from ebook audio overlay

Brings the behavior in line with the TTS based Read Aloud function
This commit is contained in:
Kovid Goyal 2023-10-24 12:20:42 +05:30
parent 4755458dcd
commit 606fe08e2b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 0 additions and 14 deletions

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1792" height="1792" viewBox="0 0 24 24"><path fill="currentColor" d="m19.775 22.6l-1.6-1.6H5q-.825 0-1.413-.588T3 19V5.825L1.4 4.2l1.4-1.4l18.4 18.4l-1.425 1.4ZM5 19h11.175L5 7.825V19Zm16-.825l-2-2V8h-8.175l-5-5H19q.825 0 1.413.588T21 5v13.175Z"/></svg>

Before

Width:  |  Height:  |  Size: 300 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1792" height="1792" viewBox="0 0 32 32"><path fill="currentColor" d="M28 8h-4V4a2.002 2.002 0 0 0-2-2H4a2.002 2.002 0 0 0-2 2v18a2.002 2.002 0 0 0 2 2h4v4a2.002 2.002 0 0 0 2 2h18a2.002 2.002 0 0 0 2-2V10a2.002 2.002 0 0 0-2-2ZM4 22V4h18v4H10a2.002 2.002 0 0 0-2 2v12Zm18 0h-2.586L10 12.586V10h2.586L22 19.416Zm-12-6.586L16.586 22H10Zm12.001 1.173L15.414 10H22ZM10 28v-4h12a2.002 2.002 0 0 0 2-2V10h4v18Z"/></svg>

Before

Width:  |  Height:  |  Size: 460 B

View File

@ -41,7 +41,6 @@ class ReadAudioEbook:
return
self.initialized = True
self.bar_id = unique_id("bar")
self.overlay_off = False
container = self.container
container.style.transition = "height 0.5s ease-in-out"
@ -75,7 +74,6 @@ class ReadAudioEbook:
id="audioButtons",
style='height: 3ex; display: flex; align-items: center; justify-content: center',
create_button("toggle", "pause", _("Toggle pause & play")),
create_button("overlay", "overlay-off", _("Toggle overlay for scrolling & text selection")),
),
E.div(
id="timeDisplay",
@ -268,16 +266,6 @@ class ReadAudioEbook:
elif self.state is PAUSED:
self.play()
def overlay(self):
if self.overlay_off:
self.overlay_off = False
self.container.style.height = "100%"
change_icon_image(document.getElementById("audio-ebook-bt-overlay"), "overlay-off")
else:
self.overlay_off = True
self.container.style.height = "3em"
change_icon_image(document.getElementById("audio-ebook-bt-overlay"), "overlay-on")
def on_container_clicked(self, ev):
if ev.button is not 0:
return