mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-12 08:52:30 +12:00
Removes most of hard-coded colors
This commit is contained in:
parent
58bdf35953
commit
ee212db39c
|
@ -146,11 +146,18 @@ 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):
|
||||
|
@ -236,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))
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -38,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"),
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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())
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>&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>&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>&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&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>&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>&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>&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&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>&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>&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&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&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>&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&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>&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&ove Down</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Shift+Down</string>
|
||||
|
|
|
@ -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)
|
||||
|
@ -1329,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)
|
||||
|
@ -1392,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)
|
||||
|
@ -1428,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()
|
||||
|
@ -1820,7 +1778,7 @@ class Ui_Settings(object):
|
|||
self.horizontalLayout_8.addWidget(self.stack)
|
||||
|
||||
self.retranslateUi(Settings)
|
||||
self.stack.setCurrentIndex(2)
|
||||
self.stack.setCurrentIndex(5)
|
||||
self.tabViews.setCurrentIndex(3)
|
||||
self.themeStack.setCurrentIndex(1)
|
||||
self.themeEditStack.setCurrentIndex(3)
|
||||
|
@ -2016,7 +1974,7 @@ class Ui_Settings(object):
|
|||
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"))
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<item>
|
||||
<widget class="QStackedWidget" name="stack">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="stackedWidgetPage1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
|
@ -78,15 +78,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>General settings</string>
|
||||
</property>
|
||||
|
@ -464,15 +455,6 @@ text-align:center;</string>
|
|||
<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>Revisions</string>
|
||||
</property>
|
||||
|
@ -775,15 +757,6 @@ text-align:center;</string>
|
|||
<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>Views settings</string>
|
||||
</property>
|
||||
|
@ -2679,15 +2652,6 @@ text-align:center;</string>
|
|||
<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>Labels</string>
|
||||
</property>
|
||||
|
@ -2820,15 +2784,6 @@ text-align:center;</string>
|
|||
<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>Status</string>
|
||||
</property>
|
||||
|
@ -2896,22 +2851,13 @@ text-align:center;</string>
|
|||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblTitleStatus_2">
|
||||
<widget class="QLabel" name="lblTitleFullscreen">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<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>Fullscreen</string>
|
||||
</property>
|
||||
|
|
|
@ -8,6 +8,7 @@ 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
|
||||
|
@ -16,6 +17,7 @@ p = qApp.palette()
|
|||
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
|
||||
|
@ -29,11 +31,17 @@ 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 """
|
||||
|
@ -44,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):
|
||||
|
@ -58,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():
|
||||
|
@ -96,30 +125,30 @@ 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
|
||||
|
@ -183,7 +212,7 @@ def mainEditorTabSS():
|
|||
QTabBar::tab:selected{{
|
||||
border: 1px solid {borderColor};
|
||||
background: {highlight};
|
||||
color: {text};
|
||||
color: {highlightedText};
|
||||
}}
|
||||
QTabBar::tab:!selected:hover{{
|
||||
background:{highlight};
|
||||
|
@ -197,45 +226,25 @@ def mainEditorTabSS():
|
|||
)
|
||||
|
||||
# Add scrollbar
|
||||
SS += """
|
||||
QScrollBar:vertical {{
|
||||
border: none;
|
||||
background: transparent;
|
||||
width: 10px;
|
||||
}}
|
||||
QScrollBar::handle {{
|
||||
background: {scrollBG};
|
||||
}}
|
||||
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(scrollBG=button)
|
||||
SS += simpleScrollBarV(handle=mid, width=10)
|
||||
|
||||
return SS
|
||||
|
||||
|
||||
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 """
|
||||
|
@ -255,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
|
||||
)
|
||||
|
||||
|
||||
|
@ -291,15 +302,15 @@ 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():
|
||||
|
@ -309,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,
|
||||
)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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()):
|
||||
|
|
|
@ -10,6 +10,7 @@ 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):
|
||||
def __init__(self, parent=None):
|
||||
QStyledItemDelegate.__init__(self, parent)
|
||||
|
@ -142,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()):
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -142,10 +142,11 @@ class treeTitleDelegate(QStyledItemDelegate):
|
|||
f = painter.font()
|
||||
f.setWeight(QFont.Normal)
|
||||
painter.setFont(f)
|
||||
col = mixColors(
|
||||
QColor(S.window),
|
||||
QColor(S.text))
|
||||
painter.setPen(col) #Qt.darkGray
|
||||
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()
|
||||
|
||||
|
|
|
@ -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, '')
|
||||
|
@ -271,6 +272,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)
|
||||
|
@ -335,8 +337,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)
|
||||
|
|
Loading…
Reference in a new issue