1
0
Fork 0
mirror of synced 2024-06-24 01:00:43 +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; }
* { color: #eeeeee; }
* { border-color: #483d8b; }
*::disabled,
*:disabled,
*::drop-down:disabled {
color: #43474d;
border-color: #43474d;
@ -235,8 +235,8 @@ QPushButton,
QToolButton {
background-color: #3c3f41;
}
QPushButton::hover,
QToolButton::hover,
QPushButton:hover,
QToolButton:hover,
QHeaderView::section:hover {
background-color: #222233;
}
@ -267,34 +267,34 @@ QPushButton#menu_button {
height: 18px;
}
QPushButton:hover#menu_button {
background-color: #334;
background-color: "#334";
}
QPushButton[install="1"],
QPushButton#install_button {
background-color: #090;
background-color: "#090";
}
QPushButton[install="1"]::hover,
QPushButton::hover#install_button {
background-color: #060;
QPushButton[install="1"]:hover,
QPushButton:hover#install_button {
background-color: "#060";
}
QPushButton[install="1"]::disabled,
QPushButton::disabled#install_button {
background-color: #020;
QPushButton[install="1"]:disabled,
QPushButton:disabled#install_button {
background-color: "#020";
}
QPushButton[uninstall="1"],
QPushButton#uninstall_button {
background-color: #900;
background-color: "#900";
}
QPushButton[uninstall="1"]::hover,
QPushButton::hover#uninstall_button {
background-color: #600;
QPushButton[uninstall="1"]:hover,
QPushButton:hover#uninstall_button {
background-color: "#600";
}
QPushButton[uninstall="1"]::disabled,
QPushButton::disabled#uninstall_button {
background-color: #200;
QPushButton[uninstall="1"]:disabled,
QPushButton:disabled#uninstall_button {
background-color: "#200";
}
QPushButton#success{
background-color: lime;
background-color: "lime";
}
QPushButton:hover#installed_menu_button {
background-color: green;
@ -410,7 +410,7 @@ QSizeGrip {
#search_bar {
padding: 3px;
border-radius: 5px;
background-color: #334;
background-color: "#334";
}
QTabWidget::pane {
@ -495,7 +495,7 @@ QTabBar::tab:selected:right {
background: qlineargradient(x1: 2, y1: 0, x2: 0, y2: 0,
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;
border-color: transparent;
background-color: transparent;

View file

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