Improves theme desktop integration greatly

This commit is contained in:
Olivier Keshavjee 2017-11-14 15:01:20 +01:00
commit a334e8bd1b
38 changed files with 1121 additions and 1026 deletions

View file

@ -47,8 +47,9 @@ def toString(text):
def drawProgress(painter, rect, progress, radius=0):
from manuskript.ui import style as S
painter.setPen(Qt.NoPen)
painter.setBrush(QColor("#dddddd"))
painter.setBrush(QColor(S.base)) # "#dddddd"
painter.drawRoundedRect(rect, radius, radius)
painter.setBrush(QBrush(colorFromProgress(progress)))
@ -145,14 +146,24 @@ def randomColor(mix=None):
def mixColors(col1, col2, f=.5):
fromString = False
if type(col1) == str:
fromString = True
col1 = QColor(col1)
if type(col2) == str:
col2 = QColor(col2)
f2 = 1-f
r = col1.red() * f + col2.red() * f2
g = col1.green() * f + col2.green() * f2
b = col1.blue() * f + col2.blue() * f2
return QColor(r, g, b)
return QColor(r, g, b) if not fromString else QColor(r, g, b).name()
def outlineItemColors(item):
from manuskript.ui import style as S
"""Takes an OutlineItem and returns a dict of colors."""
colors = {}
mw = mainWindow()
@ -184,9 +195,9 @@ def outlineItemColors(item):
# Compile
if item.compile() in [0, "0"]:
colors["Compile"] = QColor(Qt.gray)
colors["Compile"] = mixColors(QColor(S.text), QColor(S.window))
else:
colors["Compile"] = QColor(Qt.black)
colors["Compile"] = QColor(Qt.transparent) # will use default
return colors
@ -232,14 +243,6 @@ def tempFile(name):
return os.path.join(QDir.tempPath(), name)
def lightBlue():
"""
A light blue used in several places in manuskript.
@return: QColor
"""
return QColor(Qt.blue).lighter(190)
def totalObjects():
return len(mainWindow().findChildren(QObject))

View file

@ -498,6 +498,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
if loadFromFile:
# Load empty settings
imp.reload(settings)
settings.initDefaultValues()
# Load data
self.loadEmptyDatas()

View file

@ -2,107 +2,108 @@
#--!-- coding: utf8 --!--
from manuskript import enums
from manuskript.ui import style as S
class persosProxyModel(QSortFilterProxyModel):
newStatuses = pyqtSignal()
def __init__(self, parent=None):
QSortFilterProxyModel.__init__(self, parent)
#self.rootItem = QStandardItem()
self.p1 = QStandardItem(self.tr("Main"))
self.p2 = QStandardItem(self.tr("Secundary"))
self.p3 = QStandardItem(self.tr("Minors"))
self._cats = [
self.p1,
self.p2,
self.p3
]
def mapFromSource(self, sourceIndex):
if not sourceIndex.isValid():
return QModelIndex()
row = self._map.index(sourceIndex.row())
#item = sourceIndex.internalPointer()
item = self.sourceModel().itemFromIndex(sourceIndex)
return self.createIndex(row, sourceIndex.column(), item)
def flags(self, index):
if not index.isValid():
return Qt.NoItemFlags
if index.isValid() and not self.mapToSource(index).isValid():
return Qt.NoItemFlags#Qt.ItemIsEnabled
else:
return Qt.ItemIsEnabled | Qt.ItemIsSelectable
def mapToSource(self, proxyIndex):
if not proxyIndex.isValid():
return QModelIndex()
row = self._map[proxyIndex.row()]
if type(row) != int:
return QModelIndex()
#item = proxyIndex.internalPointer()
item = self.sourceModel().item(row, proxyIndex.column())
return self.sourceModel().indexFromItem(item)
def setSourceModel(self, model):
QSortFilterProxyModel.setSourceModel(self, model)
self.sourceModel().dataChanged.connect(self.mapModelMaybe)
self.sourceModel().rowsInserted.connect(self.mapModel)
self.sourceModel().rowsRemoved.connect(self.mapModel)
self.sourceModel().rowsMoved.connect(self.mapModel)
self.mapModel()
def mapModelMaybe(self, topLeft, bottomRight):
if topLeft.column() <= Perso.importance.value <= bottomRight.column():
self.mapModel()
def mapModel(self):
self.beginResetModel()
src = self.sourceModel()
self._map = []
for i, cat in enumerate(self._cats):
self._map.append(cat)
for p in range(src.rowCount()):
item = src.item(p, Perso.importance.value)
if item and item.text():
imp = int(item.text())
else:
imp = 0
if 2-imp == i:
self._map.append(p)
self.endResetModel()
def data(self, index, role=Qt.DisplayRole):
if index.isValid() and not self.mapToSource(index).isValid():
row = index.row()
if role == Qt.DisplayRole:
return self._map[row].text()
elif role == Qt.ForegroundRole:
return QBrush(Qt.darkBlue)
return QBrush(QColor(S.highlightedTextDark))
elif role == Qt.BackgroundRole:
return QBrush(QColor(Qt.blue).lighter(190))
return QBrush(QColor(S.highlightLight))
elif role == Qt.TextAlignmentRole:
return Qt.AlignCenter
elif role == Qt.FontRole:
@ -113,32 +114,32 @@ class persosProxyModel(QSortFilterProxyModel):
else:
#FIXME: sometimes, the name of the character is not displayed
return self.sourceModel().data(self.mapToSource(index), role)
def index(self, row, column, parent):
i = self._map[row]
if type(i) != int:
return self.createIndex(row, column, i)
else:
return self.mapFromSource(self.sourceModel().index(i, column, QModelIndex()))
def parent(self, index=QModelIndex()):
return QModelIndex()
def rowCount(self, parent=QModelIndex()):
return len(self._map)
def columnCount(self, parent=QModelIndex()):
return self.sourceModel().columnCount(QModelIndex())
def item(self, row, col, parent=QModelIndex()):
idx = self.mapToSource(self.index(row, col, parent))
return self.sourceModel().item(idx.row(), idx.column())
#def setData(self, index, value, role=Qt.EditRole):
#pass
#pass

View file

@ -9,6 +9,7 @@ from PyQt5.QtGui import QColor
from PyQt5.QtGui import QStandardItem
from manuskript.enums import Plot
from manuskript.ui import style as S
class plotsProxyModel(QSortFilterProxyModel):
@ -105,9 +106,9 @@ class plotsProxyModel(QSortFilterProxyModel):
return self._map[row].text()
elif role == Qt.ForegroundRole:
return QBrush(Qt.darkBlue)
return QBrush(QColor(S.highlightedTextDark))
elif role == Qt.BackgroundRole:
return QBrush(QColor(Qt.blue).lighter(190))
return QBrush(QColor(S.highlightLight))
elif role == Qt.TextAlignmentRole:
return Qt.AlignCenter
elif role == Qt.FontRole:

View file

@ -4,11 +4,12 @@ from PyQt5.QtCore import QModelIndex
from PyQt5.QtCore import QSize
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QStandardItem, QBrush, QFontMetrics
from PyQt5.QtGui import QStandardItemModel
from PyQt5.QtGui import QStandardItemModel, QColor
from PyQt5.QtWidgets import QMenu, QAction, qApp
from manuskript.enums import World
from manuskript.functions import mainWindow, lightBlue
from manuskript.functions import mainWindow
from manuskript.ui import style as S
class worldModel(QStandardItemModel):
@ -254,7 +255,7 @@ class worldModel(QStandardItemModel):
if role == Qt.BackgroundRole:
if level == 0:
return QBrush(lightBlue())
return QBrush(QColor(S.highlightLight))
if role == Qt.TextAlignmentRole:
if level == 0:
@ -268,7 +269,7 @@ class worldModel(QStandardItemModel):
if role == Qt.ForegroundRole:
if level == 0:
return QBrush(Qt.darkBlue)
return QBrush(QColor(S.highlightedTextDark))
if role == Qt.SizeHintRole:
fm = QFontMetrics(qApp.font())

View file

