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 48eb81a commit 2962049
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
1 change: 0 additions & 1 deletion darkmode.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ QSpinBox, QDoubleSpinBox {
QCheckBox {
font-size: 10pt;
margin: 10px 0;
padding: 10px;
color: #ffffff;
}

Expand Down
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("darkmode.css").read())
app.setStyleSheet(open("style.css").read())
window = MainWindow()
window.show()
sys.exit(app.exec_())
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ QSpinBox, QDoubleSpinBox {
QCheckBox {
font-size: 10pt;
margin: 10px 0;
padding: 10px;
color: #000000;

}

QPushButton {
Expand Down
15 changes: 10 additions & 5 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, 450)
MainWindow.setMinimumSize(QtCore.QSize(600, 450))
MainWindow.setMaximumSize(QtCore.QSize(600, 450))
MainWindow.resize(600, 500)
MainWindow.setMinimumSize(QtCore.QSize(600, 500))
MainWindow.setMaximumSize(QtCore.QSize(600, 500))
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, 561, 411))
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 20, 561, 421))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")

self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
Expand Down Expand Up @@ -80,6 +80,10 @@ def setupUi(self, MainWindow):
self.languageComboBox = QtWidgets.QComboBox(self.horizontalLayoutWidget)
self.languageComboBox.setObjectName("languageComboBox")
self.settingsLayout.addWidget(self.languageComboBox)

self.lightModeCheckBox = QtWidgets.QCheckBox(self.horizontalLayoutWidget)
self.lightModeCheckBox.setObjectName("lightModeCheckBox")
self.settingsLayout.addWidget(self.lightModeCheckBox)

self.horizontalLayout.addLayout(self.settingsLayout)

Expand All @@ -89,7 +93,7 @@ def setupUi(self, MainWindow):
QtCore.QMetaObject.connectSlotsByName(MainWindow)

def retranslateUi(self, MainWindow):
self.current_language = "en" # Default language
self.current_language = "English" # Default language
self.translations = {}
self.load_translations()

Expand Down Expand Up @@ -122,4 +126,5 @@ def update_ui_text(self):
self.charPerStrokeLabel.setText(_translate("MainWindow", "Characters per stroke"))
self.enterCheckBox.setText(_translate("MainWindow", "Type Enter"))
self.startButton.setText(_translate("MainWindow", "Start"))
self.lightModeCheckBox.setText(_translate("MainWindow", "Light Mode"))
self.stopButton.setText(_translate("MainWindow", "Stop"))

0 comments on commit 2962049

Please sign in to comment.