mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-14 00:44:34 +12:00
UI tweaks
This commit is contained in:
parent
f90a71a76f
commit
ca39121826
|
@ -52,6 +52,7 @@ class collapsibleDockWidgets(QToolBar):
|
||||||
self.currentGroup = None
|
self.currentGroup = None
|
||||||
|
|
||||||
self.setStyleSheet(style.toolBarSS())
|
self.setStyleSheet(style.toolBarSS())
|
||||||
|
self.layout().setContentsMargins(0,0,0,0)
|
||||||
|
|
||||||
def _dockWidgets(self):
|
def _dockWidgets(self):
|
||||||
mw = self.parent()
|
mw = self.parent()
|
||||||
|
@ -61,7 +62,7 @@ class collapsibleDockWidgets(QToolBar):
|
||||||
def addCustomWidget(self, text, widget, group=None, defaultVisibility=True):
|
def addCustomWidget(self, text, widget, group=None, defaultVisibility=True):
|
||||||
"""
|
"""
|
||||||
Adds a custom widget to the toolbar.
|
Adds a custom widget to the toolbar.
|
||||||
|
|
||||||
`text` is the name that will displayed on the button to switch visibility.
|
`text` is the name that will displayed on the button to switch visibility.
|
||||||
`widget` is the widget to control from the toolbar.
|
`widget` is the widget to control from the toolbar.
|
||||||
`group` is an integer (or any hashable) if the current widget should not
|
`group` is an integer (or any hashable) if the current widget should not
|
||||||
|
|
|
@ -38,6 +38,7 @@ highlightedTextDark = F.mixColors(highlight, text, .3)
|
||||||
highlightedTextLight = F.mixColors(highlight, highlightedText)
|
highlightedTextLight = F.mixColors(highlight, highlightedText)
|
||||||
midlighter = F.mixColors(mid, window, .4)
|
midlighter = F.mixColors(mid, window, .4)
|
||||||
textLight = F.mixColors(window, text)
|
textLight = F.mixColors(window, text)
|
||||||
|
textLighter = F.mixColors(window, text, .85)
|
||||||
|
|
||||||
|
|
||||||
#from manuskript.ui import style as S
|
#from manuskript.ui import style as S
|
||||||
|
@ -160,25 +161,25 @@ def mainEditorTabSS():
|
||||||
if not settings.textEditor["backgroundTransparent"]:
|
if not settings.textEditor["backgroundTransparent"]:
|
||||||
SS = """
|
SS = """
|
||||||
QTabWidget::pane{{
|
QTabWidget::pane{{
|
||||||
margin-top: -1px;
|
margin-top: -{bw}px;
|
||||||
border: 1px solid {borderColor};
|
border: {bw}px solid {borderColor};
|
||||||
}}
|
}}
|
||||||
QTabWidget::tab-bar{{
|
QTabWidget::tab-bar{{
|
||||||
left:50px;
|
left:50px;
|
||||||
}}
|
}}
|
||||||
QTabBar{{
|
QTabBar{{
|
||||||
background: transparent;
|
background: {bgColor};
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
}}
|
}}
|
||||||
QTabBar::tab{{
|
QTabBar::tab{{
|
||||||
padding: 2px 9px;
|
padding: 2px 9px;
|
||||||
border: 1px solid {borderColor};
|
border: {bw}px solid {borderColor};
|
||||||
border-bottom: 0px;
|
border-bottom: 0px;
|
||||||
}}
|
}}
|
||||||
QTabBar::tab:selected{{
|
QTabBar::tab:selected{{
|
||||||
border: 1px solid {borderColor};
|
border: {bw}px solid {borderColor};
|
||||||
background: {bgColor};
|
background: {bgColorSelected};
|
||||||
border-bottom: 0px;
|
border-bottom: 0px;
|
||||||
color: {foreground};
|
color: {foreground};
|
||||||
}}
|
}}
|
||||||
|
@ -187,32 +188,34 @@ def mainEditorTabSS():
|
||||||
color: {highlightedText};
|
color: {highlightedText};
|
||||||
}}
|
}}
|
||||||
""".format(
|
""".format(
|
||||||
bgColor=settings.textEditor["background"],
|
bgColor=textLighter,
|
||||||
|
bgColorSelected=settings.textEditor["background"],
|
||||||
foreground=settings.textEditor["fontColor"],
|
foreground=settings.textEditor["fontColor"],
|
||||||
borderColor=mid,
|
borderColor=mid,
|
||||||
highlight=highlight,
|
highlight=highlight,
|
||||||
highlightedText=highlightedText,
|
highlightedText=highlightedText,
|
||||||
|
bw=0,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# Transparent text view
|
# Transparent text view
|
||||||
SS = """
|
SS = """
|
||||||
QTabWidget::pane{{
|
QTabWidget::pane{{
|
||||||
margin-top: -1px;
|
margin-top: -{bw}px;
|
||||||
border: none;
|
border: none;
|
||||||
}}
|
}}
|
||||||
QTabWidget::tab-bar{{
|
QTabWidget::tab-bar{{
|
||||||
left:50px;
|
left:50px;
|
||||||
}}
|
}}
|
||||||
QTabBar{{
|
QTabBar{{
|
||||||
background: transparent;
|
background: {bgColor};
|
||||||
border: 0px;
|
border: 0px;
|
||||||
}}
|
}}
|
||||||
QTabBar::tab{{
|
QTabBar::tab{{
|
||||||
padding: 2px 9px;
|
padding: 2px 9px;
|
||||||
border: 1px solid {borderColor};
|
border: {bw}px solid {borderColor};
|
||||||
}}
|
}}
|
||||||
QTabBar::tab:selected{{
|
QTabBar::tab:selected{{
|
||||||
border: 1px solid {borderColor};
|
border: {bw}px solid {borderColor};
|
||||||
background: {highlight};
|
background: {highlight};
|
||||||
color: {highlightedText};
|
color: {highlightedText};
|
||||||
}}
|
}}
|
||||||
|
@ -221,10 +224,12 @@ def mainEditorTabSS():
|
||||||
color: {highlightedText};
|
color: {highlightedText};
|
||||||
}}
|
}}
|
||||||
""".format(
|
""".format(
|
||||||
highlight=highlight,
|
bgColor=textLighter,
|
||||||
highlightedText=highlightedText,
|
highlight=highlightLight,
|
||||||
|
highlightedText=text,
|
||||||
text=text,
|
text=text,
|
||||||
borderColor=mid,
|
borderColor=mid,
|
||||||
|
bw=0,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add scrollbar
|
# Add scrollbar
|
||||||
|
@ -237,9 +242,9 @@ def toolBarSS():
|
||||||
return """
|
return """
|
||||||
QToolBar{{
|
QToolBar{{
|
||||||
background:transparent;
|
background:transparent;
|
||||||
border: 0;
|
border:none;
|
||||||
border-left: 1px solid {border};
|
|
||||||
spacing: 0px;
|
spacing: 0px;
|
||||||
|
margin-top:40px;
|
||||||
}}
|
}}
|
||||||
QToolBar:separator{{
|
QToolBar:separator{{
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -251,7 +256,7 @@ def toolBarSS():
|
||||||
def verticalToolButtonSS():
|
def verticalToolButtonSS():
|
||||||
return """
|
return """
|
||||||
QToolButton{{
|
QToolButton{{
|
||||||
border: none;
|
border: 0;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
@ -267,7 +272,7 @@ def verticalToolButtonSS():
|
||||||
}}
|
}}
|
||||||
""".format(
|
""".format(
|
||||||
borderColor=mid,
|
borderColor=mid,
|
||||||
bgChecked=midlighter,
|
bgChecked=textLighter,
|
||||||
bgHover=highlightLight,
|
bgHover=highlightLight,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue