initial replace pass.
This commit is contained in:
parent
743c3b1e26
commit
2a11adc8ac
@ -64,7 +64,7 @@ class DownloadView(QListView):
|
||||
|
||||
STYLESHEET = """
|
||||
QListView {
|
||||
{{ color['downloads.bg.bar'] }}
|
||||
background-color: {{ color['downloads.bg.bar'] }};
|
||||
{{ font['downloads'] }}
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ class CompletionItemDelegate(QStyledItemDelegate):
|
||||
self._doc.setDefaultTextOption(text_option)
|
||||
self._doc.setDefaultStyleSheet(style.get_stylesheet("""
|
||||
.highlight {
|
||||
{{ color['completion.match.fg'] }}
|
||||
color: {{ color['completion.match.fg'] }};
|
||||
}
|
||||
"""))
|
||||
self._doc.setDocumentMargin(2)
|
||||
|
@ -56,14 +56,14 @@ class CompletionView(QTreeView):
|
||||
STYLESHEET = """
|
||||
QTreeView {
|
||||
{{ font['completion'] }}
|
||||
{{ color['completion.bg'] }}
|
||||
background-color: {{ color['completion.bg'] }};
|
||||
alternate-background-color: {{ color['completion.alternate-bg'] }};
|
||||
outline: 0;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
QTreeView::item:disabled {
|
||||
{{ color['completion.category.bg'] }}
|
||||
background-color: {{ color['completion.category.bg'] }};
|
||||
border-top: 1px solid
|
||||
{{ color['completion.category.border.top'] }};
|
||||
border-bottom: 1px solid
|
||||
@ -75,7 +75,7 @@ class CompletionView(QTreeView):
|
||||
{{ color['completion.item.selected.border.top'] }};
|
||||
border-bottom: 1px solid
|
||||
{{ color['completion.item.selected.border.bottom'] }};
|
||||
{{ color['completion.item.selected.bg'] }}
|
||||
background-color: {{ color['completion.item.selected.bg'] }};
|
||||
}
|
||||
|
||||
QTreeView:item::hover {
|
||||
|
@ -112,56 +112,56 @@ class StatusBar(QWidget):
|
||||
QWidget#StatusBar QLineEdit {
|
||||
{{ font['statusbar'] }}
|
||||
{{ color['statusbar.bg'] }}
|
||||
{{ color['statusbar.fg'] }}
|
||||
color: {{ color['statusbar.fg'] }};
|
||||
}
|
||||
|
||||
QWidget#StatusBar[caret_mode="on"],
|
||||
QWidget#StatusBar[caret_mode="on"] QLabel,
|
||||
QWidget#StatusBar[caret_mode="on"] QLineEdit {
|
||||
{{ color['statusbar.fg.caret'] }}
|
||||
{{ color['statusbar.bg.caret'] }}
|
||||
color: {{ color['statusbar.fg.caret'] }};
|
||||
background-color: {{ color['statusbar.bg.caret'] }};
|
||||
}
|
||||
|
||||
QWidget#StatusBar[caret_mode="selection"],
|
||||
QWidget#StatusBar[caret_mode="selection"] QLabel,
|
||||
QWidget#StatusBar[caret_mode="selection"] QLineEdit {
|
||||
{{ color['statusbar.fg.caret-selection'] }}
|
||||
{{ color['statusbar.bg.caret-selection'] }}
|
||||
color: {{ color['statusbar.fg.caret-selection'] }};
|
||||
background-color: {{ color['statusbar.bg.caret-selection'] }};
|
||||
}
|
||||
|
||||
QWidget#StatusBar[severity="error"],
|
||||
QWidget#StatusBar[severity="error"] QLabel,
|
||||
QWidget#StatusBar[severity="error"] QLineEdit {
|
||||
{{ color['statusbar.fg.error'] }}
|
||||
{{ color['statusbar.bg.error'] }}
|
||||
color: {{ color['statusbar.fg.error'] }};
|
||||
background-color: {{ color['statusbar.bg.error'] }};
|
||||
}
|
||||
|
||||
QWidget#StatusBar[severity="warning"],
|
||||
QWidget#StatusBar[severity="warning"] QLabel,
|
||||
QWidget#StatusBar[severity="warning"] QLineEdit {
|
||||
{{ color['statusbar.fg.warning'] }}
|
||||
{{ color['statusbar.bg.warning'] }}
|
||||
color: {{ color['statusbar.fg.warning'] }};
|
||||
background-color: {{ color['statusbar.bg.warning'] }};
|
||||
}
|
||||
|
||||
QWidget#StatusBar[prompt_active="true"],
|
||||
QWidget#StatusBar[prompt_active="true"] QLabel,
|
||||
QWidget#StatusBar[prompt_active="true"] QLineEdit {
|
||||
{{ color['statusbar.fg.prompt'] }}
|
||||
{{ color['statusbar.bg.prompt'] }}
|
||||
color: {{ color['statusbar.fg.prompt'] }};
|
||||
background-color: {{ color['statusbar.bg.prompt'] }};
|
||||
}
|
||||
|
||||
QWidget#StatusBar[insert_active="true"],
|
||||
QWidget#StatusBar[insert_active="true"] QLabel,
|
||||
QWidget#StatusBar[insert_active="true"] QLineEdit {
|
||||
{{ color['statusbar.fg.insert'] }}
|
||||
{{ color['statusbar.bg.insert'] }}
|
||||
color: {{ color['statusbar.fg.insert'] }};
|
||||
background-color: {{ color['statusbar.bg.insert'] }};
|
||||
}
|
||||
|
||||
QWidget#StatusBar[command_active="true"],
|
||||
QWidget#StatusBar[command_active="true"] QLabel,
|
||||
QWidget#StatusBar[command_active="true"] QLineEdit {
|
||||
{{ color['statusbar.fg.command'] }}
|
||||
{{ color['statusbar.bg.command'] }}
|
||||
color: {{ color['statusbar.fg.command'] }};
|
||||
background-color: {{ color['statusbar.bg.command'] }};
|
||||
}
|
||||
|
||||
"""
|
||||
|
@ -39,7 +39,7 @@ class Progress(QProgressBar):
|
||||
}
|
||||
|
||||
QProgressBar::chunk {
|
||||
{{ color['statusbar.progress.bg'] }}
|
||||
background-color: {{ color['statusbar.progress.bg'] }};
|
||||
}
|
||||
"""
|
||||
|
||||
|
@ -54,27 +54,27 @@ class UrlText(textbase.TextBase):
|
||||
|
||||
STYLESHEET = """
|
||||
QLabel#UrlText[urltype="normal"] {
|
||||
{{ color['statusbar.url.fg'] }}
|
||||
color: {{ color['statusbar.url.fg'] }};
|
||||
}
|
||||
|
||||
QLabel#UrlText[urltype="success"] {
|
||||
{{ color['statusbar.url.fg.success'] }}
|
||||
color: {{ color['statusbar.url.fg.success'] }};
|
||||
}
|
||||
|
||||
QLabel#UrlText[urltype="success_https"] {
|
||||
{{ color['statusbar.url.fg.success.https'] }}
|
||||
color: {{ color['statusbar.url.fg.success.https'] }};
|
||||
}
|
||||
|
||||
QLabel#UrlText[urltype="error"] {
|
||||
{{ color['statusbar.url.fg.error'] }}
|
||||
color: {{ color['statusbar.url.fg.error'] }};
|
||||
}
|
||||
|
||||
QLabel#UrlText[urltype="warn"] {
|
||||
{{ color['statusbar.url.fg.warn'] }}
|
||||
color: {{ color['statusbar.url.fg.warn'] }};
|
||||
}
|
||||
|
||||
QLabel#UrlText[urltype="hover"] {
|
||||
{{ color['statusbar.url.fg.hover'] }}
|
||||
color: {{ color['statusbar.url.fg.hover'] }};
|
||||
}
|
||||
"""
|
||||
|
||||
|
@ -35,7 +35,7 @@ def test_get_stylesheet(config_stub):
|
||||
}
|
||||
template = "{{ color['completion.bg'] }}\n{{ font['completion'] }}"
|
||||
rendered = style.get_stylesheet(template)
|
||||
assert rendered == 'background-color: black;\nfont: foo;'
|
||||
assert rendered == 'black\nfont: foo;'
|
||||
|
||||
|
||||
class Obj(QObject):
|
||||
|
Loading…
Reference in New Issue
Block a user