@ -58,8 +58,8 @@ defaultTextType = "md"
fullScreenTheme = "spacedreams"
textEditor = {
"background": "#fff",
"fontColor": "#000",
"background": "",
"fontColor": "",
"font": qApp.font().toString(),
"misspelled": "#F00",
"lineSpacing": 100,
@ -73,6 +73,7 @@ textEditor = {
"maxWidth": 0,
"marginsLR": 0,
"marginsTB": 0,
"backgroundTransparent": False,
}
revisions = {
@ -98,6 +99,19 @@ viewMode = "fiction" # simple, fiction
saveToZip = True
dontShowDeleteWarning = False
def initDefaultValues():
"""
Load some default values based on system's settings.
Is called anytime we open/create a project.
"""
global textEditor
if not textEditor["background"]:
from manuskript.ui import style as S
textEditor["background"] = S.base
if not textEditor["fontColor"]:
from manuskript.ui import style as S
textEditor["fontColor"] = S.text
def save(filename=None, protocol=None):
global spellcheck, dict, corkSliderFactor, viewSettings, corkSizeFactor, folderView, lastTab, openIndexes, \
@ -256,6 +270,7 @@ def load(string, fromString=False, protocol=None):
"maxWidth": 0,
"marginsLR": 0,
"marginsTB": 0,
"backgroundTransparent": False, # Added in 0.6.0
}
for k in added:

View file

@ -23,6 +23,7 @@ from manuskript.ui.settings_ui import Ui_Settings
from manuskript.ui.views.outlineView import outlineView
from manuskript.ui.views.textEditView import textEditView
from manuskript.ui.welcome import welcome
from manuskript.ui import style as S
try:
import enchant
@ -37,6 +38,15 @@ class settingsWindow(QWidget, Ui_Settings):
self.mw = mainWindow
# UI
for l in [self.lblTitleGeneral,
self.lblTitleGeneral_2,
self.lblTitleViews,
self.lblTitleLabels,
self.lblTitleStatus,
self.lblTitleFullscreen,
]:
l.setStyleSheet(S.titleLabelSS())
icons = [QIcon.fromTheme("configure"),
QIcon.fromTheme("history-view"),
QIcon.fromTheme("gnome-settings"),
@ -164,6 +174,9 @@ class settingsWindow(QWidget, Ui_Settings):
self.btnEditorMisspelledColor.clicked.connect(self.choseEditorMisspelledColor)
self.setButtonColor(self.btnEditorBackgroundColor, opt["background"])
self.btnEditorBackgroundColor.clicked.connect(self.choseEditorBackgroundColor)
self.chkEditorBackgroundTransparent.setChecked(opt["backgroundTransparent"])
self.chkEditorBackgroundTransparent.stateChanged.connect(self.updateEditorSettings)
self.btnEditorColorDefault.clicked.connect(self.restoreEditorColors)
f = QFont()
f.fromString(opt["font"])
self.cmbEditorFontFamily.setCurrentFont(f)
@ -442,7 +455,13 @@ class settingsWindow(QWidget, Ui_Settings):
####################################################################################################
def updateEditorSettings(self):
# Store settings
"""
Stores settings for editor appareance.
"""
# Background
settings.textEditor["backgroundTransparent"] = True if self.chkEditorBackgroundTransparent.checkState() else False
# Font
f = self.cmbEditorFontFamily.currentFont()
f.setPointSize(self.spnEditorFontSize.value())
@ -526,6 +545,13 @@ class settingsWindow(QWidget, Ui_Settings):
self.setButtonColor(self.btnEditorBackgroundColor, color.name())
self.updateEditorSettings()
def restoreEditorColors(self):
settings.textEditor["background"] = S.base
self.setButtonColor(self.btnEditorBackgroundColor, S.base)
settings.textEditor["fontColor"] = S.text
self.setButtonColor(self.btnEditorFontColor, S.text)
self.updateEditorSettings()
####################################################################################################
# STATUS #
####################################################################################################

View file

@ -1,14 +1,13 @@
#!/usr/bin/env python
# --!-- coding: utf8 --!--
from PyQt5.QtCore import pyqtSignal, Qt, QTimer, QRect
from PyQt5.QtGui import QBrush, QCursor, QPalette, QFontMetrics
from PyQt5.QtGui import QBrush, QCursor, QPalette, QFontMetrics, QColor
from PyQt5.QtWidgets import QWidget, QListWidgetItem, QToolTip, QStyledItemDelegate, QStyle
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 import style as S
from manuskript.ui.cheatSheet_ui import Ui_cheatSheet
from manuskript.models import references as Ref
from manuskript.ui.editors.completer import completer
@ -20,7 +19,7 @@ class cheatSheet(QWidget, Ui_cheatSheet):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
self.setupUi(self)
self.txtFilter.setStyleSheet(style.lineEditSS())
self.txtFilter.setStyleSheet(S.lineEditSS())
self.splitter.setStretchFactor(0, 5)
self.splitter.setStretchFactor(1, 70)
@ -122,8 +121,8 @@ class cheatSheet(QWidget, Ui_cheatSheet):
def addCategory(self, title):
item = QListWidgetItem(title)
item.setBackground(QBrush(lightBlue()))
item.setForeground(QBrush(Qt.darkBlue))
item.setBackground(QBrush(QColor(S.highlightLight)))
item.setForeground(QBrush(QColor(S.highlightedTextDark)))
item.setFlags(Qt.ItemIsEnabled)
f = item.font()
f.setBold(True)

View file

@ -4,6 +4,7 @@ from PyQt5.QtCore import Qt, QRect, QRectF
from PyQt5.QtGui import QColor, QBrush, QRegion, QTextOption, QFont
from PyQt5.QtWidgets import QSizePolicy, QGroupBox, QWidget, QStylePainter, QStyleOptionGroupBox, qApp, QVBoxLayout, \
QStyle, QStyleOptionFrame, QStyleOptionFocusRect
from manuskript.ui import style as S
class collapsibleGroupBox(QGroupBox):
@ -57,7 +58,7 @@ class collapsibleGroupBox(QGroupBox):
titleRect.setHeight(textRect.height())
titleRect.moveTop(textRect.top())
p.setBrush(QBrush(QColor(Qt.blue).lighter(190)))
p.setBrush(QBrush(QColor(S.highlightLight)))
p.setPen(Qt.NoPen)
p.drawRoundedRect(titleRect, 10, 10)
p.restore()
@ -105,7 +106,7 @@ class collapsibleGroupBox(QGroupBox):
f = QFont()
f.setBold(True)
p.setFont(f)
p.setPen(Qt.darkBlue)
p.setPen(QColor(S.highlightedTextDark))
p.drawText(QRectF(titleRect), groupBox.text.replace("&", ""), topt)
p.restore()

View file

@ -3,7 +3,6 @@
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QWidget, QFrame, QPushButton, QVBoxLayout, QSizePolicy, qApp
from manuskript.functions import lightBlue
from manuskript.ui import style
@ -16,7 +15,6 @@ class collapsibleGroupBox2(QWidget):
self.button.setChecked(True)
self.switched = False
self.vPolicy = None
# self.button.setStyleSheet("background-color: lightBlue;")
self.button.setStyleSheet(style.collapsibleGroupBoxButton())

View file

@ -1,13 +1,13 @@
#!/usr/bin/env python
# --!-- coding: utf8 --!--
from PyQt5.QtCore import pyqtSignal, Qt, QRect
from PyQt5.QtGui import QBrush, QFontMetrics, QPalette
from PyQt5.QtGui import QBrush, QFontMetrics, QPalette, QColor
from PyQt5.QtWidgets import QWidget, QListWidgetItem, QStyledItemDelegate, QStyle
from manuskript.functions import lightBlue
from manuskript.functions import mainWindow
from manuskript.ui.editors.completer_ui import Ui_completer
from manuskript.models import references as Ref
from manuskript.ui import style as S
class completer(QWidget, Ui_completer):
@ -33,8 +33,8 @@ class completer(QWidget, Ui_completer):
def addCategory(self, title):
item = QListWidgetItem(title)
item.setBackground(QBrush(lightBlue()))
item.setForeground(QBrush(Qt.darkBlue))
item.setBackground(QBrush(QColor(S.highlightLight)))
item.setForeground(QBrush(QColor(S.highlightedTextDark)))
item.setFlags(Qt.ItemIsEnabled)
self.list.addItem(item)
@ -88,6 +88,10 @@ class listCompleterDelegate(QStyledItemDelegate):
r = QRect(option.rect)
r.setLeft(r.left() + w)
painter.save()
painter.setPen(Qt.gray)
if option.state & QStyle.State_Selected:
painter.setPen(QColor(S.highlightedTextLight))
else:
painter.setPen(QColor(S.textLight))
painter.drawText(r, Qt.AlignLeft, extra)
painter.restore()

View file

@ -317,12 +317,12 @@ class mainEditor(QWidget, Ui_mainEditor):
drawProgress(p, rect, progress, 2)
del p
self.lblRedacProgress.setPixmap(self.px)
self.lblRedacWC.setText(self.tr("{} words / {}").format(
self.lblRedacWC.setText(self.tr("{} words / {} ").format(
locale.format("%d", wc, grouping=True),
locale.format("%d", goal, grouping=True)))
else:
self.lblRedacProgress.hide()
self.lblRedacWC.setText(self.tr("{} words").format(
self.lblRedacWC.setText(self.tr("{} words ").format(
locale.format("%d", wc, grouping=True)))
###############################################################################

View file

@ -239,7 +239,13 @@ class tabSplitter(QWidget, Ui_tabSplitter):
# border:1px solid darkblue;
# }}""".format(self.splitter.objectName()))
self.setStyleSheet(style.mainEditorTabSS() + "QWidget{{background:{};}}".format(style.bgHover))
self.setStyleSheet(style.mainEditorTabSS() + """
QSplitter#{name},
QSplitter#{name} > QWidget > QSplitter{{
border:3px solid {color};
}}""".format(
name=self.splitter.objectName(),
color=style.highlight))
elif object == self.btnSplit and event.type() == event.HoverLeave:
# self.setAutoFillBackground(False)
# self.setBackgroundRole(QPalette.Window)

View file

@ -2,8 +2,7 @@
# Form implementation generated from reading ui file 'manuskript/ui/editors/tabSplitter_ui.ui'
#
# Created: Sun Apr 10 16:27:03 2016
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.9
#
# WARNING! All changes made in this file will be lost!
@ -20,8 +19,8 @@ class Ui_tabSplitter(object):
tabSplitter.setSizePolicy(sizePolicy)
tabSplitter.setWindowTitle("tabSPlitter")
self.verticalLayout = QtWidgets.QVBoxLayout(tabSplitter)
self.verticalLayout.setSpacing(0)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setSpacing(0)
self.verticalLayout.setObjectName("verticalLayout")
self.splitter = QtWidgets.QSplitter(tabSplitter)
self.splitter.setMinimumSize(QtCore.QSize(30, 30))

View file

@ -8,9 +8,10 @@ from PyQt5.QtGui import QBrush, QColor, QIcon
from PyQt5.QtWidgets import QWidget
from manuskript import exporter
from manuskript.functions import lightBlue, writablePath
from manuskript.functions import writablePath
from manuskript.ui.exporters.exporter_ui import Ui_exporter
from manuskript.ui.exporters.exportersManager import exportersManager
from manuskript.ui import style as S
class exporterDialog(QWidget, Ui_exporter):
@ -46,8 +47,8 @@ class exporterDialog(QWidget, Ui_exporter):
continue
self.cmbExporters.addItem(QIcon(E.icon), E.name)
self.cmbExporters.setItemData(self.cmbExporters.count() - 1, QBrush(QColor(Qt.darkBlue)), Qt.ForegroundRole)
self.cmbExporters.setItemData(self.cmbExporters.count() - 1, QBrush(lightBlue()), Qt.BackgroundRole)
self.cmbExporters.setItemData(self.cmbExporters.count() - 1, QBrush(QColor(S.highlightedTextDark)), Qt.ForegroundRole)
self.cmbExporters.setItemData(self.cmbExporters.count() - 1, QBrush(QColor(S.highlightLight)), Qt.BackgroundRole)
item = self.cmbExporters.model().item(self.cmbExporters.count() - 1)
item.setFlags(Qt.ItemIsEnabled)
@ -142,4 +143,4 @@ class exporterDialog(QWidget, Ui_exporter):
item.widget().deleteLater()
l.addWidget(widget)
widget.setParent(group)
widget.setParent(group)

View file

@ -10,6 +10,8 @@ from PyQt5.QtWidgets import QWidget, QListWidgetItem, QFileDialog
from manuskript import exporter
from manuskript.ui.exporters.exportersManager_ui import Ui_ExportersManager
from manuskript.ui import style as S
class exportersManager(QWidget, Ui_ExportersManager):
@ -18,6 +20,7 @@ class exportersManager(QWidget, Ui_ExportersManager):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
self.setupUi(self)
self.lblExporterName.setStyleSheet(S.titleLabelSS())
# Var
self.currentExporter = None

View file

@ -2,8 +2,7 @@
# Form implementation generated from reading ui file 'manuskript/ui/exporters/exportersManager_ui.ui'
#
# Created: Fri Apr 8 12:47:11 2016
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.9
#
# WARNING! All changes made in this file will be lost!
@ -31,13 +30,6 @@ class Ui_ExportersManager(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lblExporterName.sizePolicy().hasHeightForWidth())
self.lblExporterName.setSizePolicy(sizePolicy)
self.lblExporterName.setStyleSheet("background-color:lightBlue;\n"
"border:none;\n"
"padding:10px;\n"
"color:darkBlue;\n"
"font-size:16px;\n"
"font-weight:bold;\n"
"text-align:center;")
self.lblExporterName.setText("{Exporter Name}")
self.lblExporterName.setAlignment(QtCore.Qt.AlignCenter)
self.lblExporterName.setObjectName("lblExporterName")
@ -82,8 +74,8 @@ class Ui_ExportersManager(object):
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame.setObjectName("frame")
self.verticalLayout = QtWidgets.QVBoxLayout(self.frame)
self.verticalLayout.setSpacing(0)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setSpacing(0)
self.verticalLayout.setObjectName("verticalLayout")
self.lblExportToDescription = QtWidgets.QLabel(self.frame)
font = QtGui.QFont()

View file

@ -46,15 +46,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">background-color:lightBlue;
border:none;
padding:10px;
color:darkBlue;
font-size:16px;
font-weight:bold;
text-align:center;</string>
</property>
<property name="text">
<string notr="true">{Exporter Name}</string>
</property>

View file

@ -9,12 +9,14 @@ from PyQt5.QtWidgets import QWidget, QTableWidgetItem, QListWidgetItem, QTreeVie
from manuskript.functions import mainWindow, writablePath
from manuskript.ui.exporters.manuskript.plainTextSettings_ui import Ui_exporterSettings
from manuskript.ui import style as S
class exporterSettings(QWidget, Ui_exporterSettings):
def __init__(self, _format, parent=None):
QWidget.__init__(self, parent)
self.setupUi(self)
self.toolBox.setStyleSheet(S.toolBoxSS())
self.mw = mainWindow()
self._format = _format

View file

@ -17,18 +17,9 @@ class Ui_exporterSettings(object):
self.verticalLayout_2.setSpacing(10)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.toolBox = QtWidgets.QToolBox(exporterSettings)
self.toolBox.setStyleSheet("QToolBox::tab{\n"
" background-color: #BBB;\n"
" padding: 2px;\n"
" border: none;\n"
"}\n"
"\n"
"QToolBox::tab:selected, QToolBox::tab:hover{\n"
" background-color:skyblue;\n"
"}")
self.toolBox.setObjectName("toolBox")
self.content = QtWidgets.QWidget()
self.content.setGeometry(QtCore.QRect(0, 0, 497, 834))
self.content.setGeometry(QtCore.QRect(0, 0, 349, 842))
self.content.setObjectName("content")
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.content)
self.verticalLayout_5.setContentsMargins(0, 0, 0, 0)
@ -112,7 +103,7 @@ class Ui_exporterSettings(object):
self.verticalLayout_5.addItem(spacerItem1)
self.toolBox.addItem(self.content, "")
self.separations = QtWidgets.QWidget()
self.separations.setGeometry(QtCore.QRect(0, 0, 511, 534))
self.separations.setGeometry(QtCore.QRect(0, 0, 173, 336))
self.separations.setObjectName("separations")
self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.separations)
self.verticalLayout_8.setContentsMargins(0, 0, 0, 0)
@ -321,7 +312,7 @@ class Ui_exporterSettings(object):
self.verticalLayout_8.addItem(spacerItem6)
self.toolBox.addItem(self.separations, "")
self.transformations = QtWidgets.QWidget()
self.transformations.setGeometry(QtCore.QRect(0, 0, 511, 534))
self.transformations.setGeometry(QtCore.QRect(0, 0, 511, 522))
self.transformations.setStyleSheet("QGroupBox{font-weight:bold;}")
self.transformations.setObjectName("transformations")
self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.transformations)
@ -484,7 +475,7 @@ class Ui_exporterSettings(object):
self.verticalLayout_6.addItem(spacerItem10)
self.toolBox.addItem(self.transformations, "")
self.preview = QtWidgets.QWidget()
self.preview.setGeometry(QtCore.QRect(0, 0, 511, 534))
self.preview.setGeometry(QtCore.QRect(0, 0, 369, 130))
self.preview.setStyleSheet("QGroupBox{font-weight:bold;}")
self.preview.setObjectName("preview")
self.verticalLayout_11 = QtWidgets.QVBoxLayout(self.preview)

View file

@ -31,17 +31,6 @@
</property>
<item>
<widget class="QToolBox" name="toolBox">
<property name="styleSheet">
<string notr="true">QToolBox::tab{
background-color: #BBB;
padding: 2px;
border: none;
}
QToolBox::tab:selected, QToolBox::tab:hover{
background-color:skyblue;
}</string>
</property>
<property name="currentIndex">
<number>2</number>
</property>
@ -53,8 +42,8 @@ QToolBox::tab:selected, QToolBox::tab:hover{
<rect>
<x>0</x>
<y>0</y>
<width>497</width>
<height>834</height>
<width>349</width>
<height>842</height>
</rect>
</property>
<attribute name="label">
@ -232,8 +221,8 @@ QToolBox::tab:selected, QToolBox::tab:hover{
<rect>
<x>0</x>
<y>0</y>
<width>511</width>
<height>534</height>
<width>173</width>
<height>336</height>
</rect>
</property>
<attribute name="label">
@ -295,8 +284,7 @@ QToolBox::tab:selected, QToolBox::tab:hover{
</property>
<property name="icon">
<iconset theme="folder">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -332,8 +320,7 @@ QToolBox::tab:selected, QToolBox::tab:hover{
</property>
<property name="icon">
<iconset theme="folder">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -423,8 +410,7 @@ QToolBox::tab:selected, QToolBox::tab:hover{
</property>
<property name="icon">
<iconset theme="text-x-generic">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -460,8 +446,7 @@ QToolBox::tab:selected, QToolBox::tab:hover{
</property>
<property name="icon">
<iconset theme="text-x-generic">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -551,8 +536,7 @@ QToolBox::tab:selected, QToolBox::tab:hover{
</property>
<property name="icon">
<iconset theme="folder">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -588,8 +572,7 @@ QToolBox::tab:selected, QToolBox::tab:hover{
</property>
<property name="icon">
<iconset theme="text-x-generic">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -679,8 +662,7 @@ QToolBox::tab:selected, QToolBox::tab:hover{
</property>
<property name="icon">
<iconset theme="text-x-generic">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -716,8 +698,7 @@ QToolBox::tab:selected, QToolBox::tab:hover{
</property>
<property name="icon">
<iconset theme="folder">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -773,7 +754,7 @@ QToolBox::tab:selected, QToolBox::tab:hover{
<x>0</x>
<y>0</y>
<width>511</width>
<height>534</height>
<height>522</height>
</rect>
</property>
<property name="styleSheet">
@ -1113,8 +1094,7 @@ QToolBox::tab:selected, QToolBox::tab:hover{
</property>
<property name="icon">
<iconset theme="list-add">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -1128,8 +1108,7 @@ QToolBox::tab:selected, QToolBox::tab:hover{
</property>
<property name="icon">
<iconset theme="list-remove">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -1161,8 +1140,8 @@ QToolBox::tab:selected, QToolBox::tab:hover{
<rect>
<x>0</x>
<y>0</y>
<width>511</width>
<height>534</height>
<width>369</width>
<height>130</height>
</rect>
</property>
<property name="styleSheet">

View file

@ -17,6 +17,7 @@ class generalSettings(QWidget, Ui_generalSettings):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
self.setupUi(self)
self.toolBox.setStyleSheet(style.toolBoxSS())
self.mw = mainWindow()
self.txtGeneralSplitScenes.setStyleSheet(style.lineEditSS())

View file

@ -17,18 +17,9 @@ class Ui_generalSettings(object):
self.verticalLayout_2.setSpacing(10)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.toolBox = QtWidgets.QToolBox(generalSettings)
self.toolBox.setStyleSheet("QToolBox::tab{\n"
" background-color: #BBB;\n"
" padding: 2px;\n"
" border: none;\n"
"}\n"
"\n"
"QToolBox::tab:selected, QToolBox::tab:hover{\n"
" background-color:skyblue;\n"
"}")
self.toolBox.setObjectName("toolBox")
self.general = QtWidgets.QWidget()
self.general.setGeometry(QtCore.QRect(0, 0, 267, 378))
self.general.setGeometry(QtCore.QRect(0, 0, 267, 375))
self.general.setObjectName("general")
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.general)
self.verticalLayout_5.setContentsMargins(6, 6, 6, 6)

View file

@ -31,17 +31,6 @@
</property>
<item>
<widget class="QToolBox" name="toolBox">
<property name="styleSheet">
<string notr="true">QToolBox::tab{
background-color: #BBB;
padding: 2px;
border: none;
}
QToolBox::tab:selected, QToolBox::tab:hover{
background-color:skyblue;
}</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
@ -54,7 +43,7 @@ QToolBox::tab:selected, QToolBox::tab:hover{
<x>0</x>
<y>0</y>
<width>267</width>
<height>378</height>
<height>375</height>
</rect>
</property>
<attribute name="label">

View file

@ -7,7 +7,7 @@ from PyQt5.QtCore import Qt, QTimer, QUrl
from PyQt5.QtGui import QBrush, QColor, QIcon, QDesktopServices
from PyQt5.QtWidgets import QWidget, QFileDialog, QMessageBox, QStyle
from manuskript.functions import lightBlue, writablePath, appPath
from manuskript.functions import writablePath, appPath
from manuskript.ui.importers.importer_ui import Ui_importer
from manuskript.ui.importers.generalSettings import generalSettings
from manuskript.ui import style
@ -71,8 +71,8 @@ class importerDialog(QWidget, Ui_importer):
def addHeader(name):
self.cmbImporters.addItem(name, "header")
self.cmbImporters.setItemData(self.cmbImporters.count() - 1, QBrush(QColor(Qt.darkBlue)), Qt.ForegroundRole)
self.cmbImporters.setItemData(self.cmbImporters.count() - 1, QBrush(lightBlue()), Qt.BackgroundRole)
self.cmbImporters.setItemData(self.cmbImporters.count() - 1, QBrush(QColor(style.highlightedTextDark)), Qt.ForegroundRole)
self.cmbImporters.setItemData(self.cmbImporters.count() - 1, QBrush(QColor(style.highlightLight)), Qt.BackgroundRole)
item = self.cmbImporters.model().item(self.cmbImporters.count() - 1)
item.setFlags(Qt.ItemIsEnabled)

View file

@ -383,7 +383,7 @@ class Ui_MainWindow(object):
self.scrollAreaPersoInfos.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.scrollAreaPersoInfos.setObjectName("scrollAreaPersoInfos")
self.scrollAreaPersoInfosWidget = QtWidgets.QWidget()
self.scrollAreaPersoInfosWidget.setGeometry(QtCore.QRect(0, 0, 444, 709))
self.scrollAreaPersoInfosWidget.setGeometry(QtCore.QRect(0, 0, 426, 688))
self.scrollAreaPersoInfosWidget.setObjectName("scrollAreaPersoInfosWidget")
self.formLayout_8 = QtWidgets.QFormLayout(self.scrollAreaPersoInfosWidget)
self.formLayout_8.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
@ -1036,7 +1036,7 @@ class Ui_MainWindow(object):
self.horizontalLayout_2.addWidget(self.stack)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1112, 20))
self.menubar.setGeometry(QtCore.QRect(0, 0, 1112, 30))
self.menubar.setObjectName("menubar")
self.menuFile = QtWidgets.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
@ -1101,21 +1101,6 @@ class Ui_MainWindow(object):
self.verticalLayout_16.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_16.setObjectName("verticalLayout_16")
self.lstTabs = QtWidgets.QListWidget(self.dockWidgetContents)
self.lstTabs.setStyleSheet("QListView {\n"
" show-decoration-selected: 0;\n"
" outline: none;\n"
" background-color: transparent;\n"
"}\n"
"\n"
"QListView::item:selected {\n"
" background: #DCDEF1;\n"
" color: black;\n"
"}\n"
"\n"
"QListView::item:hover {\n"
" background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n"
" stop: 0 #FAFBFE, stop: 1 #DCDEF1);\n"
"}")
self.lstTabs.setFrameShape(QtWidgets.QFrame.NoFrame)
self.lstTabs.setObjectName("lstTabs")
self.verticalLayout_16.addWidget(self.lstTabs)
@ -1421,27 +1406,27 @@ class Ui_MainWindow(object):
self.actToolFrequency.setText(_translate("MainWindow", "&Frequency Analyzer"))
self.actAbout.setText(_translate("MainWindow", "&About"))
self.actAbout.setToolTip(_translate("MainWindow", "About Manuskript"))
self.actImport.setText(_translate("MainWindow", "Import…"))
self.actImport.setText(_translate("MainWindow", "&Import…"))
self.actImport.setShortcut(_translate("MainWindow", "F7"))
self.actCopy.setText(_translate("MainWindow", "Copy"))
self.actCopy.setText(_translate("MainWindow", "&Copy"))
self.actCopy.setShortcut(_translate("MainWindow", "Ctrl+C"))
self.actCut.setText(_translate("MainWindow", "Cut"))
self.actCut.setText(_translate("MainWindow", "C&ut"))
self.actCut.setShortcut(_translate("MainWindow", "Ctrl+X"))
self.actPaste.setText(_translate("MainWindow", "Paste"))
self.actPaste.setText(_translate("MainWindow", "&Paste"))
self.actPaste.setShortcut(_translate("MainWindow", "Ctrl+V"))
self.actSplitDialog.setText(_translate("MainWindow", "Split…"))
self.actSplitDialog.setText(_translate("MainWindow", "&Split…"))
self.actSplitDialog.setShortcut(_translate("MainWindow", "Ctrl+Shift+K"))
self.actSplitCursor.setText(_translate("MainWindow", "Split at cursor"))
self.actSplitCursor.setText(_translate("MainWindow", "Sp&lit at cursor"))
self.actSplitCursor.setShortcut(_translate("MainWindow", "Ctrl+K"))
self.actMerge.setText(_translate("MainWindow", "Merge"))
self.actMerge.setText(_translate("MainWindow", "Me&rge"))
self.actMerge.setShortcut(_translate("MainWindow", "Ctrl+M"))
self.actDuplicate.setText(_translate("MainWindow", "&Duplicate"))
self.actDuplicate.setShortcut(_translate("MainWindow", "Ctrl+D"))
self.actDelete.setText(_translate("MainWindow", "Delete"))
self.actDelete.setText(_translate("MainWindow", "D&elete"))
self.actDelete.setShortcut(_translate("MainWindow", "Del"))
self.actMoveUp.setText(_translate("MainWindow", "Move Up"))
self.actMoveUp.setText(_translate("MainWindow", "&Move Up"))
self.actMoveUp.setShortcut(_translate("MainWindow", "Ctrl+Shift+Up"))
self.actMoveDown.setText(_translate("MainWindow", "Move Down"))
self.actMoveDown.setText(_translate("MainWindow", "M&ove Down"))
self.actMoveDown.setShortcut(_translate("MainWindow", "Ctrl+Shift+Down"))
from manuskript.ui.cheatSheet import cheatSheet

View file

@ -815,8 +815,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>444</width>
<height>709</height>
<width>426</width>
<height>688</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout_8">
@ -1601,8 +1601,7 @@
</property>
<property name="icon">
<iconset theme="emblem-favorite">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -2093,7 +2092,7 @@
<x>0</x>
<y>0</y>
<width>1112</width>
<height>20</height>
<height>30</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@ -2106,8 +2105,7 @@
</property>
<property name="icon">
<iconset theme="folder-recent">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
</widget>
<addaction name="actOpen"/>
@ -2277,23 +2275,6 @@
</property>
<item>
<widget class="QListWidget" name="lstTabs">
<property name="styleSheet">
<string notr="true">QListView {
show-decoration-selected: 0;
outline: none;
background-color: transparent;
}
QListView::item:selected {
background: #DCDEF1;
color: black;
}
QListView::item:hover {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #FAFBFE, stop: 1 #DCDEF1);
}</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
@ -2389,8 +2370,7 @@ QListView::item:hover {
<action name="actLabels">
<property name="icon">
<iconset theme="folder_color_picker">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>&amp;Labels...</string>
@ -2399,8 +2379,7 @@ QListView::item:hover {
<action name="actStatus">
<property name="icon">
<iconset theme="applications-development">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>&amp;Status...</string>
@ -2463,8 +2442,7 @@ QListView::item:hover {
<action name="actCloseProject">
<property name="icon">
<iconset theme="window-close">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>&amp;Close project</string>
@ -2473,8 +2451,7 @@ QListView::item:hover {
<action name="actCompile">
<property name="icon">
<iconset theme="document-export">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>Co&amp;mpile</string>
@ -2491,8 +2468,7 @@ QListView::item:hover {
<action name="actAbout">
<property name="icon">
<iconset theme="stock_view-details">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>&amp;About</string>
@ -2504,11 +2480,10 @@ QListView::item:hover {
<action name="actImport">
<property name="icon">
<iconset theme="document-import">
<normaloff/>
</iconset>
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>Import…</string>
<string>&amp;Import…</string>
</property>
<property name="shortcut">
<string>F7</string>
@ -2516,10 +2491,11 @@ QListView::item:hover {
</action>
<action name="actCopy">
<property name="icon">
<iconset theme="edit-copy"/>
<iconset theme="edit-copy">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>Copy</string>
<string>&amp;Copy</string>
</property>
<property name="shortcut">
<string>Ctrl+C</string>
@ -2527,10 +2503,11 @@ QListView::item:hover {
</action>
<action name="actCut">
<property name="icon">
<iconset theme="edit-cut"/>
<iconset theme="edit-cut">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>Cut</string>
<string>C&amp;ut</string>
</property>
<property name="shortcut">
<string>Ctrl+X</string>
@ -2538,10 +2515,11 @@ QListView::item:hover {
</action>
<action name="actPaste">
<property name="icon">
<iconset theme="edit-paste"/>
<iconset theme="edit-paste">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>Paste</string>
<string>&amp;Paste</string>
</property>
<property name="shortcut">
<string>Ctrl+V</string>
@ -2549,10 +2527,11 @@ QListView::item:hover {
</action>
<action name="actSplitDialog">
<property name="icon">
<iconset theme="split"/>
<iconset theme="split">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>Split…</string>
<string>&amp;Split…</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+K</string>
@ -2560,10 +2539,11 @@ QListView::item:hover {
</action>
<action name="actSplitCursor">
<property name="icon">
<iconset theme="split"/>
<iconset theme="split">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>Split at cursor</string>
<string>Sp&amp;lit at cursor</string>
</property>
<property name="shortcut">
<string>Ctrl+K</string>
@ -2571,10 +2551,11 @@ QListView::item:hover {
</action>
<action name="actMerge">
<property name="icon">
<iconset theme="merge"/>
<iconset theme="merge">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>Merge</string>
<string>Me&amp;rge</string>
</property>
<property name="shortcut">
<string>Ctrl+M</string>
@ -2582,7 +2563,8 @@ QListView::item:hover {
</action>
<action name="actDuplicate">
<property name="icon">
<iconset theme="folder-copy"/>
<iconset theme="folder-copy">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>&amp;Duplicate</string>
@ -2593,10 +2575,11 @@ QListView::item:hover {
</action>
<action name="actDelete">
<property name="icon">
<iconset theme="edit-delete"/>
<iconset theme="edit-delete">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>Delete</string>
<string>D&amp;elete</string>
</property>
<property name="shortcut">
<string>Del</string>
@ -2604,10 +2587,11 @@ QListView::item:hover {
</action>
<action name="actMoveUp">
<property name="icon">
<iconset theme="arrow-up"/>
<iconset theme="arrow-up">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>Move Up</string>
<string>&amp;Move Up</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+Up</string>
@ -2615,10 +2599,11 @@ QListView::item:hover {
</action>
<action name="actMoveDown">
<property name="icon">
<iconset theme="arrow-down"/>
<iconset theme="arrow-down">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>Move Down</string>
<string>M&amp;ove Down</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+Down</string>

View file

@ -11,7 +11,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Settings(object):
def setupUi(self, Settings):
Settings.setObjectName("Settings")
Settings.resize(658, 530)
Settings.resize(658, 632)
self.horizontalLayout_8 = QtWidgets.QHBoxLayout(Settings)
self.horizontalLayout_8.setObjectName("horizontalLayout_8")
self.lstMenu = QtWidgets.QListWidget(Settings)
@ -43,13 +43,6 @@ class Ui_Settings(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lblTitleGeneral.sizePolicy().hasHeightForWidth())
self.lblTitleGeneral.setSizePolicy(sizePolicy)
self.lblTitleGeneral.setStyleSheet("background-color:lightBlue;\n"
"border:none;\n"
"padding:10px;\n"
"color:darkBlue;\n"
"font-size:16px;\n"
"font-weight:bold;\n"
"text-align:center;")
self.lblTitleGeneral.setAlignment(QtCore.Qt.AlignCenter)
self.lblTitleGeneral.setObjectName("lblTitleGeneral")
self.verticalLayout_7.addWidget(self.lblTitleGeneral)
@ -230,13 +223,6 @@ class Ui_Settings(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lblTitleGeneral_2.sizePolicy().hasHeightForWidth())
self.lblTitleGeneral_2.setSizePolicy(sizePolicy)
self.lblTitleGeneral_2.setStyleSheet("background-color:lightBlue;\n"
"border:none;\n"
"padding:10px;\n"
"color:darkBlue;\n"
"font-size:16px;\n"
"font-weight:bold;\n"
"text-align:center;")
self.lblTitleGeneral_2.setAlignment(QtCore.Qt.AlignCenter)
self.lblTitleGeneral_2.setObjectName("lblTitleGeneral_2")
self.verticalLayout.addWidget(self.lblTitleGeneral_2)
@ -397,13 +383,6 @@ class Ui_Settings(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lblTitleViews.sizePolicy().hasHeightForWidth())
self.lblTitleViews.setSizePolicy(sizePolicy)
self.lblTitleViews.setStyleSheet("background-color:lightBlue;\n"
"border:none;\n"
"padding:10px;\n"
"color:darkBlue;\n"
"font-size:16px;\n"
"font-weight:bold;\n"
"text-align:center;")
self.lblTitleViews.setAlignment(QtCore.Qt.AlignCenter)
self.lblTitleViews.setObjectName("lblTitleViews")
self.verticalLayout_9.addWidget(self.lblTitleViews)
@ -953,28 +932,53 @@ class Ui_Settings(object):
self.tabViews.addTab(self.tab_3, icon, "")
self.tab_4 = QtWidgets.QWidget()
self.tab_4.setObjectName("tab_4")
self.verticalLayout_22 = QtWidgets.QVBoxLayout(self.tab_4)
self.verticalLayout_22.setObjectName("verticalLayout_22")
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.tab_4)
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.verticalLayout_21 = QtWidgets.QVBoxLayout()
self.verticalLayout_21.setObjectName("verticalLayout_21")
self.groupBox_12 = QtWidgets.QGroupBox(self.tab_4)
self.groupBox_17 = QtWidgets.QGroupBox(self.tab_4)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.groupBox_12.setFont(font)
self.groupBox_12.setObjectName("groupBox_12")
self.formLayout_8 = QtWidgets.QFormLayout(self.groupBox_12)
self.formLayout_8.setObjectName("formLayout_8")
self.label_37 = QtWidgets.QLabel(self.groupBox_12)
self.groupBox_17.setFont(font)
self.groupBox_17.setObjectName("groupBox_17")
self.formLayout_12 = QtWidgets.QFormLayout(self.groupBox_17)
self.formLayout_12.setObjectName("formLayout_12")
self.label_43 = QtWidgets.QLabel(self.groupBox_17)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.label_43.setFont(font)
self.label_43.setObjectName("label_43")
self.formLayout_12.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_43)
self.btnEditorBackgroundColor = QtWidgets.QPushButton(self.groupBox_17)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.btnEditorBackgroundColor.sizePolicy().hasHeightForWidth())
self.btnEditorBackgroundColor.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.btnEditorBackgroundColor.setFont(font)
self.btnEditorBackgroundColor.setText("")
self.btnEditorBackgroundColor.setObjectName("btnEditorBackgroundColor")
self.formLayout_12.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.btnEditorBackgroundColor)
self.chkEditorBackgroundTransparent = QtWidgets.QCheckBox(self.groupBox_17)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.chkEditorBackgroundTransparent.setFont(font)
self.chkEditorBackgroundTransparent.setObjectName("chkEditorBackgroundTransparent")
self.formLayout_12.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.chkEditorBackgroundTransparent)
self.label_37 = QtWidgets.QLabel(self.groupBox_17)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.label_37.setFont(font)
self.label_37.setObjectName("label_37")
self.formLayout_8.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_37)
self.btnEditorFontColor = QtWidgets.QPushButton(self.groupBox_12)
self.formLayout_12.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_37)
self.btnEditorFontColor = QtWidgets.QPushButton(self.groupBox_17)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
@ -986,14 +990,30 @@ class Ui_Settings(object):
self.btnEditorFontColor.setFont(font)
self.btnEditorFontColor.setText("")
self.btnEditorFontColor.setObjectName("btnEditorFontColor")
self.formLayout_8.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.btnEditorFontColor)
self.formLayout_12.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.btnEditorFontColor)
self.btnEditorColorDefault = QtWidgets.QPushButton(self.groupBox_17)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.btnEditorColorDefault.setFont(font)
self.btnEditorColorDefault.setObjectName("btnEditorColorDefault")
self.formLayout_12.setWidget(3, QtWidgets.QFormLayout.SpanningRole, self.btnEditorColorDefault)
self.verticalLayout_21.addWidget(self.groupBox_17)
self.groupBox_12 = QtWidgets.QGroupBox(self.tab_4)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.groupBox_12.setFont(font)
self.groupBox_12.setObjectName("groupBox_12")
self.formLayout_8 = QtWidgets.QFormLayout(self.groupBox_12)
self.formLayout_8.setObjectName("formLayout_8")
self.label_39 = QtWidgets.QLabel(self.groupBox_12)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.label_39.setFont(font)
self.label_39.setObjectName("label_39")
self.formLayout_8.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_39)
self.formLayout_8.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_39)
self.cmbEditorFontFamily = QtWidgets.QFontComboBox(self.groupBox_12)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
@ -1006,21 +1026,21 @@ class Ui_Settings(object):
font.setWeight(50)
self.cmbEditorFontFamily.setFont(font)
self.cmbEditorFontFamily.setObjectName("cmbEditorFontFamily")
self.formLayout_8.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.cmbEditorFontFamily)
self.formLayout_8.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.cmbEditorFontFamily)
self.label_38 = QtWidgets.QLabel(self.groupBox_12)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.label_38.setFont(font)
self.label_38.setObjectName("label_38")
self.formLayout_8.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_38)
self.formLayout_8.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_38)
self.label_36 = QtWidgets.QLabel(self.groupBox_12)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.label_36.setFont(font)
self.label_36.setObjectName("label_36")
self.formLayout_8.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_36)
self.formLayout_8.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_36)
self.btnEditorMisspelledColor = QtWidgets.QPushButton(self.groupBox_12)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
@ -1033,7 +1053,7 @@ class Ui_Settings(object):
self.btnEditorMisspelledColor.setFont(font)
self.btnEditorMisspelledColor.setText("")
self.btnEditorMisspelledColor.setObjectName("btnEditorMisspelledColor")
self.formLayout_8.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.btnEditorMisspelledColor)
self.formLayout_8.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.btnEditorMisspelledColor)
self.spnEditorFontSize = QtWidgets.QSpinBox(self.groupBox_12)
font = QtGui.QFont()
font.setBold(False)
@ -1043,61 +1063,8 @@ class Ui_Settings(object):
self.spnEditorFontSize.setMaximum(299)
self.spnEditorFontSize.setProperty("value", 10)
self.spnEditorFontSize.setObjectName("spnEditorFontSize")
self.formLayout_8.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.spnEditorFontSize)
self.label_43 = QtWidgets.QLabel(self.groupBox_12)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.label_43.setFont(font)
self.label_43.setObjectName("label_43")
self.formLayout_8.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_43)
self.btnEditorBackgroundColor = QtWidgets.QPushButton(self.groupBox_12)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.btnEditorBackgroundColor.sizePolicy().hasHeightForWidth())
self.btnEditorBackgroundColor.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.btnEditorBackgroundColor.setFont(font)
self.btnEditorBackgroundColor.setText("")
self.btnEditorBackgroundColor.setObjectName("btnEditorBackgroundColor")
self.formLayout_8.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.btnEditorBackgroundColor)
self.formLayout_8.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.spnEditorFontSize)
self.verticalLayout_21.addWidget(self.groupBox_12)
self.groupBox_15 = QtWidgets.QGroupBox(self.tab_4)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.groupBox_15.setFont(font)
self.groupBox_15.setObjectName("groupBox_15")
self.formLayout_10 = QtWidgets.QFormLayout(self.groupBox_15)
self.formLayout_10.setObjectName("formLayout_10")
self.chkEditorCursorWidth = QtWidgets.QCheckBox(self.groupBox_15)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.chkEditorCursorWidth.setFont(font)
self.chkEditorCursorWidth.setObjectName("chkEditorCursorWidth")
self.formLayout_10.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.chkEditorCursorWidth)
self.spnEditorCursorWidth = QtWidgets.QSpinBox(self.groupBox_15)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.spnEditorCursorWidth.setFont(font)
self.spnEditorCursorWidth.setMinimum(0)
self.spnEditorCursorWidth.setMaximum(99)
self.spnEditorCursorWidth.setProperty("value", 9)
self.spnEditorCursorWidth.setObjectName("spnEditorCursorWidth")
self.formLayout_10.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.spnEditorCursorWidth)
self.chkEditorNoBlinking = QtWidgets.QCheckBox(self.groupBox_15)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.chkEditorNoBlinking.setFont(font)
self.chkEditorNoBlinking.setObjectName("chkEditorNoBlinking")
self.formLayout_10.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.chkEditorNoBlinking)
self.verticalLayout_21.addWidget(self.groupBox_15)
self.groupBox_161 = QtWidgets.QGroupBox(self.tab_4)
font = QtGui.QFont()
font.setBold(True)
@ -1154,6 +1121,8 @@ class Ui_Settings(object):
self.formLayout_11.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.spnEditorMarginsTB)
self.verticalLayout_21.addWidget(self.groupBox_161)
self.horizontalLayout_4.addLayout(self.verticalLayout_21)
self.verticalLayout_22 = QtWidgets.QVBoxLayout()
self.verticalLayout_22.setObjectName("verticalLayout_22")
self.groupBox_13 = QtWidgets.QGroupBox(self.tab_4)
font = QtGui.QFont()
font.setBold(True)
@ -1162,6 +1131,28 @@ class Ui_Settings(object):
self.groupBox_13.setObjectName("groupBox_13")
self.formLayout_9 = QtWidgets.QFormLayout(self.groupBox_13)
self.formLayout_9.setObjectName("formLayout_9")
self.label_35 = QtWidgets.QLabel(self.groupBox_13)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.label_35.setFont(font)
self.label_35.setObjectName("label_35")
self.formLayout_9.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_35)
self.cmbEditorAlignment = QtWidgets.QComboBox(self.groupBox_13)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.cmbEditorAlignment.setFont(font)
self.cmbEditorAlignment.setObjectName("cmbEditorAlignment")
icon = QtGui.QIcon.fromTheme("format-justify-left")
self.cmbEditorAlignment.addItem(icon, "")
icon = QtGui.QIcon.fromTheme("format-justify-center")
self.cmbEditorAlignment.addItem(icon, "")
icon = QtGui.QIcon.fromTheme("format-justify-right")
self.cmbEditorAlignment.addItem(icon, "")
icon = QtGui.QIcon.fromTheme("format-justify-fill")
self.cmbEditorAlignment.addItem(icon, "")
self.formLayout_9.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.cmbEditorAlignment)
self.label_40 = QtWidgets.QLabel(self.groupBox_13)
font = QtGui.QFont()
font.setBold(False)
@ -1267,30 +1258,41 @@ class Ui_Settings(object):
self.spnEditorParaBelow.setProperty("value", 5)
self.spnEditorParaBelow.setObjectName("spnEditorParaBelow")
self.formLayout_9.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.spnEditorParaBelow)
self.label_35 = QtWidgets.QLabel(self.groupBox_13)
self.verticalLayout_22.addWidget(self.groupBox_13)
self.groupBox_15 = QtWidgets.QGroupBox(self.tab_4)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.groupBox_15.setFont(font)
self.groupBox_15.setObjectName("groupBox_15")
self.formLayout_10 = QtWidgets.QFormLayout(self.groupBox_15)
self.formLayout_10.setObjectName("formLayout_10")
self.chkEditorCursorWidth = QtWidgets.QCheckBox(self.groupBox_15)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.label_35.setFont(font)
self.label_35.setObjectName("label_35")
self.formLayout_9.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_35)
self.cmbEditorAlignment = QtWidgets.QComboBox(self.groupBox_13)
self.chkEditorCursorWidth.setFont(font)
self.chkEditorCursorWidth.setObjectName("chkEditorCursorWidth")
self.formLayout_10.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.chkEditorCursorWidth)
self.spnEditorCursorWidth = QtWidgets.QSpinBox(self.groupBox_15)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.cmbEditorAlignment.setFont(font)
self.cmbEditorAlignment.setObjectName("cmbEditorAlignment")
icon = QtGui.QIcon.fromTheme("format-justify-left")
self.cmbEditorAlignment.addItem(icon, "")
icon = QtGui.QIcon.fromTheme("format-justify-center")
self.cmbEditorAlignment.addItem(icon, "")
icon = QtGui.QIcon.fromTheme("format-justify-right")
self.cmbEditorAlignment.addItem(icon, "")
icon = QtGui.QIcon.fromTheme("format-justify-fill")
self.cmbEditorAlignment.addItem(icon, "")
self.formLayout_9.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.cmbEditorAlignment)
self.horizontalLayout_4.addWidget(self.groupBox_13)
self.verticalLayout_22.addLayout(self.horizontalLayout_4)
self.spnEditorCursorWidth.setFont(font)
self.spnEditorCursorWidth.setMinimum(0)
self.spnEditorCursorWidth.setMaximum(99)
self.spnEditorCursorWidth.setProperty("value", 9)
self.spnEditorCursorWidth.setObjectName("spnEditorCursorWidth")
self.formLayout_10.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.spnEditorCursorWidth)
self.chkEditorNoBlinking = QtWidgets.QCheckBox(self.groupBox_15)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.chkEditorNoBlinking.setFont(font)
self.chkEditorNoBlinking.setObjectName("chkEditorNoBlinking")
self.formLayout_10.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.chkEditorNoBlinking)
self.verticalLayout_22.addWidget(self.groupBox_15)
self.horizontalLayout_4.addLayout(self.verticalLayout_22)
icon = QtGui.QIcon.fromTheme("view-text")
self.tabViews.addTab(self.tab_4, icon, "")
self.verticalLayout_9.addWidget(self.tabViews)
@ -1306,13 +1308,6 @@ class Ui_Settings(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lblTitleLabels.sizePolicy().hasHeightForWidth())
self.lblTitleLabels.setSizePolicy(sizePolicy)
self.lblTitleLabels.setStyleSheet("background-color:lightBlue;\n"
"border:none;\n"
"padding:10px;\n"
"color:darkBlue;\n"
"font-size:16px;\n"
"font-weight:bold;\n"
"text-align:center;")
self.lblTitleLabels.setAlignment(QtCore.Qt.AlignCenter)
self.lblTitleLabels.setObjectName("lblTitleLabels")
self.verticalLayout_3.addWidget(self.lblTitleLabels)
@ -1369,13 +1364,6 @@ class Ui_Settings(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lblTitleStatus.sizePolicy().hasHeightForWidth())
self.lblTitleStatus.setSizePolicy(sizePolicy)
self.lblTitleStatus.setStyleSheet("background-color:lightBlue;\n"
"border:none;\n"
"padding:10px;\n"
"color:darkBlue;\n"
"font-size:16px;\n"
"font-weight:bold;\n"
"text-align:center;")
self.lblTitleStatus.setAlignment(QtCore.Qt.AlignCenter)
self.lblTitleStatus.setObjectName("lblTitleStatus")
self.verticalLayout_4.addWidget(self.lblTitleStatus)
@ -1405,22 +1393,15 @@ class Ui_Settings(object):
self.verticalLayout_10 = QtWidgets.QVBoxLayout(self.page)
self.verticalLayout_10.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_10.setObjectName("verticalLayout_10")
self.lblTitleStatus_2 = QtWidgets.QLabel(self.page)
self.lblTitleFullscreen = QtWidgets.QLabel(self.page)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lblTitleStatus_2.sizePolicy().hasHeightForWidth())
self.lblTitleStatus_2.setSizePolicy(sizePolicy)
self.lblTitleStatus_2.setStyleSheet("background-color:lightBlue;\n"
"border:none;\n"
"padding:10px;\n"
"color:darkBlue;\n"
"font-size:16px;\n"
"font-weight:bold;\n"
"text-align:center;")
self.lblTitleStatus_2.setAlignment(QtCore.Qt.AlignCenter)
self.lblTitleStatus_2.setObjectName("lblTitleStatus_2")
self.verticalLayout_10.addWidget(self.lblTitleStatus_2)
sizePolicy.setHeightForWidth(self.lblTitleFullscreen.sizePolicy().hasHeightForWidth())
self.lblTitleFullscreen.setSizePolicy(sizePolicy)
self.lblTitleFullscreen.setAlignment(QtCore.Qt.AlignCenter)
self.lblTitleFullscreen.setObjectName("lblTitleFullscreen")
self.verticalLayout_10.addWidget(self.lblTitleFullscreen)
self.themeStack = QtWidgets.QStackedWidget(self.page)
self.themeStack.setObjectName("themeStack")
self.stackedWidgetPage1_3 = QtWidgets.QWidget()
@ -1797,8 +1778,8 @@ class Ui_Settings(object):
self.horizontalLayout_8.addWidget(self.stack)
self.retranslateUi(Settings)
self.stack.setCurrentIndex(2)
self.tabViews.setCurrentIndex(0)
self.stack.setCurrentIndex(5)
self.tabViews.setCurrentIndex(3)
self.themeStack.setCurrentIndex(1)
self.themeEditStack.setCurrentIndex(3)
self.lstMenu.currentRowChanged['int'].connect(self.stack.setCurrentIndex)
@ -1873,13 +1854,13 @@ class Ui_Settings(object):
self.lblTreeIconSize.setText(_translate("Settings", "TextLabel"))
self.groupBox_8.setTitle(_translate("Settings", "Folders"))
self.rdoTreeItemCount.setText(_translate("Settings", "Show ite&m count"))
self.rdoTreeWC.setText(_translate("Settings", "Show wordcount"))
self.rdoTreeProgress.setText(_translate("Settings", "Show progress"))
self.rdoTreeSummary.setText(_translate("Settings", "Show summary"))
self.rdoTreeWC.setText(_translate("Settings", "Show &wordcount"))
self.rdoTreeProgress.setText(_translate("Settings", "S&how progress"))
self.rdoTreeSummary.setText(_translate("Settings", "Show summar&y"))
self.rdoTreeNothing.setText(_translate("Settings", "&Nothing"))
self.groupBox_9.setTitle(_translate("Settings", "Text"))
self.rdoTreeTextWC.setText(_translate("Settings", "Show wordcount"))
self.rdoTreeTextProgress.setText(_translate("Settings", "Show progress"))
self.rdoTreeTextWC.setText(_translate("Settings", "&Show wordcount"))
self.rdoTreeTextProgress.setText(_translate("Settings", "Show p&rogress"))
self.rdoTreeTextSummary.setText(_translate("Settings", "Show summary"))
self.rdoTreeTextNothing.setText(_translate("Settings", "Nothing"))
self.tabViews.setTabText(self.tabViews.indexOf(self.tab), _translate("Settings", "Tree"))
@ -1917,8 +1898,8 @@ class Ui_Settings(object):
self.btnCorkColor.setShortcut(_translate("Settings", "Ctrl+S"))
self.label_16.setText(_translate("Settings", "Image:"))
self.groupBox_11.setTitle(_translate("Settings", "Style"))
self.rdoCorkOldStyle.setText(_translate("Settings", "Old style"))
self.rdoCorkNewStyle.setText(_translate("Settings", "New style"))
self.rdoCorkOldStyle.setText(_translate("Settings", "Old st&yle"))
self.rdoCorkNewStyle.setText(_translate("Settings", "Ne&w style"))
self.groupBox_5.setTitle(_translate("Settings", "Item colors"))
self.label_9.setText(_translate("Settings", "Icon color:"))
self.cmbCorkIcon.setItemText(0, _translate("Settings", "Nothing"))
@ -1951,16 +1932,15 @@ class Ui_Settings(object):
self.cmbCorkCorner.setItemText(3, _translate("Settings", "Progress"))
self.cmbCorkCorner.setItemText(4, _translate("Settings", "Compile"))
self.tabViews.setTabText(self.tabViews.indexOf(self.tab_3), _translate("Settings", "Index cards"))
self.groupBox_12.setTitle(_translate("Settings", "Font"))
self.groupBox_17.setTitle(_translate("Settings", "Colors"))
self.label_43.setText(_translate("Settings", "Background:"))
self.chkEditorBackgroundTransparent.setText(_translate("Settings", "Transparent"))
self.label_37.setText(_translate("Settings", "Color:"))
self.btnEditorColorDefault.setText(_translate("Settings", "Restore defaults"))
self.groupBox_12.setTitle(_translate("Settings", "Font"))
self.label_39.setText(_translate("Settings", "Family:"))
self.label_38.setText(_translate("Settings", "Size:"))
self.label_36.setText(_translate("Settings", "Misspelled:"))
self.label_43.setText(_translate("Settings", "Background:"))
self.groupBox_15.setTitle(_translate("Settings", "Cursor"))
self.chkEditorCursorWidth.setText(_translate("Settings", "Use block insertion of"))
self.spnEditorCursorWidth.setSuffix(_translate("Settings", " px"))
self.chkEditorNoBlinking.setText(_translate("Settings", "Disable blinking"))
self.groupBox_161.setTitle(_translate("Settings", "Text area"))
self.chkEditorMaxWidth.setText(_translate("Settings", "Max width"))
self.spnEditorMaxWidth.setSuffix(_translate("Settings", " px"))
@ -1969,6 +1949,11 @@ class Ui_Settings(object):
self.label_55.setText(_translate("Settings", "Top/Bottom margins:"))
self.spnEditorMarginsTB.setSuffix(_translate("Settings", " px"))
self.groupBox_13.setTitle(_translate("Settings", "Paragraphs"))
self.label_35.setText(_translate("Settings", "Alignment:"))
self.cmbEditorAlignment.setItemText(0, _translate("Settings", "Left"))
self.cmbEditorAlignment.setItemText(1, _translate("Settings", "Center"))
self.cmbEditorAlignment.setItemText(2, _translate("Settings", "Right"))
self.cmbEditorAlignment.setItemText(3, _translate("Settings", "Justify"))
self.label_40.setText(_translate("Settings", "Line spacing:"))
self.cmbEditorLineSpacing.setItemText(0, _translate("Settings", "Single"))
self.cmbEditorLineSpacing.setItemText(1, _translate("Settings", "1.5 lines"))
@ -1981,16 +1966,15 @@ class Ui_Settings(object):
self.label_41.setText(_translate("Settings", "Spacing:"))
self.spnEditorParaAbove.setSuffix(_translate("Settings", " px"))
self.spnEditorParaBelow.setSuffix(_translate("Settings", " px"))
self.label_35.setText(_translate("Settings", "Alignment:"))
self.cmbEditorAlignment.setItemText(0, _translate("Settings", "Left"))
self.cmbEditorAlignment.setItemText(1, _translate("Settings", "Center"))
self.cmbEditorAlignment.setItemText(2, _translate("Settings", "Right"))
self.cmbEditorAlignment.setItemText(3, _translate("Settings", "Justify"))
self.groupBox_15.setTitle(_translate("Settings", "Cursor"))
self.chkEditorCursorWidth.setText(_translate("Settings", "Use block insertion of"))
self.spnEditorCursorWidth.setSuffix(_translate("Settings", " px"))
self.chkEditorNoBlinking.setText(_translate("Settings", "Disable blinking"))
self.tabViews.setTabText(self.tabViews.indexOf(self.tab_4), _translate("Settings", "Text editor"))
self.lblTitleLabels.setText(_translate("Settings", "Labels"))
self.btnLabelColor.setShortcut(_translate("Settings", "Ctrl+S"))
self.lblTitleStatus.setText(_translate("Settings", "Status"))
self.lblTitleStatus_2.setText(_translate("Settings", "Fullscreen"))
self.lblTitleFullscreen.setText(_translate("Settings", "Fullscreen"))
self.btnThemeAdd.setText(_translate("Settings", "New"))
self.btnThemeEdit.setText(_translate("Settings", "Edit"))
self.btnThemeRemove.setText(_translate("Settings", "Delete"))

