diff --git a/lector/definitionsdialog.py b/lector/definitionsdialog.py
index 6f6e043..bd2ef6b 100644
--- a/lector/definitionsdialog.py
+++ b/lector/definitionsdialog.py
@@ -41,6 +41,8 @@ class DefinitionsUI(QtWidgets.QDialog, definitions.Ui_Dialog):
mask = QtGui.QRegion(path.toFillPolygon().toPolygon())
self.setMask(mask)
+ self.definitionView.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
+
self.app_id = 'bb7a91f9'
self.app_key = 'fefacdf6775c347b52e9efa2efe642ef'
diff --git a/lector/widgets.py b/lector/widgets.py
index 8b71b49..ed9d5cd 100644
--- a/lector/widgets.py
+++ b/lector/widgets.py
@@ -48,6 +48,7 @@ class Tab(QtWidgets.QWidget):
self.parent = parent
self.metadata = metadata # Save progress data into this dictionary
self.are_we_doing_images_only = self.metadata['images_only']
+ self.is_fullscreen = False
self.main_window = self.window()
self.masterLayout = QtWidgets.QHBoxLayout(self)
@@ -264,24 +265,24 @@ class Tab(QtWidgets.QWidget):
'is_read': is_read}
def generate_keyboard_shortcuts(self):
- self.next_chapter = QtWidgets.QShortcut(
+ self.ksNextChapter = QtWidgets.QShortcut(
QtGui.QKeySequence('Right'), self.contentView)
- self.next_chapter.setObjectName('nextChapter')
- self.next_chapter.activated.connect(self.sneaky_change)
+ self.ksNextChapter.setObjectName('nextChapter')
+ self.ksNextChapter.activated.connect(self.sneaky_change)
- self.prev_chapter = QtWidgets.QShortcut(
+ self.ksPrevChapter = QtWidgets.QShortcut(
QtGui.QKeySequence('Left'), self.contentView)
- self.prev_chapter.setObjectName('prevChapter')
- self.prev_chapter.activated.connect(self.sneaky_change)
+ self.ksPrevChapter.setObjectName('prevChapter')
+ self.ksPrevChapter.activated.connect(self.sneaky_change)
- self.go_fs = QtWidgets.QShortcut(
+ self.ksGoFullscreen = QtWidgets.QShortcut(
QtGui.QKeySequence('F11'), self.contentView)
- self.go_fs.activated.connect(self.go_fullscreen)
+ self.ksGoFullscreen.activated.connect(self.go_fullscreen)
- self.exit_fs = QtWidgets.QShortcut(
+ self.ksExitFullscreen = QtWidgets.QShortcut(
QtGui.QKeySequence('Escape'), self.contentView)
- self.exit_fs.setContext(QtCore.Qt.ApplicationShortcut)
- self.exit_fs.activated.connect(self.exit_fullscreen)
+ self.ksExitFullscreen.setContext(QtCore.Qt.ApplicationShortcut)
+ self.ksExitFullscreen.activated.connect(self.exit_fullscreen)
def go_fullscreen(self):
if self.contentView.windowState() == QtCore.Qt.WindowFullScreen:
@@ -292,12 +293,14 @@ class Tab(QtWidgets.QWidget):
self.contentView.setWindowState(QtCore.Qt.WindowFullScreen)
self.contentView.show()
self.main_window.hide()
+ self.is_fullscreen = True
def exit_fullscreen(self):
self.main_window.show()
self.contentView.setWindowFlags(QtCore.Qt.Widget)
self.contentView.setWindowState(QtCore.Qt.WindowNoState)
self.contentView.show()
+ self.is_fullscreen = False
# Hide the view modification buttons in case they're visible
self.main_window.bookToolBar.customize_view_off()
@@ -692,9 +695,24 @@ class PliantQGraphicsView(QtWidgets.QGraphicsView):
saveAction = contextMenu.addAction(
self.main_window.QImageFactory.get_image('filesaveas'),
self._translate('PliantQGraphicsView', 'Save page as...'))
- toggleAction = contextMenu.addAction(
- self.main_window.QImageFactory.get_image('visibility'),
- self._translate('PliantQGraphicsView', 'Toggle distraction free mode'))
+
+ fsToggleAction = None
+ dfToggleAction = None
+ if self.parent.is_fullscreen:
+ fsToggleAction = contextMenu.addAction(
+ self.main_window.QImageFactory.get_image('view-fullscreen'),
+ self._translate('PliantQGraphicsView', 'Exit fullscreen'))
+ else:
+ if self.main_window.settings['show_bars']:
+ distraction_free_prompt = self._translate(
+ 'PliantQGraphicsView', 'Distraction Free mode')
+ else:
+ distraction_free_prompt = self._translate(
+ 'PliantQGraphicsView', 'Exit Distraction Free mode')
+
+ dfToggleAction = contextMenu.addAction(
+ self.main_window.QImageFactory.get_image('visibility'),
+ distraction_free_prompt)
viewSubMenu = contextMenu.addMenu('View')
viewSubMenu.setIcon(
@@ -720,7 +738,7 @@ class PliantQGraphicsView(QtWidgets.QGraphicsView):
self.main_window.QImageFactory.get_image('zoom-original'),
self._translate('PliantQGraphicsView', 'Original size (O)'))
- if not self.main_window.settings['show_bars']:
+ if not self.main_window.settings['show_bars'] or self.parent.is_fullscreen:
self.common_functions.generate_combo_box_action(contextMenu)
action = contextMenu.exec_(self.sender().mapToGlobal(position))
@@ -735,8 +753,10 @@ class PliantQGraphicsView(QtWidgets.QGraphicsView):
if save_file:
self.image_pixmap.save(save_file[0])
- if action == toggleAction:
+ if action == dfToggleAction:
self.main_window.toggle_distraction_free()
+ if action == fsToggleAction:
+ self.parent.exit_fullscreen()
view_action_dict = {
zoominAction: QtCore.Qt.Key_Plus,
@@ -834,11 +854,25 @@ class PliantQTextBrowser(QtWidgets.QTextBrowser):
self.main_window.QImageFactory.get_image('search'),
self._translate('PliantQTextBrowser', 'Search'))
- toggleAction = contextMenu.addAction(
- self.main_window.QImageFactory.get_image('visibility'),
- self._translate('PliantQTextBrowser', 'Toggle distraction free mode'))
+ fsToggleAction = None
+ dfToggleAction = None
+ if self.parent.is_fullscreen:
+ fsToggleAction = contextMenu.addAction(
+ self.main_window.QImageFactory.get_image('view-fullscreen'),
+ self._translate('PliantQTextBrowser', 'Exit fullscreen'))
+ else:
+ if self.main_window.settings['show_bars']:
+ distraction_free_prompt = self._translate(
+ 'PliantQTextBrowser', 'Distraction Free mode')
+ else:
+ distraction_free_prompt = self._translate(
+ 'PliantQTextBrowser', 'Exit Distraction Free mode')
- if not self.main_window.settings['show_bars']:
+ dfToggleAction = contextMenu.addAction(
+ self.main_window.QImageFactory.get_image('visibility'),
+ distraction_free_prompt)
+
+ if not self.main_window.settings['show_bars'] or self.parent.is_fullscreen:
self.common_functions.generate_combo_box_action(contextMenu)
action = contextMenu.exec_(self.sender().mapToGlobal(position))
@@ -847,7 +881,9 @@ class PliantQTextBrowser(QtWidgets.QTextBrowser):
self.main_window.definitionDialog.find_definition(selected_word)
if action == searchAction:
self.main_window.bookToolBar.searchBar.setFocus()
- if action == toggleAction:
+ if action == fsToggleAction:
+ self.parent.exit_fullscreen()
+ if action == dfToggleAction:
self.main_window.toggle_distraction_free()
def closeEvent(self, *args):
diff --git a/resources/translations/Lector_de.ts b/resources/translations/Lector_de.ts
index 36ca12a..5dfce02 100644
--- a/resources/translations/Lector_de.ts
+++ b/resources/translations/Lector_de.ts
@@ -116,7 +116,7 @@
DefinitionsUI
-
+
No definitions found in
Keine Definition gefunden in
@@ -139,97 +139,97 @@
Aussprache des Root-Wortes abspielen
-
+
Settings
Einstellungen
-
+
Library
Bibliothek
-
+
Switches
Schalter
-
+
Startup: Refresh library
Start: Bibliothek neu laden
-
+
Remember open files
Offen Dateien merken
-
+
Generate tags from files
Tags aus Dateien generieren
-
+
Dictionary:
Wörterbuch:
-
+
Cover shadows
Cover Schatten
-
+
Enabling reduces startup time and memory usage
Aktivierung verringert die benötigte Zeit zum Starten und die Speicher Nutzung
-
+
Load covers only when needed
Cover nur laden wenn benötigt
-
+
Greatly reduces page transition time at the cost of more memory
Drastische verkürzung der Seitenübergangszeit auf Kosten des Speichers
-
+
Cache comic / pdf pages
Comic / PDF Seiten zwischenspeichern
Restart to see changes
- Neustarten um Änderungen zu übernehmen
+ Neustarten um Änderungen zu übernehmen
-
+
Icon theme:
Symbol Thema:
-
+
Dar&k
Dun&kel
-
+
&Light
He&ll
-
+
Scan Library
Bibliothek scannen
-
+
Close
Schließen
-
+
About
Über
@@ -278,26 +278,42 @@
Cancel
Abbrechen
+
+
+ Horizontal scrolling with Alt + Scroll
+Reopen book to see changes
+
+
+
+
+ Hide scrollbars when reading
+
+
+
+
+ Restart application to see changes
+
+
Library
-
+
Author
Autor
-
+
Year
Jahr
-
+
manually added
Manuell hinzugefügt
-
+
books
@@ -366,87 +382,87 @@
Main_UI
-
+
Toggle distraction free mode (Ctrl + D)
Ablenkungsfreien Modus ein-/ausschalten (Strg + D)
-
+
Scan library
Biblothek scannen
-
+
Add books to database
Bücher zur Datenbank hinzufügen
-
+
eBooks
eBooks
-
+
Adding books...
Bücher werden hinzugefügt...
-
+
Confirm deletion
Löschen bestätigen
-
+
Save changes and start library scan
Änderungen speichern & Bibliotheksscan starten
-
+
Books
Bücher
-
+
Start reading
Lesen
-
+
Edit
Bearbeiten
-
+
Delete
Löschen
-
+
Mark read
Als gelesen kennzeichnen
-
+
Mark unread
Als ungelesen kennzeichnen
-
+
Manually Added
Manuell hinzugefügt
-
+
Save page as...
Seite speichern als...
-
+
Images
Bilder
-
+
books
@@ -467,12 +483,12 @@
PliantQGraphicsScene
-
+
Select new cover
Neues Cover auswählen
-
+
Images
Bilder
@@ -480,57 +496,87 @@
PliantQGraphicsView
-
+
Save page as...
Seite speichern als...
-
+
Zoom in (+)
Vergrößern (+)
-
+
Zoom out (-)
Verkleinern (-)
-
+
Fit width (W)
An Fensterbreite anpassen
-
+
Best fit (B)
-
+
Original size (O)
Original Größe (O)
Toggle distraction free mode
- Ablenkungsfreien Modus ein-/ausschalten
+ Ablenkungsfreien Modus ein-/ausschalten
+
+
+
+ Exit fullscreen
+
+
+
+
+ Distraction Free mode
+
+
+
+
+ Exit Distraction Free mode
+
PliantQTextBrowser
-
+
Define
Definieren
-
+
Search
Suchen
Toggle distraction free mode
- Ablenkungsfreien Modus ein-/ausschalten
+ Ablenkungsfreien Modus ein-/ausschalten
+
+
+
+ Exit fullscreen
+
+
+
+
+ Distraction Free mode
+
+
+
+
+ Exit Distraction Free mode
+
@@ -556,17 +602,17 @@
Änderungen speichern & Bibliotheksscan starten
-
+
Library scan in progress...
Bibliotheksscan in Arbeit...
-
+
Checking library folders
Bibliotheksverzeichnisse werden überprüft
-
+
Parsing files
Dateien werden analysiert
@@ -574,22 +620,22 @@
Tab
-
+
Bookmarks
Lesezeichen
-
+
New bookmark
Lesezeichen hinzufügen
-
+
Edit
Bearbeiten
-
+
Delete
Löschen
diff --git a/resources/translations/Lector_es.ts b/resources/translations/Lector_es.ts
index 843a2ab..cfd69c9 100644
--- a/resources/translations/Lector_es.ts
+++ b/resources/translations/Lector_es.ts
@@ -116,7 +116,7 @@
DefinitionsUI
-
+
No definitions found in
No se encontró ninguna definición en
@@ -139,97 +139,97 @@
Reproducir la pronunciación de la palabra raíz
-
+
Settings
Configuración
-
+
Library
Biblioteca
-
+
Switches
Modificadores
-
+
Startup: Refresh library
Inicio: actualizar la biblioteca
-
+
Remember open files
Recordar los archivos abiertos
-
+
Generate tags from files
Generar etiquetas a partir de los archivos
-
+
Dictionary:
Diccionario:
-
+
Cover shadows
Sombras en las cubiertas
-
+
Enabling reduces startup time and memory usage
Activar esta opción reduce el tiempo de inicio y el uso de memoria
-
+
Load covers only when needed
Cargar las cubiertas solo cuando se necesiten
-
+
Greatly reduces page transition time at the cost of more memory
Reduce en gran medida el tiempo de transición de las páginas a costa de más memoria
-
+
Cache comic / pdf pages
Almacenar en antememoria las páginas de cómics/PDF
Restart to see changes
- Reinicie la aplicación para ver los cambios
+ Reinicie la aplicación para ver los cambios
-
+
Icon theme:
Tema de iconos:
-
+
Dar&k
&Oscuro
-
+
&Light
&Claro
-
+
Scan Library
Explorar la biblioteca
-
+
Close
Cerrar
-
+
About
Acerca de
@@ -278,26 +278,42 @@
Cancel
Cancelar
+
+
+ Horizontal scrolling with Alt + Scroll
+Reopen book to see changes
+
+
+
+
+ Hide scrollbars when reading
+
+
+
+
+ Restart application to see changes
+
+
Library
-
+
Author
Autor
-
+
Year
Año
-
+
manually added
añadido manualmente
-
+
books
@@ -366,87 +382,87 @@
Main_UI
-
+
Toggle distraction free mode (Ctrl + D)
Alternar el modo de concentración (Ctrl + D)
-
+
Scan library
Explorar la biblioteca
-
+
Add books to database
Añadir libros a la base de datos
-
+
eBooks
Libros electrónicos
-
+
Adding books...
Añadiendo los libros…
-
+
Confirm deletion
Confirmar la eliminación
-
+
Save changes and start library scan
Guardar cambios e iniciar exploración de biblioteca
-
+
Books
Libros
-
+
Start reading
Comenzar a leer
-
+
Edit
Editar
-
+
Delete
Eliminar
-
+
Mark read
Marcar como leído
-
+
Mark unread
Marcar como no leído
-
+
Manually Added
Añadido manualmente
-
+
Save page as...
Guardar la página como…
-
+
Images
Imágenes
-
+
books
@@ -467,12 +483,12 @@
PliantQGraphicsScene
-
+
Select new cover
Seleccione una cubierta nueva
-
+
Images
Imágenes
@@ -480,68 +496,98 @@
PliantQGraphicsView
-
+
Save page as...
Guardar la página como…
-
+
Zoom in (+)
Ampliar (+)
-
+
Zoom out (-)
Reducir (-)
-
+
Fit width (W)
Ajustar a la anchura (W)
-
+
Best fit (B)
Ajuste perfecto (B)
-
+
Original size (O)
Tamaño original (O)
Toggle distraction free mode
- Alternar el modo de concentración
+ Alternar el modo de concentración
Table of Contents
Sumario
+
+
+ Exit fullscreen
+
+
+
+
+ Distraction Free mode
+
+
+
+
+ Exit Distraction Free mode
+
+
PliantQTextBrowser
-
+
Define
Definir
-
+
Search
Buscar
Toggle distraction free mode
- Alternar el modo de concentración
+ Alternar el modo de concentración
Table of Contents
Sumario
+
+
+ Exit fullscreen
+
+
+
+
+ Distraction Free mode
+
+
+
+
+ Exit Distraction Free mode
+
+
SettingsUI
@@ -566,17 +612,17 @@
Guardar cambios e iniciar exploración de biblioteca
-
+
Library scan in progress...
Se está explorando la biblioteca…
-
+
Checking library folders
Comprobando las carpetas de la biblioteca
-
+
Parsing files
Procesando los archivos
@@ -584,22 +630,22 @@
Tab
-
+
Bookmarks
Marcadores
-
+
New bookmark
Marcador nuevo
-
+
Edit
Editar
-
+
Delete
Eliminar
diff --git a/resources/translations/Lector_fr.ts b/resources/translations/Lector_fr.ts
index f7daa06..f02dd27 100644
--- a/resources/translations/Lector_fr.ts
+++ b/resources/translations/Lector_fr.ts
@@ -116,7 +116,7 @@
DefinitionsUI
-
+
No definitions found in
Aucune définitions trouvées dans
@@ -139,97 +139,97 @@
Lire la prononciation de la racine
-
+
Settings
Options
-
+
Library
Bibliothèque
-
+
Switches
Options
-
+
Startup: Refresh library
Au démarrage: Rafraîchir la bibliothèque
-
+
Remember open files
Se souvenir des fichiers ouverts
-
+
Generate tags from files
Générer des étiquettes à partir des fichiers
-
+
Dictionary:
Dictionnaire:
-
+
Cover shadows
Ombres des couverture
-
+
Enabling reduces startup time and memory usage
Si activé, réduit le temps de chargement et l'utilisation de la mémoire
-
+
Load covers only when needed
Charger les couvertures seulement quand nécessaire
-
+
Greatly reduces page transition time at the cost of more memory
Réduit grandement le temps de transition des pages contre plus d'utilisation de la mémoire
-
+
Cache comic / pdf pages
Mettre en cache les pages de bande dessinée / pdf
Restart to see changes
- Redémarrer pour voir les modifications
+ Redémarrer pour voir les modifications
-
+
Icon theme:
Thème d'icones:
-
+
Dar&k
Som&bre
-
+
&Light
C&lair
-
+
Scan Library
Analyser la bibliothèque
-
+
Close
Fermer
-
+
About
À propos
@@ -278,26 +278,42 @@
Cancel
Annuler
+
+
+ Horizontal scrolling with Alt + Scroll
+Reopen book to see changes
+
+
+
+
+ Hide scrollbars when reading
+
+
+
+
+ Restart application to see changes
+
+
Library
-
+
Author
Auteur
-
+
Year
Année
-
+
manually added
manuellement ajouté
-
+
books
@@ -366,87 +382,87 @@
Main_UI
-
+
Toggle distraction free mode (Ctrl + D)
Basculer en mode sans distraction (Ctrl + D)
-
+
Scan library
Analyser la bibliothèque
-
+
Add books to database
Ajouter des livres à la base de données
-
+
eBooks
eBooks
-
+
Adding books...
Ajout des livres…
-
+
Confirm deletion
Confirmez la suppression
-
+
Save changes and start library scan
Enregistrer les modifications et démarrer l'analyse de la bibliothèque
-
+
Books
Livres
-
+
Start reading
Commencer à lire
-
+
Edit
Modifier
-
+
Delete
Supprimer
-
+
Mark read
Marquer comme lu
-
+
Mark unread
Marquer comme non-lu
-
+
Manually Added
Manuellement ajouté
-
+
Save page as...
Enregistrerla page sous…
-
+
Images
Images
-
+
books
@@ -467,12 +483,12 @@
PliantQGraphicsScene
-
+
Select new cover
Choisissez une nouvelle couverture
-
+
Images
Images
@@ -480,57 +496,87 @@
PliantQGraphicsView
-
+
Save page as...
Enregistrerla page sous…
-
+
Zoom in (+)
Zoom avant (+)
-
+
Zoom out (-)
Zoom arrière (-)
-
+
Fit width (W)
Ajuster à la largeur (W)
-
+
Best fit (B)
Meilleur ajustement (B)
-
+
Original size (O)
Taille d'origine (O)
Toggle distraction free mode
- Basculer en mode sans distraction
+ Basculer en mode sans distraction
+
+
+
+ Exit fullscreen
+
+
+
+
+ Distraction Free mode
+
+
+
+
+ Exit Distraction Free mode
+
PliantQTextBrowser
-
+
Define
Définir
-
+
Search
Rechercher
Toggle distraction free mode
- Basculer en mode sans distraction
+ Basculer en mode sans distraction
+
+
+
+ Exit fullscreen
+
+
+
+
+ Distraction Free mode
+
+
+
+
+ Exit Distraction Free mode
+
@@ -556,17 +602,17 @@
Enregistrer les modifications et démarrer l'analyse de la bibliothèque
-
+
Library scan in progress...
Analyse de la bibliothèque en cours…
-
+
Checking library folders
Vérification des dossiers de la bibliothèque
-
+
Parsing files
Lecture des fichiers
@@ -574,22 +620,22 @@
Tab
-
+
Bookmarks
Marque-pages
-
+
New bookmark
Nouveau marque-page
-
+
Edit
Modifier
-
+
Delete
Supprimer
diff --git a/resources/translations/SAMPLE.ts b/resources/translations/SAMPLE.ts
index f8f81d8..548e6af 100644
--- a/resources/translations/SAMPLE.ts
+++ b/resources/translations/SAMPLE.ts
@@ -116,7 +116,7 @@
DefinitionsUI
-
+
No definitions found in
@@ -139,97 +139,92 @@
-
+
Settings
-
+
Library
-
+
Switches
-
+
Startup: Refresh library
-
+
Remember open files
-
+
Generate tags from files
-
+
Dictionary:
-
+
Cover shadows
-
+
Enabling reduces startup time and memory usage
-
+
Load covers only when needed
-
+
Greatly reduces page transition time at the cost of more memory
-
+
Cache comic / pdf pages
-
- Restart to see changes
-
-
-
-
+
Icon theme:
-
+
Dar&k
-
+
&Light
-
+
Scan Library
-
+
Close
-
+
About
@@ -278,26 +273,42 @@
Cancel
+
+
+ Horizontal scrolling with Alt + Scroll
+Reopen book to see changes
+
+
+
+
+ Hide scrollbars when reading
+
+
+
+
+ Restart application to see changes
+
+
Library
-
+
Author
-
+
Year
-
+
manually added
-
+
books
@@ -366,87 +377,87 @@
Main_UI
-
+
Toggle distraction free mode (Ctrl + D)
-
+
Scan library
-
+
Add books to database
-
+
eBooks
-
+
Adding books...
-
+
Confirm deletion
-
+
Save changes and start library scan
-
+
Books
-
+
Start reading
-
+
Edit
-
+
Delete
-
+
Mark read
-
+
Mark unread
-
+
Manually Added
-
+
Save page as...
-
+
Images
-
+
books
@@ -467,12 +478,12 @@
PliantQGraphicsScene
-
+
Select new cover
-
+
Images
@@ -480,56 +491,76 @@
PliantQGraphicsView
-
+
Save page as...
-
+
Zoom in (+)
-
+
Zoom out (-)
-
+
Fit width (W)
-
+
Best fit (B)
-
+
Original size (O)
-
- Toggle distraction free mode
+
+ Exit fullscreen
+
+
+
+
+ Distraction Free mode
+
+
+
+
+ Exit Distraction Free mode
PliantQTextBrowser
-
+
Define
-
+
Search
-
- Toggle distraction free mode
+
+ Exit fullscreen
+
+
+
+
+ Distraction Free mode
+
+
+
+
+ Exit Distraction Free mode
@@ -556,17 +587,17 @@
-
+
Library scan in progress...
-
+
Checking library folders
-
+
Parsing files
@@ -574,22 +605,22 @@
Tab
-
+
Bookmarks
-
+
New bookmark
-
+
Edit
-
+
Delete