diff --git a/i18n/manuskript.pro b/i18n/manuskript.pro index 833c926..13f9a82 100644 --- a/i18n/manuskript.pro +++ b/i18n/manuskript.pro @@ -12,6 +12,7 @@ FORMS += ../manuskript/ui/editors/textFormat_ui.ui FORMS += ../manuskript/ui/editors/locker_ui.ui FORMS += ../manuskript/ui/editors/completer_ui.ui FORMS += ../manuskript/ui/editors/mainEditor_ui.ui +FORMS += ../manuskript/ui/editors/tabSplitter_ui.ui FORMS += ../manuskript/ui/views/propertiesView_ui.ui FORMS += ../manuskript/ui/views/metadataView_ui.ui @@ -39,6 +40,7 @@ SOURCES += ../manuskript/ui/editors/fullScreenEditor.py SOURCES += ../manuskript/ui/editors/locker.py SOURCES += ../manuskript/ui/editors/mainEditor.py SOURCES += ../manuskript/ui/editors/textFormat.py +SOURCES += ../manuskript/ui/editors/tabSplitter.py SOURCES += ../manuskript/ui/helpLabel.py SOURCES += ../manuskript/ui/revisions.py SOURCES += ../manuskript/ui/search.py diff --git a/i18n/manuskript_es.ts b/i18n/manuskript_es.ts index 3b8e608..78c1f1c 100644 --- a/i18n/manuskript_es.ts +++ b/i18n/manuskript_es.ts @@ -1,6 +1,5 @@ - - + FrequencyAnalyzer @@ -52,7 +51,7 @@ MainWindow - + General General @@ -97,7 +96,7 @@ Autor - + Name Nombre @@ -107,7 +106,7 @@ Email - + Summary Resumen @@ -117,7 +116,7 @@ Situación: - + Summary: Resumen: @@ -127,17 +126,17 @@ Una frase - + One paragraph Un párrafo - + One page Una página - + Full Completo @@ -167,7 +166,7 @@ Resumen completo - + Next Siguiente @@ -187,497 +186,496 @@ Nombres - + Filter Filtro - + Basic infos Informaciónes básicas - + Importance Importancia - + Motivation Motivación - + Goal Objetivo - + Conflict Conflicto - + Epiphany Epifanía - + <html><head/><body><p align="right">One sentence<br/>summary</p></body></html> <html><head/><body><p align="right">Resumen de<br/>una frase</p></body></html> - + <html><head/><body><p align="right">One paragraph<br/>summary</p></body></html> <html><head/><body><p align="right">Resumen de<br/>un párrafo</p></body></html> - + Notes Notas - + Detailed infos Informaciones detalladas - + Plots Tramas - + Plot Trama - + Character(s) Personaje(s) - + Description Descripción - + Result Resultado - + Resolution steps Pasos para la resolución - + World Mundo - + Populates with empty data Rellenas con datos vacíos - + More Más - + Source of passion Fuente de la pasión - + Source of conflict Fuente del conflicto - + Outline - Need to search a good word for this one - + Redaction Redacción - + Debug Depurar - + FlatData Datos Planos - + Persos - + Labels Etiquetas - + &File &Archivo - + &Recents &Recientes - + &Mode &Modo - + &Help A&yuda - + &Tools &Herramientas - + &View &Ver - + &Cheat sheet &Chuleta - + Sea&rch &Buscar - + &Navigation &Navegación - + &Open &Abrir - + Ctrl+O Ctrl+O - + &Save &Guardar - + Ctrl+S Ctrl+S - + Sa&ve as... G&uardar Como... - + Ctrl+Shift+S Ctrl+Shift+S - + &Quit &Quitar - + Ctrl+Q Ctrl+Q - + &Show help texts &Ver textos de ayuda - + Ctrl+Shift+B Ctrl+Shift+B - + &Spellcheck &Corrector Ortográfico - + F9 F9 - + &Labels... &Etiquetas... - + &Status... E&stado... - + Tree Árbol - + &Simple &Simple - + Index cards Fichas - + S&ettings &Preferencias - + F8 F8 - + &Close project &Cerrar proyecto - + Co&mpile C&ompilar - + F6 F6 - + &Frequency Analyzer A&nalizador de frecuencia - + &Fiction &Ficción - + S&nowflake S&nowflake - + The file {} does not exist. Try again. El archivo {} no existe. Inténtelo de nuevo. - + Project {} saved. Proyecto {} guardado. - + Project {} loaded. Proyecto {} cargado. - + Project {} loaded with some errors: Proyecto {} cargado con algunos errores: - + * {} wasn't found in project file. * {} no se encontró en el archivo del proyecto. - + Project {} loaded with some errors. Proyecto {} cargado con algunos errores. - + (~{} pages) (~{} páginas) - + Words: {}{} Palabras: {}{} - + Book summary Resumen del libro - + Project tree Árbol del proyecto - + Metadata Metadata - + Story line Historia - + Enter infos about your book, and yourself. Introduzca información acerca de tu libro y sobre ti mismo. - + The basic situation, in the form of a 'What if...?' question. Ex: 'What if the most dangerous evil wizard could wasn't abled to kill a baby?' (Harry Potter) La situación básica en la forma de una pregunta tipo "¿Que pasaría sí...?'. Ej:"¿Que pasaría si el más peligroso hechicero malvado no pudiera ser capaz de matar un bebe?" (Harry Potter) - + Take time to think about a one sentence (~50 words) summary of your book. Then expand it to a paragraph, then to a page, then to a full summary. Tómate tu tiempo para pensar en resumen de una linea (apróximadamente 50 palabras) de tu libro. Después expándelo hasta un párrafo, después hasta una página, y por último hasta un resumen completo. - + Create your characters. Crea tus personajes. - + Develop plots. Desarrolla las tramas. - + Create the outline of your masterpiece. Crea el esquema de tu obra maestra. - + Write. Escribe. - + Debug infos. Sometimes useful. Depura la información. A veces es útil. - + Dictionary Diccionario - + Install PyEnchant to use spellcheck Instala PyEnchant para usar el chequeo ortográfico - + Nothing Ninguno - + POV - + Label Etiqueta - + Progress Progreso - + Compile Compilar - + Icon color Color del icono - + Text color Color del texto - + Background color Color del Fondo - + Icon Icono - + Text Texto - + Background Fondo - + Border Borde - + Corner Esquina - + &Edit &Editar @@ -1228,10 +1226,20 @@ SpellAction - + Spelling Suggestions Sugerencias de Ortografía + + + &Add to dictionary + + + + + &Remove from custom dictionary + + app @@ -1323,42 +1331,42 @@ Formulario - + Filter (type the name of anything in your project) Filtro (escribe el nombre de cualquier elemento de tu proyecto) - + Minor Menor - + Secondary Secundario - + Main Principal - + Characters Personajes - + Texts Textos - + Plots Tramas - + World Mundo @@ -1410,9 +1418,8 @@ collapsibleDockWidgets - + Dock Widgets Toolbar - I must search the oficial translation for QT DockWidgets @@ -1654,12 +1661,12 @@ Formulario - + Text Texto - + Index cards Fichas @@ -1669,22 +1676,22 @@ Esquema - + F11 - + Root Raíz - + {} words / {} {} palabras / {} - + {} words {} palabras @@ -1717,12 +1724,12 @@ Resumen completo - + Notes / References Noras / Referencias - + Revisions Revisiones @@ -1914,7 +1921,6 @@ Resolution - without compilating I don't know if it means 'resolución' or 'propósito' Resolución @@ -2361,7 +2367,7 @@ Formulario - + Options Opciones @@ -2449,80 +2455,85 @@ Formulario - + Search in: Buscar en: - + All Todo - + Title Título - + Text Texto - + Summary Resumen - + Notes Notas - + POV - + Status Estado - + Label Etiqueta - + Options: Opciones: - + Case sensitive Distingue mayúsculas y minúsculas + + + Search for... + + settingsWindow - + New status Nuevo estado - + New label Nueva etiqueta - + newtheme nuevotema - + New theme Nuevo Tema @@ -2573,16 +2584,39 @@ - + Show Plots Ver Tramas - + Show Characters Ver Personajes + + tabSplitter + + + Open selected items in that view. + + + + + Split horizontally + + + + + Close split + + + + + Split vertically + + + textEditCompleter @@ -2594,7 +2628,7 @@ textEditView - + Various Varios @@ -2708,27 +2742,27 @@ Vacía - + Novel Novela - + Novella Novela Corta - + Short Story Cuento - + Research paper Árticulo de investigación - + Demo projects Proyectos de ejemplo @@ -2763,133 +2797,132 @@ Crear - + Open project Abrir proyecto - + Manuskript project (*.msk);;All files (*) Proyecto de Manuskript (*.msk);;Todos los ficheros (*) - + Save project as... Guardar proyecto como... - + Manuskript project (*.msk) Proyecto de Manuskript (*.msk) - + Create New Project Crear un Proyecto Nuevo - + Empty fiction Ficción vacía - + Chapter Capítulo - + Scene Escena - + Trilogy Trilogía - + Book Libro - + Section Sección - + Empty non-fiction No-Ficción vacía - + words each. - I need to see the context - + of de - + Text Texto - + Something Algo - + <b>Total:</b> {} words (~ {} pages) <b>Total:</b> {} palabras (~ {} páginas) - + Fiction Ficción - + Non-fiction No-ficción - + Idea - + Note Nota - + Research Investigación - + TODO POR HACER - + First draft Primer borrador - + Second draft Segundo borrador - + Final diff --git a/i18n/manuskript_fr.ts b/i18n/manuskript_fr.ts index 82bee14..f1316ef 100644 --- a/i18n/manuskript_fr.ts +++ b/i18n/manuskript_fr.ts @@ -1,6 +1,5 @@ - - + FrequencyAnalyzer @@ -92,7 +91,7 @@ Informations sur l'auteur - + Name Nom @@ -102,7 +101,7 @@ Email - + Summary Résumé @@ -117,12 +116,12 @@ Résumé en une phrase - + Next Suivant - + One paragraph Un paragraphe @@ -132,7 +131,7 @@ Résumé en un paragraphe - + One page Une page @@ -142,7 +141,7 @@ Développez chaque phrase du paragraphe précédent en un paragraphe complet - + Full Complet @@ -167,152 +166,152 @@ Noms - + Filter Filtre - + Basic infos Informations générales - + Importance Importance - + Motivation Motivation - + Goal Cible - + Conflict Conflit - + Epiphany Épiphanie - + <html><head/><body><p align="right">One sentence<br/>summary</p></body></html> <html><head/><body><p align="right">Résumé<br/>en une phrase</p></body></html> - + <html><head/><body><p align="right">One paragraph<br/>summary</p></body></html> <html><head/><body><p align="right">Résumé<br/>en un paragraphe</p></body></html> - + Notes Notes - + Detailed infos Informations détaillées - + Plots Intrigues - + Plot Intrigue - + Character(s) Personnage(s) - + Description Description - + Result Résultat - + Resolution steps Étapes de résolution - + Outline Plan - + Redaction Rédaction - + Debug Debug - + FlatData FlatData - + Persos Persos - + &Help &Aide - + Ctrl+O - + Ctrl+S Ctrl+S - + Ctrl+Shift+S - + Ctrl+Q - + Ctrl+Shift+B - + F8 - + Labels Labels @@ -322,7 +321,7 @@ Situation: - + Summary: Résumé: @@ -332,349 +331,349 @@ Et si...? - + Index cards Cartes - + F9 F9 - + Tree Arbre - + Compile Compilation - + F6 F6 - + World Monde - + Populates with empty data Remplir avec des catégories vides - + General Général - + More Plus - + Source of passion Source de passion - + Source of conflict Source de conflit - + The file {} does not exist. Try again. Le fichier {} n'existe pas. Essayez encore. - + Project {} saved. Le projet {} a été enregistré. - + Project {} loaded. Le projet {} a été chargé. - + Project {} loaded with some errors: Le projet {} a été chargé, avec des erreurs: - + * {} wasn't found in project file. * {} n'a pas été trouvé dans le fichier du projet. - + Project {} loaded with some errors. Le projet {} a été chargé avec des erreurs. - + (~{} pages) (~{} pages) - + Words: {}{} Mots: {}{} - + Book summary Résumé du livre - + Project tree Arborescence - + Metadata Métadonnées - + Enter infos about your book, and yourself. Entrez toutes les informations relatives au livre, ainsi qu'à vous. - + Create your characters. Créez ici vos personnage. - + Develop plots. Développez vos intrigues. - + Create the outline of your masterpiece. Créez le plan de votre chef-d'œuvre. - + Write. Écrivez. - + Debug infos. Sometimes useful. Des infos pour débugger des fois pendant qu'on code c'est utile. - + Dictionary Dictionnaire - + Install PyEnchant to use spellcheck Installez PyEnchant pour profiter du correcteur orthographique - + Nothing Rien - + POV POV - + Label Label - + Progress Progrès - + Icon color Couleur de l'icone - + Text color Couleur du texte - + Background color Couleur de l'arrière-plan - + Icon Icone - + Text Texte - + Background Arrière-plan - + Border Bordure - + Corner Coin - + &File &Fichier - + &Recents &Récents - + &Tools &Outils - + &View &Vue - + &Mode &Mode - + &Cheat sheet &Feuille de triche - + Sea&rch &Recherche - + &Navigation &Navigation - + &Open &Ouvrir - + &Save &Enregistrer - + Sa&ve as... Enre&gistrer sous… - + &Quit &Quitter - + &Show help texts &Afficher les bulles d'aides - + &Spellcheck &Correcteur orthographique - + &Labels... &Labels… - + &Status... &Status… - + &Simple &Simple - + &Fiction &Fiction - + S&nowflake S&nowflage - + S&ettings &Réglages - + &Close project &Fermer le projet - + Co&mpile Co&mpiler - + &Frequency Analyzer &Analyseur de fréquence - + Story line - + The basic situation, in the form of a 'What if...?' question. Ex: 'What if the most dangerous evil wizard could wasn't abled to kill a baby?' (Harry Potter) La situation de base, sous la forme d'une question "Et si…?". Par exemple: "Et si le plus dangereux des sorciers maléfiques n'était pas capable de tuer un petit bébé?" (Harry Potter) - + Take time to think about a one sentence (~50 words) summary of your book. Then expand it to a paragraph, then to a page, then to a full summary. Prenez le temps de penser à une phrase (~50 mots) qui résume votre livre. Ensuite, développez-là en un paragraphe, puis une page, puis un résumé complet. - + &Edit &Édition @@ -1226,10 +1225,20 @@ des lignes: SpellAction - + Spelling Suggestions Suggestions + + + &Add to dictionary + + + + + &Remove from custom dictionary + + app @@ -1321,42 +1330,42 @@ des lignes: Form - + Minor Mineur - + Secondary Secondaire - + Main Principal - + Characters Personnages - + Texts Textes - + Plots Intrigues - + World Monde - + Filter (type the name of anything in your project) Filtrer (taper le nom de quoi que ce soit dans votre projet) @@ -1408,7 +1417,7 @@ des lignes: collapsibleDockWidgets - + Dock Widgets Toolbar @@ -1646,17 +1655,17 @@ des lignes: mainEditor - + Root Racine - + {} words / {} {} mots / {} - + {} words {} mots @@ -1666,12 +1675,12 @@ des lignes: Form - + Text Texte - + Index cards Cartes @@ -1681,7 +1690,7 @@ des lignes: Plan - + F11 F11 @@ -1709,12 +1718,12 @@ des lignes: Résumé en une ligne - + Notes / References Notes / Références - + Revisions Révisions @@ -2392,7 +2401,7 @@ des lignes: Il y a {} secondes - + Options Options @@ -2445,80 +2454,85 @@ des lignes: Form - + Search in: Rechercher dans: - + All Tout - + Title Titre - + Text Texte - + Summary Résumé - + Notes Notes - + POV POV - + Status Status - + Label Label - + Options: Options: - + Case sensitive Sensible à la casse + + + Search for... + + settingsWindow - + New status Nouveau status - + New label Nouveau label - + newtheme nouveautheme - + New theme Nouveau Thème @@ -2569,16 +2583,39 @@ des lignes: - - + Show Plots Montrer les intrigues - + Show Characters Montrer les personnages + + tabSplitter + + + Open selected items in that view. + + + + + Split horizontally + + + + + Close split + + + + + Split vertically + + + textEditCompleter @@ -2590,7 +2627,7 @@ des lignes: textEditView - + Various Différentes valeurs @@ -2704,27 +2741,27 @@ des lignes: Vide - + Novel Roman - + Novella Nouvelle - + Short Story Histoire courte - + Research paper Article académique - + Demo projects Projets de démonstration @@ -2759,132 +2796,132 @@ des lignes: Créer - + Open project Ouvrir le projet - + Manuskript project (*.msk) Projet Manuskript (*.msk) - + Save project as... Enregistrer le projer sous... - + Create New Project Créer un nouveau projet - + Chapter Chapitre - + Scene Scène - + Trilogy Trilogie - + Book Livre - + Section Section - + words each. mots chacun(e). - + of de - + Text Texte - + Something Quelque chose - + <b>Total:</b> {} words (~ {} pages) <b>Total:</b> {} mots (~ {} pages) - + Idea Idée - + Note Note - + Research Recherche - + TODO TODO - + First draft Premier brouillon - + Second draft Second brouillon - + Final Final - + Manuskript project (*.msk);;All files (*) Projet manuskript (*.msk);;Tous les fichiers (*) - + Empty fiction Fiction vide - + Empty non-fiction Non-fiction vide - + Fiction Fiction - + Non-fiction Non-fiction diff --git a/manuskript/ui/cheatSheet.py b/manuskript/ui/cheatSheet.py index 2e3a440..f6691a8 100644 --- a/manuskript/ui/cheatSheet.py +++ b/manuskript/ui/cheatSheet.py @@ -8,6 +8,7 @@ from manuskript.enums import Character from manuskript.enums import Plot from manuskript.functions import lightBlue from manuskript.functions import mainWindow +from manuskript.ui import style from manuskript.ui.cheatSheet_ui import Ui_cheatSheet from manuskript.models import references as Ref from manuskript.ui.editors.completer import completer @@ -19,6 +20,7 @@ class cheatSheet(QWidget, Ui_cheatSheet): def __init__(self, parent=None): QWidget.__init__(self, parent) self.setupUi(self) + self.txtFilter.setStyleSheet(style.lineEditSS()) self.splitter.setStretchFactor(0, 5) self.splitter.setStretchFactor(1, 70) diff --git a/manuskript/ui/editors/mainEditor.py b/manuskript/ui/editors/mainEditor.py index 134f669..359ebe4 100644 --- a/manuskript/ui/editors/mainEditor.py +++ b/manuskript/ui/editors/mainEditor.py @@ -9,7 +9,7 @@ from PyQt5.QtWidgets import QWidget, qApp from manuskript import settings from manuskript.enums import Outline -from manuskript.functions import AUC, mainWindow, drawProgress +from manuskript.functions import AUC, mainWindow, drawProgress, appPath from manuskript.ui import style from manuskript.ui.editors.editorWidget import editorWidget from manuskript.ui.editors.fullScreenEditor import fullScreenEditor @@ -49,11 +49,11 @@ class mainEditor(QWidget, Ui_mainEditor): # Cf. https://github.com/qtproject/qtbase/commit/a8621a3f85e64f1252a80ae81a6e22554f7b3f44 # Since those are important, we provide fallback. self.btnRedacFolderCork.setIcon(QIcon.fromTheme("view-cards", - QIcon("../icons/NumixMsk/256x256/actions/view-cards.svg"))) + QIcon(appPath("icons/NumixMsk/256x256/actions/view-cards.svg")))) self.btnRedacFolderOutline.setIcon(QIcon.fromTheme("view-outline", - QIcon("../icons/NumixMsk/256x256/actions/view-outline.svg"))) + QIcon(appPath("icons/NumixMsk/256x256/actions/view-outline.svg")))) self.btnRedacFolderText.setIcon(QIcon.fromTheme("view-text", - QIcon("../icons/NumixMsk/256x256/actions/view-text.svg"))) + QIcon(appPath("icons/NumixMsk/256x256/actions/view-text.svg")))) for btn in [self.btnRedacFolderCork, self.btnRedacFolderText, self.btnRedacFolderOutline]: btn.setToolTip(btn.text()) diff --git a/manuskript/ui/editors/tabSplitter.py b/manuskript/ui/editors/tabSplitter.py index a6a4dd1..5410b8f 100644 --- a/manuskript/ui/editors/tabSplitter.py +++ b/manuskript/ui/editors/tabSplitter.py @@ -6,7 +6,7 @@ from PyQt5.QtCore import QModelIndex, QRect, QPoint, Qt, QObject, QSize from PyQt5.QtGui import QIcon, QPalette from PyQt5.QtWidgets import QWidget, QPushButton, qApp -from manuskript.functions import mainWindow +from manuskript.functions import mainWindow, appPath from manuskript.ui import style from manuskript.ui.editors.tabSplitter_ui import Ui_tabSplitter @@ -42,6 +42,7 @@ class tabSplitter(QWidget, Ui_tabSplitter): self.btnTarget.setFlat(True) self.btnTarget.setObjectName("btnTarget") self.btnTarget.clicked.connect(self.setTarget) + self.btnTarget.setToolTip(self.tr("Open selected items in that view.")) self.updateTargetIcon(self.isTarget) self.mainEditor = mainEditor or parent @@ -89,8 +90,8 @@ class tabSplitter(QWidget, Ui_tabSplitter): def restoreOpenIndexes(self, openIndexes): try: - - self.split(state=openIndexes[0]) + if openIndexes[1]: + self.split(state=openIndexes[0]) for i in openIndexes[1]: idx = mainWindow().mdlOutline.getIndexByID(i) @@ -114,7 +115,7 @@ class tabSplitter(QWidget, Ui_tabSplitter): self.updateTargetIcon(self.isTarget) def updateTargetIcon(self, val): - icon = QIcon.fromTheme("set-target", QIcon("../icons/NumixMsk/256x256/actions/set-target.svg")) + icon = QIcon.fromTheme("set-target", QIcon(appPath("icons/NumixMsk/256x256/actions/set-target.svg"))) if not val: icon = QIcon(icon.pixmap(128, 128, icon.Disabled)) self.btnTarget.setIcon(icon) @@ -211,16 +212,22 @@ class tabSplitter(QWidget, Ui_tabSplitter): def eventFilter(self, object, event): if object == self.btnSplit and event.type() == event.HoverEnter: - self.setAutoFillBackground(True) + # self.setAutoFillBackground(True) + # self.setBackgroundRole(QPalette.Highlight) + # self.splitter.setAutoFillBackground(True) # self.splitter.setStyleSheet("""QSplitter#{}{{ # border:1px solid darkblue; # }}""".format(self.splitter.objectName())) - self.setBackgroundRole(QPalette.Highlight) + + self.setStyleSheet(style.mainEditorTabSS() + "QWidget{{background:{};}}".format(style.bgHover)) elif object == self.btnSplit and event.type() == event.HoverLeave: - self.setAutoFillBackground(False) + # self.setAutoFillBackground(False) + # self.setBackgroundRole(QPalette.Window) + # self.splitter.setStyleSheet("""QSplitter#{}{{ # border: 1px solid transparent; # }}""".format(self.splitter.objectName())) - self.setBackgroundRole(QPalette.Window) + + self.setStyleSheet(style.mainEditorTabSS()) return QWidget.eventFilter(self, object, event) \ No newline at end of file diff --git a/manuskript/ui/mainWindow.py b/manuskript/ui/mainWindow.py index e4bde91..5fb10e2 100644 --- a/manuskript/ui/mainWindow.py +++ b/manuskript/ui/mainWindow.py @@ -2,8 +2,7 @@ # Form implementation generated from reading ui file 'manuskript/ui/mainWindow.ui' # -# Created: Fri Apr 8 18:22:09 2016 -# by: PyQt5 UI code generator 5.2.1 +# Created by: PyQt5 UI code generator 5.4.2 # # WARNING! All changes made in this file will be lost! @@ -17,8 +16,8 @@ class Ui_MainWindow(object): self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.centralwidget) - self.horizontalLayout_2.setSpacing(0) self.horizontalLayout_2.setContentsMargins(0, 1, 0, 0) + self.horizontalLayout_2.setSpacing(0) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.stack = QtWidgets.QStackedWidget(self.centralwidget) self.stack.setObjectName("stack") @@ -822,7 +821,6 @@ class Ui_MainWindow(object): self.layoutWidget = QtWidgets.QWidget(self.splitterOutlineH) self.layoutWidget.setObjectName("layoutWidget") self.verticalLayout_14 = QtWidgets.QVBoxLayout(self.layoutWidget) - self.verticalLayout_14.setContentsMargins(0, 0, 0, 0) self.verticalLayout_14.setObjectName("verticalLayout_14") self.splitterOutlineV = QtWidgets.QSplitter(self.layoutWidget) self.splitterOutlineV.setOrientation(QtCore.Qt.Vertical) @@ -1326,18 +1324,18 @@ class Ui_MainWindow(object): self.actCompile.setShortcut(_translate("MainWindow", "F6")) self.actToolFrequency.setText(_translate("MainWindow", "&Frequency Analyzer")) +from manuskript.ui.cheatSheet import cheatSheet +from manuskript.ui.editors.mainEditor import mainEditor +from manuskript.ui.search import search +from manuskript.ui.views.basicItemView import basicItemView +from manuskript.ui.views.characterTreeView import characterTreeView +from manuskript.ui.views.lineEditView import lineEditView +from manuskript.ui.views.metadataView import metadataView +from manuskript.ui.views.outlineView import outlineView from manuskript.ui.views.plotTreeView import plotTreeView from manuskript.ui.views.sldImportance import sldImportance -from manuskript.ui.views.metadataView import metadataView -from manuskript.ui.search import search -from manuskript.ui.views.lineEditView import lineEditView -from manuskript.ui.views.basicItemView import basicItemView -from manuskript.ui.views.textEditView import textEditView -from manuskript.ui.welcome import welcome -from manuskript.ui.editors.mainEditor import mainEditor from manuskript.ui.views.storylineView import storylineView from manuskript.ui.views.textEditCompleter import textEditCompleter +from manuskript.ui.views.textEditView import textEditView from manuskript.ui.views.treeView import treeView -from manuskript.ui.views.characterTreeView import characterTreeView -from manuskript.ui.views.outlineView import outlineView -from manuskript.ui.cheatSheet import cheatSheet +from manuskript.ui.welcome import welcome diff --git a/manuskript/ui/search.py b/manuskript/ui/search.py index bc388f0..eccbd89 100644 --- a/manuskript/ui/search.py +++ b/manuskript/ui/search.py @@ -6,6 +6,7 @@ from PyQt5.QtWidgets import QWidget, QMenu, QAction, qApp, QListWidgetItem, QSty from manuskript.enums import Outline from manuskript.functions import mainWindow +from manuskript.ui import style from manuskript.ui.search_ui import Ui_search from manuskript.models import references as Ref @@ -34,6 +35,9 @@ class search(QWidget, Ui_search): self.result.setItemDelegate(self.delegate) self.result.itemActivated.connect(self.openItem) + self.result.setStyleSheet(style.searchResultSS()) + self.text.setStyleSheet(style.lineEditSS()) + def generateOptionMenu(self): self.menu = QMenu(self) a = QAction(self.tr("Search in:"), self.menu) diff --git a/manuskript/ui/search_ui.py b/manuskript/ui/search_ui.py index dc3b24b..d9f5c31 100644 --- a/manuskript/ui/search_ui.py +++ b/manuskript/ui/search_ui.py @@ -2,8 +2,7 @@ # Form implementation generated from reading ui file 'manuskript/ui/search_ui.ui' # -# Created: Fri Apr 8 18:15:49 2016 -# by: PyQt5 UI code generator 5.2.1 +# Created by: PyQt5 UI code generator 5.4.2 # # WARNING! All changes made in this file will be lost! @@ -14,13 +13,14 @@ class Ui_search(object): search.setObjectName("search") search.resize(400, 300) self.verticalLayout = QtWidgets.QVBoxLayout(search) - self.verticalLayout.setSpacing(0) self.verticalLayout.setContentsMargins(0, 0, 0, 0) + self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName("verticalLayout") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName("horizontalLayout") self.text = QtWidgets.QLineEdit(search) + self.text.setInputMask("") self.text.setFrame(False) self.text.setClearButtonEnabled(True) self.text.setObjectName("text") @@ -45,4 +45,5 @@ class Ui_search(object): def retranslateUi(self, search): _translate = QtCore.QCoreApplication.translate search.setWindowTitle(_translate("search", "Form")) + self.text.setPlaceholderText(_translate("search", "Search for...")) diff --git a/manuskript/ui/search_ui.ui b/manuskript/ui/search_ui.ui index 55c443b..1b63fdc 100644 --- a/manuskript/ui/search_ui.ui +++ b/manuskript/ui/search_ui.ui @@ -36,9 +36,15 @@ + + + false + + Search for... + true diff --git a/manuskript/ui/style.py b/manuskript/ui/style.py index de295b6..567ad3c 100644 --- a/manuskript/ui/style.py +++ b/manuskript/ui/style.py @@ -9,11 +9,13 @@ from PyQt5.QtWidgets import qApp from manuskript import settings -window = "#d6d2d0" #"#eee" / #eff0f1 +# window = "#d6d2d0" #"#eee" / #eff0f1 +window = qApp.palette().color(QPalette.Window).name() bgHover = "#ccc" bgChecked = "#bbb" borderColor = "darkGray" +blue = "#268bd2" def mainWindowSS(): return """ @@ -89,7 +91,7 @@ def collapsibleGroupBoxButton(): QPushButton{{ background-color: transparent; border: none; - border-top: 1px solid {bgChecked}; + border-top: 1px solid darkGray; padding: 4px 0px; font-weight: bold; }} @@ -119,11 +121,10 @@ def mainEditorTabSS(): border: 0px; }} QTabBar::tab{{ - margin: 2px 0 0 0; + margin: 3px 0 -3px 0; padding: 2px 9px; border: 1px solid #999; border-bottom: 0px; - margin-top: 3px; }} QTabBar::tab:selected{{ border: 1px solid #999; @@ -201,13 +202,45 @@ def verticalToolButtonSS(): def dockSS(): return """ - QDockWidget::title { - text-align: left; /* align the text to the left */ - background: lightBlue; - padding: 5px; - } + QDockWidget::title {{ + text-align: left; /* align the text to the left */ + background: {bgChecked}; + padding: 5px; + }} - QDockWidget::close-button, QDockWidget::float-button { - background: lightBlue; - } - """ + QDockWidget::close-button, QDockWidget::float-button {{ + background: {bgChecked}; + }} + """.format( + bgChecked=bgChecked + ) + + +def searchResultSS(): + return """ + QListWidget{{ + background: {window}; + }} + """.format( + window=window + ) + + +def lineEditSS(): + # return "border-radius: 6px;" + return """QLineEdit{{ + border: none; + border-bottom: 1px solid {checked}; + background:{window}; + }} + QLineEdit:focus{{ + border-bottom: 1px solid {blue}; + }} + """.format(window=window, + checked=bgChecked, + blue=blue) + + +def transparentSS(): + return """background: transparent; + border:none;""" \ No newline at end of file diff --git a/manuskript/ui/views/metadataView.py b/manuskript/ui/views/metadataView.py index 908af88..4e45423 100644 --- a/manuskript/ui/views/metadataView.py +++ b/manuskript/ui/views/metadataView.py @@ -4,7 +4,7 @@ from PyQt5.QtWidgets import QWidget, QAbstractItemView from manuskript.enums import Outline from manuskript.ui.views.metadataView_ui import Ui_metadataView - +from manuskript.ui import style class metadataView(QWidget, Ui_metadataView): def __init__(self, parent=None): @@ -15,6 +15,10 @@ class metadataView(QWidget, Ui_metadataView): self.txtSummaryFull.setColumn(Outline.summaryFull.value) self.txtNotes.setColumn(Outline.notes.value) self.revisions.setEnabled(False) + + self.txtSummarySentence.setStyleSheet(style.lineEditSS()) + self.txtSummaryFull.setStyleSheet(style.transparentSS()) + self.txtNotes.setStyleSheet(style.transparentSS()) def setModels(self, mdlOutline, mdlCharacter, mdlLabels, mdlStatus): self.properties.setModels(mdlOutline, mdlCharacter, mdlLabels, mdlStatus)