Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
239 changes: 239 additions & 0 deletions files/style.qss
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
/*
PyMASL QSS Style
Windows 10/11 Flat Design
*/

/* General styling for all widgets */
QWidget {
font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
color: #333333;
background-color: #f3f3f3;
}

/* Base style for main windows and dialogs */
QMainWindow, QDialog {
background-color: #f3f3f3;
}

/* Labels */
QLabel {
background: transparent;
color: #333333;
}

/* Push Buttons */
QPushButton {
background-color: #e1e1e1;
border: 1px solid #adadad;
border-radius: 4px;
padding: 6px 16px;
color: #000000;
}

QPushButton:hover {
background-color: #e5f1fb;
border: 1px solid #0078d7;
}

QPushButton:pressed {
background-color: #cce4f7;
border: 1px solid #005499;
}

QPushButton:disabled {
background-color: #cccccc;
color: #888888;
border: 1px solid #bfbfbf;
}

/* Accent primary buttons (can be applied to Ok/Submit buttons if needed by property) */
QPushButton#btn_ok, QPushButton#btn_save, QPushButton#login_button {
background-color: #0078d7;
border: 1px solid #0078d7;
color: #ffffff;
}

QPushButton#btn_ok:hover, QPushButton#btn_save:hover, QPushButton#login_button:hover {
background-color: #005a9e;
border: 1px solid #005a9e;
}

QPushButton#btn_ok:pressed, QPushButton#btn_save:pressed, QPushButton#login_button:pressed {
background-color: #004578;
border: 1px solid #004578;
}

/* Line Edits */
QLineEdit {
background-color: #ffffff;
border: 1px solid #cccccc;
border-radius: 4px;
padding: 4px;
selection-background-color: #0078d7;
selection-color: #ffffff;
}

QLineEdit:hover {
border: 1px solid #999999;
}

QLineEdit:focus {
border: 1px solid #0078d7;
}

QLineEdit:disabled {
background-color: #f3f3f3;
color: #888888;
}

/* Combo Boxes */
QComboBox {
background-color: #ffffff;
border: 1px solid #cccccc;
border-radius: 4px;
padding: 4px;
min-height: 20px;
}

QComboBox:hover {
border: 1px solid #999999;
}

QComboBox:focus {
border: 1px solid #0078d7;
}

QComboBox::drop-down {
subcontrol-origin: padding;
subcontrol-position: top right;
width: 20px;
border-left: 1px solid #cccccc;
}

/* Tab Widgets */
QTabWidget::pane {
border: 1px solid #cccccc;
background-color: #ffffff;
border-radius: 0px;
}

QTabBar::tab {
background-color: #e1e1e1;
border: 1px solid #cccccc;
border-bottom: none;
padding: 6px 12px;
margin-right: 2px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}

QTabBar::tab:selected {
background-color: #ffffff;
border-bottom: 2px solid #0078d7;
}

QTabBar::tab:hover:!selected {
background-color: #e5f1fb;
}

/* Table Widgets */
QTableWidget, QTableView {
background-color: #ffffff;
border: 1px solid #cccccc;
gridline-color: #e1e1e1;
selection-background-color: #0078d7;
selection-color: #ffffff;
alternate-background-color: #f9f9f9;
}

QHeaderView::section {
background-color: #f3f3f3;
border: 1px solid #cccccc;
border-top: none;
border-left: none;
padding: 4px;
font-weight: bold;
}

QHeaderView::section:checked {
background-color: #e5f1fb;
}

/* Group Boxes */
QGroupBox {
border: 1px solid #cccccc;
border-radius: 4px;
margin-top: 10px;
padding-top: 10px;
}

QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: top left;
padding: 0 3px;
color: #0078d7;
}

/* Date/Time Edits */
QDateEdit, QTimeEdit, QDateTimeEdit {
background-color: #ffffff;
border: 1px solid #cccccc;
border-radius: 4px;
padding: 4px;
}

QDateEdit:hover, QTimeEdit:hover, QDateTimeEdit:hover {
border: 1px solid #999999;
}

QDateEdit:focus, QTimeEdit:focus, QDateTimeEdit:focus {
border: 1px solid #0078d7;
}

/* Scrollbars */
QScrollBar:vertical {
border: none;
background-color: #f3f3f3;
width: 12px;
margin: 0px 0px 0px 0px;
}

QScrollBar::handle:vertical {
background-color: #cccccc;
min-height: 20px;
border-radius: 6px;
}

QScrollBar::handle:vertical:hover {
background-color: #999999;
}

QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
border: none;
background: none;
height: 0px;
}

QScrollBar:horizontal {
border: none;
background-color: #f3f3f3;
height: 12px;
margin: 0px 0px 0px 0px;
}

QScrollBar::handle:horizontal {
background-color: #cccccc;
min-width: 20px;
border-radius: 6px;
}

QScrollBar::handle:horizontal:hover {
background-color: #999999;
}

QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {
border: none;
background: none;
width: 0px;
}
9 changes: 9 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3556,6 +3556,15 @@ class Payment:
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
app.setStyle("Fusion")

# Load and apply QSS styles
qss_path = Path(__file__).parent / "files" / "style.qss"
if qss_path.exists():
with open(qss_path, "r", encoding="utf-8") as style_file:
app.setStyleSheet(style_file.read())
else:
logger.warning(f"QSS style file not found: {qss_path}")

auth = AuthForm()
auth.show()
auth.ui.label_9.setText(system.database)
Expand Down
Loading