File diff suppressed because it is too large Load diff

View file

@ -8,14 +8,40 @@ from PyQt5.QtGui import QColor, QPalette
from PyQt5.QtWidgets import qApp
from manuskript import settings
from manuskript import functions as F
# Loading palette colors.
# Manuskript as to restart to reload
p = qApp.palette()
# window = "#d6d2d0" #"#eee" / #eff0f1
window = qApp.palette().color(QPalette.Window).name()
window = p.color(QPalette.Window).name() # General background
windowText = p.color(QPalette.WindowText).name() # General foregroung
base = p.color(QPalette.Base).name() # Other background
alternateBase = p.color(QPalette.AlternateBase).name() # Other background
text = p.color(QPalette.Text).name() # Base Text
brightText = p.color(QPalette.BrightText).name() # Contrast Text
button = p.color(QPalette.Button).name() # Button background
buttonText = p.color(QPalette.ButtonText).name() # Button Text
highlight = p.color(QPalette.Highlight).name() # Other background
highlightedText = p.color(QPalette.HighlightedText).name() # Base Text
light = p.color(QPalette.Light).name() # Lighter than Button color
midlight = p.color(QPalette.Midlight).name() # Between Button and Light
dark = p.color(QPalette.Dark).name() # Darker than Button
mid = p.color(QPalette.Mid).name() # Between Button and Dark
shadow = p.color(QPalette.Shadow).name() # A very dark color
highlightLight = F.mixColors(highlight, window, .3)
highlightedTextDark = F.mixColors(highlight, text, .3)
highlightedTextLight = F.mixColors(highlight, highlightedText)
midlighter = F.mixColors(mid, window, .4)
textLight = F.mixColors(window, text)
#from manuskript.ui import style as S
#QColor(S.highlightedTextDark)
#QColor(S.highlightLight)
bgHover = "#ccc"
bgChecked = "#bbb"
borderColor = "darkGray"
blue = "#268bd2"
def mainWindowSS():
return """
@ -26,13 +52,13 @@ def mainWindowSS():
border: none;
}}
QPushButton:flat:hover, QToolButton:hover{{
border: 1px solid {borderColor};
border: 1px solid {borderHover};
border-radius: 3px;
background: {bgHover};
background: {backgroundHover};
}}
""".format(
bgHover=bgHover,
borderColor=borderColor
backgroundHover=highlightLight,
borderHover=mid
)
def styleMainWindow(mw):
@ -40,13 +66,34 @@ def styleMainWindow(mw):
mw.lstTabs.verticalScrollBar().setStyleSheet(simpleScrollBarV())
# Custon palette?
qApp.setPalette(appPalette())
#qApp.setPalette(appPalette())
mw.treeRedacOutline.setStyleSheet("""
QTreeView{
background: transparent;
margin-top: 30px;
}""")
}""" + simpleScrollBarV())
mw.lstTabs.setStyleSheet("""
QListView {{
show-decoration-selected: 0;
outline: none;
background-color: transparent;
}}
QListView::item:selected {{
background: {highlight};
color: {textSelected}
}}
QListView::item:hover {{
background: {hover};
}}
""".format(
hover=highlight,
highlight=highlightLight,
textSelected=text,
))
def appPalette():
@ -78,104 +125,126 @@ def appPalette():
def collapsibleGroupBoxButton():
s1 = """
QPushButton{
QPushButton{{
background-color: #BBB;
border: none;
padding: 2px;
}
QPushButton:checked, QPushButton:hover{
}}
QPushButton:checked, QPushButton:hover{{
font-style:italic;
background-color:lightBlue;
}"""
background-color:{bg};
}}""".format(bg=highlightLight)
s2 = """
QPushButton{{
background-color: transparent;
border: none;
border-top: 1px solid darkGray;
border-top: 1px solid {border};
padding: 4px 0px;
font-weight: bold;
}}
QPushButton:hover{{
background-color:{bgHover};
background-color:{hover};
}}
""".format(
bgHover=bgHover,
bgChecked=bgChecked
hover=highlightLight,
border=mid,
)
return s2
def mainEditorTabSS():
return """
QTabWidget::pane{{
margin-top: -1px;
border: 1px solid #999;
}}
QTabWidget::tab-bar{{
left:50px;
}}
QTabBar{{
background: transparent;
border-radius: 0;
border: 0px;
}}
QTabBar::tab{{
margin: 3px 0 -3px 0;
padding: 2px 9px;
border: 1px solid #999;
border-bottom: 0px;
}}
QTabBar::tab:selected{{
border: 1px solid #999;
background: {bgColor};
border-bottom: 0px;
margin-top: 0px;
color: {foreground};
}}
QTabBar::tab:!selected:hover{{
background:#ddd;
}}
if not settings.textEditor["backgroundTransparent"]:
SS = """
QTabWidget::pane{{
margin-top: -1px;
border: 1px solid {borderColor};
}}
QTabWidget::tab-bar{{
left:50px;
}}
QTabBar{{
background: transparent;
border-radius: 0;
border: 0px;
}}
QTabBar::tab{{
padding: 2px 9px;
border: 1px solid {borderColor};
border-bottom: 0px;
}}
QTabBar::tab:selected{{
border: 1px solid {borderColor};
background: {bgColor};
border-bottom: 0px;
color: {foreground};
}}
QTabBar::tab:!selected:hover{{
background:{highlight};
color: {highlightedText};
}}
""".format(
bgColor=settings.textEditor["background"],
foreground=settings.textEditor["fontColor"],
borderColor=mid,
highlight=highlight,
highlightedText=highlightedText,
)
else:
# Transparent text view
SS = """
QTabWidget::pane{{
margin-top: -1px;
border: none;
}}
QTabWidget::tab-bar{{
left:50px;
}}
QTabBar{{
background: transparent;
border: 0px;
}}
QTabBar::tab{{
padding: 2px 9px;
border: 1px solid {borderColor};
}}
QTabBar::tab:selected{{
border: 1px solid {borderColor};
background: {highlight};
color: {highlightedText};
}}
QTabBar::tab:!selected:hover{{
background:{highlight};
color: {highlightedText};
}}
""".format(
highlight=highlight,
highlightedText=highlightedText,
text=text,
borderColor=mid,
)
# Add scrollbar
SS += simpleScrollBarV(handle=mid, width=10)
return SS
QScrollBar:vertical {{
border: none;
background: transparent;
width: 10px;
}}
QScrollBar::handle {{
background: rgba(180, 180, 180, 40%);
}}
QScrollBar::add-line:vertical {{
width:0;
height: 0;
border: none;
background: none;
}}
QScrollBar::sub-line:vertical {{
width:0;
height: 0;
border: none;
background: none;
}}
""".format(
bgColor=settings.textEditor["background"],
foreground=settings.textEditor["fontColor"]
)
def toolBarSS():
return """
QToolBar{
QToolBar{{
background:transparent;
border: 0;
border-left: 1px solid darkgray;
border-left: 1px solid {border};
spacing: 0px;
}
QToolBar:separator{
}}
QToolBar:separator{{
border: none;
}
"""
}}
""".format(
border=midlighter,
)
def verticalToolButtonSS():
return """
@ -195,25 +264,27 @@ def verticalToolButtonSS():
background: {bgHover};
}}
""".format(
borderColor=borderColor,
bgChecked=bgChecked,
bgHover=bgHover
borderColor=mid,
bgChecked=midlighter,
bgHover=highlightLight,
)
def dockSS():
return """
QDockWidget::title {{
text-align: left; /* align the text to the left */
background: {bgChecked};
background: {header};
padding: 5px;
}}
QDockWidget::close-button, QDockWidget::float-button {{
background: {bgChecked};
background: {header};
}}
""".format(
bgChecked=bgChecked
header=highlightLight,
button=button
)
@ -231,17 +302,17 @@ def lineEditSS():
# return "border-radius: 6px;"
return """QLineEdit{{
border: none;
border-bottom: 1px solid {checked};
border-bottom: 1px solid {line};
background:{window};
}}
QLineEdit:focus{{
border-bottom: 1px solid {blue};
border-bottom: 1px solid {highlight};
}}
""".format(window=window,
checked=bgChecked,
blue=blue)
line=mid,
highlight=highlight)
def transparentSS():
return """
QTextEdit{
@ -249,25 +320,66 @@ def transparentSS():
border:none;
}"""
def simpleScrollBarV():
def simpleScrollBarV(handle=None, width=8):
# system default is (i think): mid background, dark handle
default = midlighter
handle = handle or default
return """
QScrollBar:vertical {
QScrollBar:vertical {{
border: none;
background: transparent;
width: 8px;
}
QScrollBar::handle {
background: rgba(180, 180, 180, 60%);
}
QScrollBar::add-line:vertical {
background: {background};
width: {width}px;
}}
QScrollBar::handle {{
background: {handle};
}}
QScrollBar::add-line:vertical {{
width:0;
height: 0;
border: none;
background: none;
}
QScrollBar::sub-line:vertical {
}}
QScrollBar::sub-line:vertical {{
width:0;
height: 0;
border: none;
background: none;
}"""
}}""".format(
background="transparent",
handle=handle,
width=width)
def toolBoxSS():
return """
QToolBox::tab{{
background-color: {background};
padding: 2px;
border: none;
}}
QToolBox::tab:selected, QToolBox::tab:hover{{
background-color:{backgroundHover};
color: {colorHover};
}}""".format(
background=highlightLight,
backgroundHover=highlight,
colorHover=highlightedText,
)
def titleLabelSS():
return """
QLabel{{
background-color:{bg};
border:none;
padding:10px;
color:{text};
font-size:16px;
font-weight:bold;
text-align:center;
}}""".format(
bg=highlightLight,
text=highlightedTextDark,
)

View file

@ -6,6 +6,7 @@ from PyQt5.QtWidgets import QTreeWidget, QTreeWidgetItem, QColorDialog
from manuskript.enums import Character
from manuskript.functions import iconColor, mainWindow
from manuskript.ui import style as S
class characterTreeView(QTreeWidget):
@ -90,8 +91,8 @@ class characterTreeView(QTreeWidget):
for i in range(3):
# Create category item
cat = QTreeWidgetItem(self, [h[i]])
cat.setBackground(0, QBrush(QColor(Qt.blue).lighter(190)))
cat.setForeground(0, QBrush(Qt.darkBlue))
cat.setBackground(0, QBrush(QColor(S.highlightLight)))
cat.setForeground(0, QBrush(QColor(S.highlightedTextDark)))
cat.setTextAlignment(0, Qt.AlignCenter)
f = cat.font(0)
f.setBold(True)

View file

@ -6,6 +6,7 @@ from PyQt5.QtWidgets import QComboBox
from manuskript.enums import Outline
from manuskript.functions import toInt
from manuskript.ui import style as S
class cmbOutlineCharacterChoser(QComboBox):
@ -36,8 +37,8 @@ class cmbOutlineCharacterChoser(QComboBox):
for importance in range(3):
self.addItem(l[importance])
self.setItemData(self.count() - 1, QBrush(QColor(Qt.darkBlue)), Qt.ForegroundRole)
self.setItemData(self.count() - 1, QBrush(QColor(Qt.blue).lighter(190)), Qt.BackgroundRole)
self.setItemData(self.count() - 1, QBrush(QColor(S.highlightedTextDark)), Qt.ForegroundRole)
self.setItemData(self.count() - 1, QBrush(QColor(S.highlightLight)), Qt.BackgroundRole)
item = self.model().item(self.count() - 1)
item.setFlags(Qt.ItemIsEnabled)
for i in range(self.mdlCharacters.rowCount()):

View file

@ -10,6 +10,7 @@ from manuskript.functions import colorifyPixmap
from manuskript.functions import mainWindow
from manuskript.functions import mixColors
from manuskript.functions import outlineItemColors
from manuskript.ui import style as S
class corkDelegate(QStyledItemDelegate):
@ -20,6 +21,8 @@ class corkDelegate(QStyledItemDelegate):
self.editing = None
self.margin = 5
self.bgColors = {}
def newStyle(self):
return settings.corkStyle == "new"
@ -42,6 +45,8 @@ class corkDelegate(QStyledItemDelegate):
def createEditor(self, parent, option, index):
self.updateRects(option, index)
bgColor = self.bgColors.get(index, "white")
if self.mainLineRect.contains(self.lastPos):
# One line summary
self.editing = Outline.summarySentence
@ -56,6 +61,7 @@ class corkDelegate(QStyledItemDelegate):
edt.setAlignment(Qt.AlignCenter)
edt.setPlaceholderText(self.tr("One line summary"))
edt.setFont(f)
edt.setStyleSheet("background: {}; color: black;".format(bgColor))
return edt
elif self.titleRect.contains(self.lastPos):
@ -71,6 +77,7 @@ class corkDelegate(QStyledItemDelegate):
edt.setAlignment(Qt.AlignCenter)
f.setBold(True)
edt.setFont(f)
edt.setStyleSheet("background: {}; color: black;".format(bgColor))
# edt.setGeometry(self.titleRect)
return edt
@ -85,6 +92,7 @@ class corkDelegate(QStyledItemDelegate):
edt.setPlaceholderText(self.tr("Full summary"))
except AttributeError:
pass
edt.setStyleSheet("background: {}; color: black;".format(bgColor))
return edt
def updateEditorGeometry(self, editor, option, index):
@ -240,9 +248,14 @@ class corkDelegate(QStyledItemDelegate):
if c == QColor(Qt.transparent):
c = QColor(Qt.white)
col = mixColors(c, QColor(Qt.white), .2)
backgroundColor = col
p.setBrush(col)
else:
p.setBrush(Qt.white)
backgroundColor = QColor(Qt.white)
# Cache background color
self.bgColors[index] = backgroundColor.name()
p.setPen(Qt.NoPen)
p.drawRect(self.cardRect)
@ -302,10 +315,20 @@ class corkDelegate(QStyledItemDelegate):
if text:
p.setPen(Qt.black)
textColor = QColor(Qt.black)
if settings.viewSettings["Cork"]["Text"] != "Nothing":
col = colors[settings.viewSettings["Cork"]["Text"]]
if col == Qt.transparent:
col = Qt.black
# If title setting is compile, we have to hack the color
# Or we won't see anything in some themes
if settings.viewSettings["Cork"]["Text"] == "Compile":
if item.compile() in [0, "0"]:
col = mixColors(QColor(Qt.black), backgroundColor)
else:
col = Qt.black
textColor = col
p.setPen(col)
f = QFont(option.font)
f.setPointSize(f.pointSize() + 4)
@ -358,7 +381,7 @@ class corkDelegate(QStyledItemDelegate):
f = QFont(option.font)
f.setBold(True)
p.setFont(f)
p.setPen(Qt.black)
p.setPen(textColor)
fm = QFontMetrics(f)
elidedText = fm.elidedText(lineSummary, Qt.ElideRight, self.mainLineRect.width())
p.drawText(self.mainLineRect, Qt.AlignLeft | Qt.AlignVCenter, elidedText)
@ -368,7 +391,7 @@ class corkDelegate(QStyledItemDelegate):
if fullSummary:
p.save()
p.setFont(option.font)
p.setPen(Qt.black)
p.setPen(textColor)
p.drawText(self.mainTextRect, Qt.TextWordWrap, fullSummary)
p.restore()

View file

@ -8,6 +8,7 @@ from PyQt5.QtWidgets import qApp
from manuskript import settings
from manuskript.enums import Character, Outline
from manuskript.functions import outlineItemColors, mixColors, colorifyPixmap, toInt, toFloat, drawProgress
from manuskript.ui import style as S
class outlineTitleDelegate(QStyledItemDelegate):
@ -39,7 +40,7 @@ class outlineTitleDelegate(QStyledItemDelegate):
col = colors[settings.viewSettings["Outline"]["Background"]]
if col != QColor(Qt.transparent):
col2 = QColor(Qt.white)
col2 = QColor(S.base)
if opt.state & QStyle.State_Selected:
col2 = opt.palette.brush(QPalette.Normal, QPalette.Highlight).color()
col = mixColors(col, col2, .2)
@ -76,10 +77,20 @@ class outlineTitleDelegate(QStyledItemDelegate):
# Text
if opt.text:
painter.save()
textColor = QColor(S.text)
if option.state & QStyle.State_Selected:
col = QColor(S.highlightedText)
textColor = col
painter.setPen(col)
if settings.viewSettings["Outline"]["Text"] != "Nothing":
col = colors[settings.viewSettings["Outline"]["Text"]]
if col == Qt.transparent:
col = Qt.black
col = textColor
# If text color is Compile and item is selected, we have
# to change the color
if settings.viewSettings["Outline"]["Text"] == "Compile" and \
item.compile() in [0, "0"]:
col = mixColors(textColor, QColor(S.window))
painter.setPen(col)
f = QFont(opt.font)
painter.setFont(f)
@ -132,8 +143,8 @@ class outlineCharacterDelegate(QStyledItemDelegate):
l = [self.tr("Main"), self.tr("Secondary"), self.tr("Minor")]
for importance in range(3):
editor.addItem(l[importance])
editor.setItemData(editor.count() - 1, QBrush(Qt.darkBlue), Qt.ForegroundRole)
editor.setItemData(editor.count() - 1, QBrush(QColor(Qt.blue).lighter(190)), Qt.BackgroundRole)
editor.setItemData(editor.count() - 1, QBrush(QColor(S.highlightedTextDark)), Qt.ForegroundRole)
editor.setItemData(editor.count() - 1, QBrush(QColor(S.highlightLight)), Qt.BackgroundRole)
item = editor.model().item(editor.count() - 1)
item.setFlags(Qt.ItemIsEnabled)
for i in range(self.mdlCharacter.rowCount()):

View file

@ -8,6 +8,7 @@ from lxml import etree as ET
from manuskript import settings
from manuskript.enums import Plot, Outline, PlotStep
from manuskript.models import references as Ref
from manuskript.ui import style as S
class plotTreeView(QTreeWidget):
@ -126,8 +127,8 @@ class plotTreeView(QTreeWidget):
h = [self.tr("Main"), self.tr("Secondary"), self.tr("Minor")]
for i in range(3):
cat = QTreeWidgetItem(self, [h[i]])
cat.setBackground(0, QBrush(QColor(Qt.blue).lighter(190)))
cat.setForeground(0, QBrush(Qt.darkBlue))
cat.setBackground(0, QBrush(QColor(S.highlightLight)))
cat.setForeground(0, QBrush(QColor(S.highlightedTextDark)))
cat.setTextAlignment(0, Qt.AlignCenter)
f = cat.font(0)
f.setBold(True)

View file

@ -15,6 +15,7 @@ from manuskript.ui.editors.MDFunctions import MDFormatSelection
from manuskript.ui.editors.MMDHighlighter import MMDHighlighter
from manuskript.ui.editors.basicHighlighter import basicHighlighter
from manuskript.ui.editors.textFormat import textFormat
from manuskript.ui import style as S
try:
import enchant
@ -205,6 +206,8 @@ class textEditView(QTextEdit):
opt = settings.textEditor
f = QFont()
f.fromString(opt["font"])
background = opt["background"] if not opt["backgroundTransparent"] else "transparent"
foreground = opt["fontColor"] if not opt["backgroundTransparent"] else S.text
# self.setFont(f)
self.setStyleSheet("""QTextEdit{{
background: {bg};
@ -215,8 +218,8 @@ class textEditView(QTextEdit):
{maxWidth}
}}
""".format(
bg=opt["background"],
foreground=opt["fontColor"],
bg=background,
foreground=foreground,
ff=f.family(),
fs="{}pt".format(str(f.pointSize())),
mTB = opt["marginsTB"],
@ -237,7 +240,7 @@ class textEditView(QTextEdit):
# We style by name, otherwise all heriting widgets get the same
# colored background, for example context menu.
name=self.parent().objectName(),
bg=opt["background"],
bg=background,
))
cf = QTextCharFormat()

View file

@ -9,6 +9,7 @@ from manuskript.enums import Outline
from manuskript.functions import mixColors, colorifyPixmap
from manuskript.functions import outlineItemColors
from manuskript.functions import toFloat
from manuskript.ui import style as S
class treeTitleDelegate(QStyledItemDelegate):
@ -44,7 +45,7 @@ class treeTitleDelegate(QStyledItemDelegate):
col = colors[settings.viewSettings["Tree"]["Background"]]
if col != QColor(Qt.transparent):
col2 = QColor(Qt.white)
col2 = QColor(S.window)
if opt.state & QStyle.State_Selected:
col2 = opt.palette.brush(QPalette.Normal, QPalette.Highlight).color()
col = mixColors(col, col2, .2)
@ -81,10 +82,20 @@ class treeTitleDelegate(QStyledItemDelegate):
# Text
if opt.text:
painter.save()
textColor = QColor(S.text)
if option.state & QStyle.State_Selected:
col = QColor(S.highlightedText)
textColor = col
painter.setPen(col)
if settings.viewSettings["Tree"]["Text"] != "Nothing":
col = colors[settings.viewSettings["Tree"]["Text"]]
if col == Qt.transparent:
col = Qt.black
col = textColor
# If text color is Compile and item is selected, we have
# to change the color
if settings.viewSettings["Outline"]["Text"] == "Compile" and \
item.compile() in [0, "0"]:
col = mixColors(textColor, QColor(S.window))
painter.setPen(col)
f = QFont(opt.font)
painter.setFont(f)
@ -131,8 +142,12 @@ class treeTitleDelegate(QStyledItemDelegate):
f = painter.font()
f.setWeight(QFont.Normal)
painter.setFont(f)
painter.setPen(Qt.darkGray)
painter.drawText(r, Qt.AlignLeft | Qt.AlignBottom, extraText)
if option.state & QStyle.State_Selected:
col = QColor(S.highlightedTextLight)
else:
col = QColor(S.textLight)
painter.setPen(col)
painter.drawText(r, Qt.AlignLeft | Qt.AlignVCenter, extraText)
painter.restore()
painter.restore()

View file

@ -20,6 +20,7 @@ from manuskript.models.outlineModel import outlineModel
from manuskript.models.plotModel import plotModel
from manuskript.models.worldModel import worldModel
from manuskript.ui.welcome_ui import Ui_welcome
from manuskript.ui import style as S
try:
locale.setlocale(locale.LC_ALL, '')
@ -273,6 +274,7 @@ class welcome(QWidget, Ui_welcome):
btn = QPushButton("", self)
btn.setIcon(QIcon.fromTheme("edit-delete"))
btn.setProperty("deleteRow", k)
btn.setFlat(True)
btn.clicked.connect(self.deleteTemplateRow)
self.lytTemplate.addWidget(btn, k, 3)
@ -337,8 +339,8 @@ class welcome(QWidget, Ui_welcome):
def addTopLevelItem(self, name):
item = QTreeWidgetItem(self.tree, [name])
item.setBackground(0, QBrush(QColor(Qt.blue).lighter(190)))
item.setForeground(0, QBrush(Qt.darkBlue))
item.setBackground(0, QBrush(QColor(S.highlightLight)))
item.setForeground(0, QBrush(QColor(S.highlightedTextDark)))
item.setTextAlignment(0, Qt.AlignCenter)
item.setFlags(Qt.ItemIsEnabled)
f = item.font(0)
@ -376,6 +378,8 @@ class welcome(QWidget, Ui_welcome):
# Empty settings
imp.reload(settings)
settings.initDefaultValues()
if self.template:
t = [i for i in self.templates() if i[0] == self.template[0]]
if t and t[0][2] == "Non-fiction":