initial replace pass.

This commit is contained in:
Nathan Isom 2015-10-16 10:52:02 -05:00
parent 743c3b1e26
commit 2a11adc8ac
7 changed files with 28 additions and 28 deletions

View File

@ -64,7 +64,7 @@ class DownloadView(QListView):
STYLESHEET = """ STYLESHEET = """
QListView { QListView {
{{ color['downloads.bg.bar'] }} background-color: {{ color['downloads.bg.bar'] }};
{{ font['downloads'] }} {{ font['downloads'] }}
} }

View File

@ -188,7 +188,7 @@ class CompletionItemDelegate(QStyledItemDelegate):
self._doc.setDefaultTextOption(text_option) self._doc.setDefaultTextOption(text_option)
self._doc.setDefaultStyleSheet(style.get_stylesheet(""" self._doc.setDefaultStyleSheet(style.get_stylesheet("""
.highlight { .highlight {
{{ color['completion.match.fg'] }} color: {{ color['completion.match.fg'] }};
} }
""")) """))
self._doc.setDocumentMargin(2) self._doc.setDocumentMargin(2)

View File

@ -56,14 +56,14 @@ class CompletionView(QTreeView):
STYLESHEET = """ STYLESHEET = """
QTreeView { QTreeView {
{{ font['completion'] }} {{ font['completion'] }}
{{ color['completion.bg'] }} background-color: {{ color['completion.bg'] }};
alternate-background-color: {{ color['completion.alternate-bg'] }}; alternate-background-color: {{ color['completion.alternate-bg'] }};
outline: 0; outline: 0;
border: 0px; border: 0px;
} }
QTreeView::item:disabled { QTreeView::item:disabled {
{{ color['completion.category.bg'] }} background-color: {{ color['completion.category.bg'] }};
border-top: 1px solid border-top: 1px solid
{{ color['completion.category.border.top'] }}; {{ color['completion.category.border.top'] }};
border-bottom: 1px solid border-bottom: 1px solid
@ -75,7 +75,7 @@ class CompletionView(QTreeView):
{{ color['completion.item.selected.border.top'] }}; {{ color['completion.item.selected.border.top'] }};
border-bottom: 1px solid border-bottom: 1px solid
{{ color['completion.item.selected.border.bottom'] }}; {{ color['completion.item.selected.border.bottom'] }};
{{ color['completion.item.selected.bg'] }} background-color: {{ color['completion.item.selected.bg'] }};
} }
QTreeView:item::hover { QTreeView:item::hover {

View File

@ -112,56 +112,56 @@ class StatusBar(QWidget):
QWidget#StatusBar QLineEdit { QWidget#StatusBar QLineEdit {
{{ font['statusbar'] }} {{ font['statusbar'] }}
{{ color['statusbar.bg'] }} {{ color['statusbar.bg'] }}
{{ color['statusbar.fg'] }} color: {{ color['statusbar.fg'] }};
} }
QWidget#StatusBar[caret_mode="on"], QWidget#StatusBar[caret_mode="on"],
QWidget#StatusBar[caret_mode="on"] QLabel, QWidget#StatusBar[caret_mode="on"] QLabel,
QWidget#StatusBar[caret_mode="on"] QLineEdit { QWidget#StatusBar[caret_mode="on"] QLineEdit {
{{ color['statusbar.fg.caret'] }} color: {{ color['statusbar.fg.caret'] }};
{{ color['statusbar.bg.caret'] }} background-color: {{ color['statusbar.bg.caret'] }};
} }
QWidget#StatusBar[caret_mode="selection"], QWidget#StatusBar[caret_mode="selection"],
QWidget#StatusBar[caret_mode="selection"] QLabel, QWidget#StatusBar[caret_mode="selection"] QLabel,
QWidget#StatusBar[caret_mode="selection"] QLineEdit { QWidget#StatusBar[caret_mode="selection"] QLineEdit {
{{ color['statusbar.fg.caret-selection'] }} color: {{ color['statusbar.fg.caret-selection'] }};
{{ color['statusbar.bg.caret-selection'] }} background-color: {{ color['statusbar.bg.caret-selection'] }};
} }
QWidget#StatusBar[severity="error"], QWidget#StatusBar[severity="error"],
QWidget#StatusBar[severity="error"] QLabel, QWidget#StatusBar[severity="error"] QLabel,
QWidget#StatusBar[severity="error"] QLineEdit { QWidget#StatusBar[severity="error"] QLineEdit {
{{ color['statusbar.fg.error'] }} color: {{ color['statusbar.fg.error'] }};
{{ color['statusbar.bg.error'] }} background-color: {{ color['statusbar.bg.error'] }};
} }
QWidget#StatusBar[severity="warning"], QWidget#StatusBar[severity="warning"],
QWidget#StatusBar[severity="warning"] QLabel, QWidget#StatusBar[severity="warning"] QLabel,
QWidget#StatusBar[severity="warning"] QLineEdit { QWidget#StatusBar[severity="warning"] QLineEdit {
{{ color['statusbar.fg.warning'] }} color: {{ color['statusbar.fg.warning'] }};
{{ color['statusbar.bg.warning'] }} background-color: {{ color['statusbar.bg.warning'] }};
} }
QWidget#StatusBar[prompt_active="true"], QWidget#StatusBar[prompt_active="true"],
QWidget#StatusBar[prompt_active="true"] QLabel, QWidget#StatusBar[prompt_active="true"] QLabel,
QWidget#StatusBar[prompt_active="true"] QLineEdit { QWidget#StatusBar[prompt_active="true"] QLineEdit {
{{ color['statusbar.fg.prompt'] }} color: {{ color['statusbar.fg.prompt'] }};
{{ color['statusbar.bg.prompt'] }} background-color: {{ color['statusbar.bg.prompt'] }};
} }
QWidget#StatusBar[insert_active="true"], QWidget#StatusBar[insert_active="true"],
QWidget#StatusBar[insert_active="true"] QLabel, QWidget#StatusBar[insert_active="true"] QLabel,
QWidget#StatusBar[insert_active="true"] QLineEdit { QWidget#StatusBar[insert_active="true"] QLineEdit {
{{ color['statusbar.fg.insert'] }} color: {{ color['statusbar.fg.insert'] }};
{{ color['statusbar.bg.insert'] }} background-color: {{ color['statusbar.bg.insert'] }};
} }
QWidget#StatusBar[command_active="true"], QWidget#StatusBar[command_active="true"],
QWidget#StatusBar[command_active="true"] QLabel, QWidget#StatusBar[command_active="true"] QLabel,
QWidget#StatusBar[command_active="true"] QLineEdit { QWidget#StatusBar[command_active="true"] QLineEdit {
{{ color['statusbar.fg.command'] }} color: {{ color['statusbar.fg.command'] }};
{{ color['statusbar.bg.command'] }} background-color: {{ color['statusbar.bg.command'] }};
} }
""" """

