1
0
Fork 0
mirror of synced 2024-06-28 11:11:15 +12:00

Emit textChanged signal at the end of __edit in IndicatorLineEdit.

Fix indicator being always green at startup.
Cleanup the syntax of the RareStyle stylesheet.
This commit is contained in:
Stelios Tsampas 2021-10-15 00:57:23 +03:00 committed by Dummerle
parent 7156490952
commit 6c916803c8
No known key found for this signature in database
GPG key ID: AB68CC59CA39F2F1
2 changed files with 24 additions and 24 deletions

View file

@ -4,7 +4,7 @@
* { background-color: #202225; } * { background-color: #202225; }
* { color: #eeeeee; } * { color: #eeeeee; }
* { border-color: #483d8b; } * { border-color: #483d8b; }
*::disabled, *:disabled,
*::drop-down:disabled { *::drop-down:disabled {
color: #43474d; color: #43474d;
border-color: #43474d; border-color: #43474d;
@ -235,8 +235,8 @@ QPushButton,
QToolButton { QToolButton {
background-color: #3c3f41; background-color: #3c3f41;
} }
QPushButton::hover, QPushButton:hover,
QToolButton::hover, QToolButton:hover,
QHeaderView::section:hover { QHeaderView::section:hover {
background-color: #222233; background-color: #222233;
} }
@ -267,34 +267,34 @@ QPushButton#menu_button {
height: 18px; height: 18px;
} }
QPushButton:hover#menu_button { QPushButton:hover#menu_button {
background-color: #334; background-color: "#334";
} }
QPushButton[install="1"], QPushButton[install="1"],
QPushButton#install_button { QPushButton#install_button {
background-color: #090; background-color: "#090";
} }
QPushButton[install="1"]::hover, QPushButton[install="1"]:hover,
QPushButton::hover#install_button { QPushButton:hover#install_button {
background-color: #060; background-color: "#060";
} }
QPushButton[install="1"]::disabled, QPushButton[install="1"]:disabled,
QPushButton::disabled#install_button { QPushButton:disabled#install_button {
background-color: #020; background-color: "#020";
} }
QPushButton[uninstall="1"], QPushButton[uninstall="1"],
QPushButton#uninstall_button { QPushButton#uninstall_button {
background-color: #900; background-color: "#900";
} }
QPushButton[uninstall="1"]::hover, QPushButton[uninstall="1"]:hover,
QPushButton::hover#uninstall_button { QPushButton:hover#uninstall_button {
background-color: #600; background-color: "#600";
} }
QPushButton[uninstall="1"]::disabled, QPushButton[uninstall="1"]:disabled,
QPushButton::disabled#uninstall_button { QPushButton:disabled#uninstall_button {
background-color: #200; background-color: "#200";
} }
QPushButton#success{ QPushButton#success{
background-color: lime; background-color: "lime";
} }
QPushButton:hover#installed_menu_button { QPushButton:hover#installed_menu_button {
background-color: green; background-color: green;
@ -410,7 +410,7 @@ QSizeGrip {
#search_bar { #search_bar {
padding: 3px; padding: 3px;
border-radius: 5px; border-radius: 5px;
background-color: #334; background-color: "#334";
} }
QTabWidget::pane { QTabWidget::pane {
@ -495,7 +495,7 @@ QTabBar::tab:selected:right {
background: qlineargradient(x1: 2, y1: 0, x2: 0, y2: 0, background: qlineargradient(x1: 2, y1: 0, x2: 0, y2: 0,
stop: 0 #483d8b, stop: 1 #202225); /* stop: 0 #2f4f4f stop: 0.2 #203636 */ stop: 0 #483d8b, stop: 1 #202225); /* stop: 0 #2f4f4f stop: 0.2 #203636 */
} }
QTabBar::tab:disabled#side_tab_bar { QTabBar::tab:disabled#SideTabBar {
color: transparent; color: transparent;
border-color: transparent; border-color: transparent;
background-color: transparent; background-color: transparent;

View file

@ -148,7 +148,7 @@ class IndicatorLineEdit(QWidget):
self.indicator_label = QLabel() self.indicator_label = QLabel()
self.indicator_label.setPixmap(icon("ei.info-circle", color="gray").pixmap(16, 16)) self.indicator_label.setPixmap(icon("ei.info-circle", color="gray").pixmap(16, 16))
self.indicator_label.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) self.indicator_label.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
self.__indicator(edit_func(text)) self.__indicator(edit_func(text)[0])
self.layout.addWidget(self.indicator_label) self.layout.addWidget(self.indicator_label)
if not ph_text: if not ph_text:
@ -181,9 +181,9 @@ class IndicatorLineEdit(QWidget):
self.line_edit.setText(text) self.line_edit.setText(text)
self.line_edit.blockSignals(False) self.line_edit.blockSignals(False)
self.__indicator(self.is_valid) self.__indicator(self.is_valid)
self.textChanged.emit(text)
if self.is_valid: if self.is_valid:
self.__save(text) self.__save(text)
self.textChanged.emit(text)
def __save(self, text): def __save(self, text):
if self.save_func is not None: if self.save_func is not None:
@ -237,7 +237,7 @@ class PathEdit(IndicatorLineEdit):
class SideTabBar(QTabBar): class SideTabBar(QTabBar):
def __init__(self, parent=None): def __init__(self, parent=None):
super(SideTabBar, self).__init__(parent=parent) super(SideTabBar, self).__init__(parent=parent)
self.setObjectName("side_tab_bar") self.setObjectName("SideTabBar")
self.fm = QFontMetrics(self.font()) self.fm = QFontMetrics(self.font())
def tabSizeHint(self, index): def tabSizeHint(self, index):