Skip to content

Commit

Permalink
Update dark mode styles and QPushButton background colors
Browse files Browse the repository at this point in the history
  • Loading branch information
LyubomirT committed Jul 27, 2024
1 parent da57f2c commit 48eb81a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
12 changes: 10 additions & 2 deletions darkmode.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ QCheckBox {
QPushButton {
font-size: 9pt;
padding: 10px;
background-color: #444444;
background-color: #666666;
color: #ffffff;
border: none;
border-radius: 5px;
font: bold;
}

QPushButton:hover {
background-color: #666666;
background-color: #444444;
}

QPushButton:disabled {
Expand All @@ -62,4 +62,12 @@ QProgressBar {
QProgressBar::chunk {
background-color: #ffdc5f;
width: 10px;
}

QComboBox {
font-size: 10pt;
background-color: #222222;
border: 1px solid #555555;
padding: 5px;
color: #ffffff;
}
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def change_language(self, language):

if __name__ == "__main__":
app = QApplication(sys.argv)
app.setStyleSheet(open("style.css").read())
app.setStyleSheet(open("darkmode.css").read())
window = MainWindow()
window.show()
sys.exit(app.exec_())
8 changes: 8 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,11 @@ QProgressBar::chunk {
background-color: #ffdc5f;
width: 10px;
}

QComboBox {
font-size: 10pt;
background-color: #ffffff;
border: 1px solid #cccccc;
padding: 5px;
color: #000000;
}
8 changes: 4 additions & 4 deletions ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(600, 400)
MainWindow.setMinimumSize(QtCore.QSize(600, 400))
MainWindow.setMaximumSize(QtCore.QSize(600, 400))
MainWindow.resize(600, 450)
MainWindow.setMinimumSize(QtCore.QSize(600, 450))
MainWindow.setMaximumSize(QtCore.QSize(600, 450))
MainWindow.setWindowIcon(QtGui.QIcon("logo.png"))
if sys.platform == "win32" and hasattr(ctypes.windll, "shell32"):
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("Chainsaw Human Typing")
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")

self.horizontalLayoutWidget = QtWidgets.QWidget(self.centralwidget)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 20, 560, 340))
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 20, 561, 411))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")

self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
Expand Down

0 comments on commit 48eb81a

Please sign in to comment.