replaced btn-type with object name SettingsToolBtn

This commit is contained in:
iLLiCiTiT 2021-11-12 10:47:58 +01:00
parent 7be0dec7e2
commit d8caf89097
3 changed files with 15 additions and 12 deletions

View file

@ -81,7 +81,7 @@ class PaintHelper:
def create_add_btn(parent):
add_btn = QtWidgets.QPushButton("+", parent)
add_btn.setFocusPolicy(QtCore.Qt.ClickFocus)
add_btn.setProperty("btn-type", "tool-item")
add_btn.setObjectName("SettingsToolBtn")
add_btn.setFixedSize(BTN_FIXED_SIZE, BTN_FIXED_SIZE)
return add_btn
@ -89,7 +89,7 @@ def create_add_btn(parent):
def create_remove_btn(parent):
remove_btn = QtWidgets.QPushButton("-", parent)
remove_btn.setFocusPolicy(QtCore.Qt.ClickFocus)
remove_btn.setProperty("btn-type", "tool-item")
remove_btn.setObjectName("SettingsToolBtn")
remove_btn.setFixedSize(BTN_FIXED_SIZE, BTN_FIXED_SIZE)
return remove_btn
@ -102,7 +102,7 @@ def create_confirm_btn(parent):
)
confirm_btn.setIcon(icon)
confirm_btn.setFocusPolicy(QtCore.Qt.ClickFocus)
confirm_btn.setProperty("btn-type", "tool-item")
confirm_btn.setObjectName("SettingsToolBtn")
confirm_btn.setFixedSize(BTN_FIXED_SIZE, BTN_FIXED_SIZE)
return confirm_btn

View file

@ -25,8 +25,8 @@ class EmptyListItem(QtWidgets.QWidget):
add_btn.setFixedSize(BTN_FIXED_SIZE, BTN_FIXED_SIZE)
remove_btn.setFixedSize(BTN_FIXED_SIZE, BTN_FIXED_SIZE)
add_btn.setProperty("btn-type", "tool-item")
remove_btn.setProperty("btn-type", "tool-item")
add_btn.setObjectName("SettingsToolBtn")
remove_btn.setObjectName("SettingsToolBtn")
layout = QtWidgets.QHBoxLayout(self)
layout.setContentsMargins(0, 0, 0, 0)
@ -74,10 +74,10 @@ class ListItem(QtWidgets.QWidget):
up_btn.setFixedSize(BTN_FIXED_SIZE, BTN_FIXED_SIZE)
down_btn.setFixedSize(BTN_FIXED_SIZE, BTN_FIXED_SIZE)
add_btn.setProperty("btn-type", "tool-item")
remove_btn.setProperty("btn-type", "tool-item")
up_btn.setProperty("btn-type", "tool-item")
down_btn.setProperty("btn-type", "tool-item")
add_btn.setObjectName("SettingsToolBtn")
remove_btn.setObjectName("SettingsToolBtn")
up_btn.setObjectName("SettingsToolBtn")
down_btn.setObjectName("SettingsToolBtn")
add_btn.clicked.connect(self._on_add_clicked)
remove_btn.clicked.connect(self._on_remove_clicked)

View file

@ -94,16 +94,19 @@ QPushButton:hover {
border: 1px solid #fff;
color: #fff;
}
QPushButton[btn-type="tool-item"] {
#SettingsToolBtn {
background: transparent;
border: 1px solid #bfccd6;
border-radius: 10px;
}
QPushButton[btn-type="tool-item"]:hover {
#SettingsToolBtn:hover {
border-color: #189aea;
color: #46b1f3;
background-color: transparent;
}
#SettingsToolBtn:disabled {
background-color: #464b54;
}
QPushButton[btn-type="tool-item-icon"] {
border: 0px solid #bfccd6;