View File

@ -39,7 +39,7 @@ class Progress(QProgressBar):
} }
QProgressBar::chunk { QProgressBar::chunk {
{{ color['statusbar.progress.bg'] }} background-color: {{ color['statusbar.progress.bg'] }};
} }
""" """

View File

@ -54,27 +54,27 @@ class UrlText(textbase.TextBase):
STYLESHEET = """ STYLESHEET = """
QLabel#UrlText[urltype="normal"] { QLabel#UrlText[urltype="normal"] {
{{ color['statusbar.url.fg'] }} color: {{ color['statusbar.url.fg'] }};
} }
QLabel#UrlText[urltype="success"] { QLabel#UrlText[urltype="success"] {
{{ color['statusbar.url.fg.success'] }} color: {{ color['statusbar.url.fg.success'] }};
} }
QLabel#UrlText[urltype="success_https"] { QLabel#UrlText[urltype="success_https"] {
{{ color['statusbar.url.fg.success.https'] }} color: {{ color['statusbar.url.fg.success.https'] }};
} }
QLabel#UrlText[urltype="error"] { QLabel#UrlText[urltype="error"] {
{{ color['statusbar.url.fg.error'] }} color: {{ color['statusbar.url.fg.error'] }};
} }
QLabel#UrlText[urltype="warn"] { QLabel#UrlText[urltype="warn"] {
{{ color['statusbar.url.fg.warn'] }} color: {{ color['statusbar.url.fg.warn'] }};
} }
QLabel#UrlText[urltype="hover"] { QLabel#UrlText[urltype="hover"] {
{{ color['statusbar.url.fg.hover'] }} color: {{ color['statusbar.url.fg.hover'] }};
} }
""" """

View File

@ -35,7 +35,7 @@ def test_get_stylesheet(config_stub):
} }
template = "{{ color['completion.bg'] }}\n{{ font['completion'] }}" template = "{{ color['completion.bg'] }}\n{{ font['completion'] }}"
rendered = style.get_stylesheet(template) rendered = style.get_stylesheet(template)
assert rendered == 'background-color: black;\nfont: foo;' assert rendered == 'black\nfont: foo;'
class Obj(QObject): class Obj(QObject):