forked from Boria138/PortProtonQt
feat: add styling to QCheckBox and overlay buttons
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
@ -972,7 +972,7 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
# 5. Fullscreen setting for application
|
# 5. Fullscreen setting for application
|
||||||
self.fullscreenCheckBox = QCheckBox(_("Launch Application in Fullscreen"))
|
self.fullscreenCheckBox = QCheckBox(_("Launch Application in Fullscreen"))
|
||||||
#self.fullscreenCheckBox.setStyleSheet(self.theme.SETTINGS_CHECKBOX_STYLE)
|
self.fullscreenCheckBox.setStyleSheet(self.theme.SETTINGS_CHECKBOX_STYLE)
|
||||||
self.fullscreenCheckBox.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
self.fullscreenCheckBox.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
||||||
self.fullscreenTitle = QLabel(_("Application Fullscreen Mode:"))
|
self.fullscreenTitle = QLabel(_("Application Fullscreen Mode:"))
|
||||||
self.fullscreenTitle.setStyleSheet(self.theme.PARAMS_TITLE_STYLE)
|
self.fullscreenTitle.setStyleSheet(self.theme.PARAMS_TITLE_STYLE)
|
||||||
@ -984,6 +984,7 @@ class MainWindow(QMainWindow):
|
|||||||
# 6. Automatic fullscreen on gamepad connection
|
# 6. Automatic fullscreen on gamepad connection
|
||||||
self.autoFullscreenGamepadCheckBox = QCheckBox(_("Auto Fullscreen on Gamepad connected"))
|
self.autoFullscreenGamepadCheckBox = QCheckBox(_("Auto Fullscreen on Gamepad connected"))
|
||||||
self.autoFullscreenGamepadCheckBox.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
self.autoFullscreenGamepadCheckBox.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
||||||
|
self.autoFullscreenGamepadCheckBox.setStyleSheet(self.theme.SETTINGS_CHECKBOX_STYLE)
|
||||||
self.autoFullscreenGamepadTitle = QLabel(_("Auto Fullscreen on Gamepad connected:"))
|
self.autoFullscreenGamepadTitle = QLabel(_("Auto Fullscreen on Gamepad connected:"))
|
||||||
self.autoFullscreenGamepadTitle.setStyleSheet(self.theme.PARAMS_TITLE_STYLE)
|
self.autoFullscreenGamepadTitle.setStyleSheet(self.theme.PARAMS_TITLE_STYLE)
|
||||||
self.autoFullscreenGamepadTitle.setFocusPolicy(Qt.FocusPolicy.NoFocus)
|
self.autoFullscreenGamepadTitle.setFocusPolicy(Qt.FocusPolicy.NoFocus)
|
||||||
|
@ -22,35 +22,35 @@ class SystemOverlay(QDialog):
|
|||||||
|
|
||||||
# Reboot button
|
# Reboot button
|
||||||
reboot_button = QPushButton(_("Reboot"))
|
reboot_button = QPushButton(_("Reboot"))
|
||||||
#reboot_button.setStyleSheet(self.theme.ACTION_BUTTON_STYLE)
|
reboot_button.setStyleSheet(self.theme.OVERLAY_BUTTON_STYLE)
|
||||||
reboot_button.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
reboot_button.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
||||||
reboot_button.clicked.connect(self.reboot)
|
reboot_button.clicked.connect(self.reboot)
|
||||||
layout.addWidget(reboot_button)
|
layout.addWidget(reboot_button)
|
||||||
|
|
||||||
# Shutdown button
|
# Shutdown button
|
||||||
shutdown_button = QPushButton(_("Shutdown"))
|
shutdown_button = QPushButton(_("Shutdown"))
|
||||||
#shutdown_button.setStyleSheet(self.theme.ACTION_BUTTON_STYLE)
|
shutdown_button.setStyleSheet(self.theme.OVERLAY_BUTTON_STYLE)
|
||||||
shutdown_button.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
shutdown_button.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
||||||
shutdown_button.clicked.connect(self.shutdown)
|
shutdown_button.clicked.connect(self.shutdown)
|
||||||
layout.addWidget(shutdown_button)
|
layout.addWidget(shutdown_button)
|
||||||
|
|
||||||
# Suspend button
|
# Suspend button
|
||||||
suspend_button = QPushButton(_("Suspend"))
|
suspend_button = QPushButton(_("Suspend"))
|
||||||
#suspend_button.setStyleSheet(self.theme.ACTION_BUTTON_STYLE)
|
suspend_button.setStyleSheet(self.theme.OVERLAY_BUTTON_STYLE)
|
||||||
suspend_button.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
suspend_button.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
||||||
suspend_button.clicked.connect(self.suspend)
|
suspend_button.clicked.connect(self.suspend)
|
||||||
layout.addWidget(suspend_button)
|
layout.addWidget(suspend_button)
|
||||||
|
|
||||||
# Exit application button
|
# Exit application button
|
||||||
exit_button = QPushButton(_("Exit Application"))
|
exit_button = QPushButton(_("Exit Application"))
|
||||||
#exit_button.setStyleSheet(self.theme.ACTION_BUTTON_STYLE)
|
exit_button.setStyleSheet(self.theme.OVERLAY_BUTTON_STYLE)
|
||||||
exit_button.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
exit_button.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
||||||
exit_button.clicked.connect(self.exit_application)
|
exit_button.clicked.connect(self.exit_application)
|
||||||
layout.addWidget(exit_button)
|
layout.addWidget(exit_button)
|
||||||
|
|
||||||
# Cancel button
|
# Cancel button
|
||||||
cancel_button = QPushButton(_("Cancel"))
|
cancel_button = QPushButton(_("Cancel"))
|
||||||
#cancel_button.setStyleSheet(self.theme.ACTION_BUTTON_STYLE)
|
cancel_button.setStyleSheet(self.theme.OVERLAY_BUTTON_STYLE)
|
||||||
cancel_button.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
cancel_button.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
||||||
cancel_button.clicked.connect(self.reject)
|
cancel_button.clicked.connect(self.reject)
|
||||||
layout.addWidget(cancel_button)
|
layout.addWidget(cancel_button)
|
||||||
|
@ -90,6 +90,13 @@ SEARCH_EDIT_STYLE = """
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
SETTINGS_CHECKBOX_STYLE = """
|
||||||
|
QCheckBox:focus {
|
||||||
|
border: 2px solid #409EFF;
|
||||||
|
background: #404554;
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
# ОТКЛЮЧАЕМ РАМКУ У QScrollArea
|
# ОТКЛЮЧАЕМ РАМКУ У QScrollArea
|
||||||
SCROLL_AREA_STYLE = """
|
SCROLL_AREA_STYLE = """
|
||||||
QWidget {
|
QWidget {
|
||||||
@ -206,6 +213,28 @@ ACTION_BUTTON_STYLE = """
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# СТИЛЬ КНОПОК ОВЕРЛЕЯ
|
||||||
|
OVERLAY_BUTTON_STYLE = """
|
||||||
|
QPushButton {
|
||||||
|
background: #3f424d;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.20);
|
||||||
|
border-radius: 10px;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 16px;
|
||||||
|
font-family: 'Play';
|
||||||
|
}
|
||||||
|
QPushButton:hover {
|
||||||
|
background: #282a33;
|
||||||
|
}
|
||||||
|
QPushButton:pressed {
|
||||||
|
background: #282a33;
|
||||||
|
}
|
||||||
|
QPushButton:focus {
|
||||||
|
border: 2px solid #409EFF;
|
||||||
|
background-color: #404554;
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
# ТЕКСТОВЫЕ СТИЛИ: ЗАГОЛОВКИ И ОСНОВНОЙ КОНТЕНТ
|
# ТЕКСТОВЫЕ СТИЛИ: ЗАГОЛОВКИ И ОСНОВНОЙ КОНТЕНТ
|
||||||
TAB_TITLE_STYLE = "font-family: 'Play'; font-size: 24px; color: #ffffff; background-color: none;"
|
TAB_TITLE_STYLE = "font-family: 'Play'; font-size: 24px; color: #ffffff; background-color: none;"
|
||||||
CONTENT_STYLE = """
|
CONTENT_STYLE = """
|
||||||
|
Reference in New Issue
Block a user