Add customize qss support for theme.

Fix an issue that causes all feature flags will not be added to the launch command regardless of it is enabled.

Add some default themes.
This commit is contained in:
wei committed 2026-10-18 23:58:43 +08:00
1 parent 1754b01230
commit b7af7e3469
53 files changed
+1319 -130

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
[palette]
window = "#eeeeee"
window_text = "#20252d"
base = "#ffffff"
alternate_base = "#edf4ff"
text = "#20252d"
button = "#e8eff9"
button_text = "#17263d"
mid = "#a0a9b7"
midlight = "#f8fbff"
dark = "#71839f"
highlight = "#3875d7"
highlighted_text = "#ffffff"
placeholder_text = "#626d7e"
@@ -0,0 +1,7 @@
QDialog { background: #f1f3f7; }
QLabel#dialogTitle { color: #203653; font-size: 18px; font-weight: bold; }
QLabel#helpText { color: #20252d; font-size: 13px; }
QLineEdit#codeEdit { min-height: 50px; padding: 0 12px; border: 1px solid #829ab9; border-radius: 8px; background: #ffffff; color: #203653; font-size: 25px; font-weight: bold; letter-spacing: 2px; }
QLabel#errorMessage { padding: 9px 11px; border: 1px solid #dfb8bd; border-radius: 6px; background: #fff0f2; color: #a52b38; font-size: 12px; }
QPushButton { min-height: 30px; padding: 3px 14px; border: 1px solid #8293ac; border-radius: 14px; color: #17263d; background: qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 #ffffff,stop:0.45 #edf2fa,stop:0.5 #ced9e9,stop:1 #f8fbff); }
QPushButton:pressed { background: #a2c9f4; }
+83
View File
@@ -0,0 +1,83 @@
QWidget {
font-family: "Lucida Grande", "Lucida Sans Unicode", "Segoe UI";
font-size: 13px;
}
QMainWindow, QDialog {
color: #20252d;
background: qlineargradient(spread:repeat, x1:0, y1:0, x2:0, y2:0.008,
stop:0 #fafafa, stop:0.49 #fafafa, stop:0.5 #e9e9e9, stop:1 #e9e9e9);
}
QPushButton, QToolButton {
color: #17263d;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #ffffff, stop:0.45 #edf2fa, stop:0.5 #ced9e9, stop:1 #f8fbff);
border: 1px solid #8293ac;
border-radius: 12px;
padding: 4px 14px;
min-height: 22px;
}
QPushButton:hover, QToolButton:hover { border-color: #4679ba; }
QPushButton:default, QPushButton:checked, QToolButton:checked {
color: #102d57;
border-color: #3266ac;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #e9f8ff, stop:0.45 #a7d0ff, stop:0.5 #649be5, stop:1 #c2e2ff);
}
QPushButton:pressed, QToolButton:pressed {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #79a5db, stop:0.5 #4f86ca, stop:1 #a2c9f4);
}
QPushButton:disabled, QToolButton:disabled { color: #8590a0; border-color: #b9c1cc; }
QLineEdit, QPlainTextEdit, QTextEdit, QSpinBox, QDoubleSpinBox,
QComboBox, QListView, QTreeView, QTableView {
background: #ffffff;
color: #20252d;
border: 1px solid #919cac;
border-top-color: #6e7c90;
border-radius: 4px;
padding: 4px;
selection-background-color: #3875d7;
selection-color: #ffffff;
}
QLineEdit:focus, QPlainTextEdit:focus, QTextEdit:focus,
QSpinBox:focus, QDoubleSpinBox:focus, QComboBox:focus { border-color: #4b8cde; }
QComboBox { padding-right: 26px; }
QComboBox::drop-down {
width: 20px;
border-left: 1px solid #7d9abd;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #e4f5ff, stop:0.48 #a1caff, stop:0.5 #699ee3, stop:1 #b9ddff);
}
QComboBox QAbstractItemView { background: #ffffff; color: #20252d; selection-background-color: #3875d7; selection-color: #ffffff; }
QGroupBox { border: 1px solid #aab2bf; border-radius: 7px; margin-top: 10px; padding-top: 10px; }
QGroupBox::title { subcontrol-origin: margin; left: 10px; padding: 0 4px; }
QProgressBar { border: 1px solid #8a9ab0; border-radius: 7px; background: #e0e5ed; color: #17263d; text-align: center; min-height: 14px; }
QProgressBar::chunk {
border-radius: 6px;
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 #e5f6ff, stop:0.4 #8ac4ff, stop:0.5 #4589db, stop:1 #9bd0ff);
}
QTabWidget::pane { border: 1px solid #9aa9bc; border-radius: 6px; }
QTabBar::tab { border: 1px solid #9aa9bc; padding: 5px 14px; background: #e4e9f0; }
QTabBar::tab:selected { background: #a8ceff; color: #16355f; }
QScrollBar { background: #e7eaf0; border: 1px solid #b3bdcc; }
QScrollBar:vertical { width: 16px; }
QScrollBar:horizontal { height: 16px; }
QScrollBar::handle { border: 1px solid #6e9bc9; border-radius: 6px; background: #a4cff7; }
QScrollBar::handle:vertical { min-height: 24px; background: qlineargradient(x1:0,y1:0,x2:1,y2:0,stop:0 #dff4ff,stop:0.5 #83b9ef,stop:1 #c7e7ff); }
QScrollBar::handle:horizontal { min-width: 24px; background: qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 #dff4ff,stop:0.5 #83b9ef,stop:1 #c7e7ff); }
QLabel#dev_info_box { font-size: 20pt; font-weight: bold; }
QLabel#dev_info_message { font-size: 10pt; }
QLabel#version_label { font-weight: bold; }
QMessageBox { background: #f1f3f7; }
QMessageBox QLabel { color: #203653; background: transparent; }
QMessageBox QPushButton { min-width: 72px; }
QMessageBox QPushButton:default {
border-color: #3266ac;
background: qlineargradient(x1:0,y1:0,x2:0,y2:1,
stop:0 #e9f8ff,stop:0.45 #a7d0ff,stop:0.5 #649be5,stop:1 #c2e2ff);
}
QMessageBox QPushButton:pressed { background: #79a5db; }
@@ -0,0 +1,20 @@
QLabel#manageTitle { color: #203653; font-size: 22px; font-weight: bold; padding: 4px; }
QScrollArea#manageProfileListScroll, QScrollArea#manageProfileOptionsScroll { background: #ffffff; border: 1px solid #9eafc5; border-radius: 8px; }
QPushButton#manageProfileItem {
/* Content height + two 1px borders = 64px; the layout supplies padding. */
min-height: 62px;
padding: 0;
background: #ffffff;
color: #203653;
border: 1px solid transparent;
border-radius: 5px;
text-align: left;
}
QPushButton#manageProfileItem:hover { background: #e2efff; }
QPushButton#manageProfileItem:checked { background: qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 #80b8f4,stop:1 #3875d7); color: #ffffff; }
QPushButton#manageProfileItem QLabel[itemChecked="true"] { color: #ffffff; background: transparent; }
QLabel#itemName { color: #203653; font-size: 15px; font-weight: bold; }
QLabel#itemVersion { color: #626d7e; font-size: 12px; }
QFrame#profileEditor { background: transparent; }
QPushButton#saveProfileButton { min-width: 130px; font-weight: bold; }
QPushButton#dangerButton { color: #a52b38; }
@@ -0,0 +1,8 @@
QMainWindow { background: #eeeeee; }
QLabel { color: #203653; }
QPlainTextEdit { background: #ffffff; color: #20252d; font-family: "Menlo", "Consolas", monospace; font-size: 10pt; border: 1px solid #91a1b8; border-radius: 4px; selection-background-color: #3875d7; selection-color: #ffffff; }
QPushButton { padding: 4px 14px; min-height: 22px; border: 1px solid #8293ac; border-radius: 12px; color: #17263d; background: qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 #ffffff,stop:0.45 #edf2fa,stop:0.5 #ced9e9,stop:1 #f8fbff); }
QPushButton:pressed { background: #a2c9f4; }
QPushButton:disabled { color: #8590a0; }
QScrollBar { background: #e7eaf0; border: 1px solid #b3bdcc; }
QScrollBar::handle { background: #a4cff7; border: 1px solid #6e9bc9; border-radius: 6px; }
+37
View File
@@ -0,0 +1,37 @@
QFrame#profileButton {
border: 1px solid #91a5c0;
border-radius: 12px;
background: qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 #ffffff,stop:0.48 #ebf3ff,stop:0.5 #d6e5fa,stop:1 #f7fbff);
}
QFrame#profileButton:hover { border-color: #4b8cde; }
QLabel#profileName, QLabel#itemName { color: #203653; font-size: 15px; font-weight: bold; }
QLabel#profileVersion, QLabel#itemVersion { color: #626d7e; font-size: 12px; }
QLabel#profileArrow { background: transparent; color: #34649c; font-size: 18px; }
QLabel#launchStatus { font-size: 12px; font-weight: bold; }
QFrame#profilePopup { border: 1px solid #91a5c0; border-radius: 8px; background: #f7faff; }
QWidget#profileListContent { background: #ffffff; }
QPushButton#profileItem {
/* Content height + two 1px borders = 62px; the layout supplies padding. */
min-height: 60px;
padding: 0;
background: #ffffff;
border: 1px solid transparent;
border-radius: 5px;
text-align: left;
}
QPushButton#profileItem:hover {
background: qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 #80b8f4,stop:1 #3875d7);
}
QPushButton#profileItem QLabel[itemHovered="true"] { color: #ffffff; background: transparent; }
QPushButton#launchButton {
min-width: 150px;
font-size: 15px;
font-weight: bold;
border-radius: 16px;
border-color: #3266ac;
background: qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 #effaff,stop:0.45 #a7d0ff,stop:0.5 #649be5,stop:1 #c2e2ff);
}
QPushButton#launchButton:pressed { background: #79a5db; }
QFrame#profileFrame { background: #dceaff; border: 1px solid #8fa8c9; border-radius: 12px; }
QFrame#header { background: rgba(245, 250, 255, 220); border: 1px solid #b6c9e3; border-radius: 8px; }
QLabel#headerLabel { color: #203653; background: transparent; font-size: 20px; font-weight: bold; }
+22
View File
@@ -0,0 +1,22 @@
QWidget#settingsPage, QWidget#settingsMainPage, QWidget#settingsScrollContent {
background: qlineargradient(spread:repeat,x1:0,y1:0,x2:0,y2:0.012,stop:0 #fafafa,stop:0.49 #fafafa,stop:0.5 #ebedf0,stop:1 #ebedf0);
}
QScrollArea#settingsScrollArea { border: none; background: transparent; }
QLabel#settingsPageTitle { color: #203653; font-size: 20px; font-weight: bold; }
QLabel#settingsSubPageTitle { color: #203653; font-size: 18px; font-weight: bold; }
QPushButton#settingsItem {
min-height: 68px;
border: 1px solid #a8b8ce;
border-radius: 10px;
background: qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 #ffffff,stop:1 #e5edf8);
text-align: left;
}
QPushButton#settingsItem:hover { border-color: #4b8cde; background: #e7f2ff; }
QPushButton#settingsItem:pressed { background: #c4ddfa; }
QLabel#settingsItemTitle { color: #203653; font-size: 14px; font-weight: bold; }
QLabel#settingsItemDescription, QLabel#settingsHelpText { color: #626d7e; font-size: 12px; }
QPushButton#settingsBackButton { min-height: 0; padding: 0; border-radius: 16px; font-size: 22px; }
QLabel#settingsBrand { color: #203653; font-size: 20px; font-weight: bold; }
QLabel#settingsVersion { font-size: 12px; }
QPlainTextEdit#settingsDescription { font-size: 13px; }
QWidget#settingsPage QComboBox { min-height: 22px; padding: 4px 26px 4px 8px; border: 1px solid #829ab9; border-radius: 5px; background: #ffffff; color: #20252d; }
+23
View File
@@ -0,0 +1,23 @@
QToolBar {
background: qlineargradient(spread:repeat,x1:0,y1:0,x2:0,y2:0.012,stop:0 #fafafa,stop:0.49 #fafafa,stop:0.5 #e6e8ec,stop:1 #e6e8ec);
border: 1px solid #aab2bf;
spacing: 4px;
padding: 3px;
}
QToolBar QToolButton, QToolBar QPushButton {
color: #243852;
background: qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 #ffffff,stop:0.48 #eff4fc,stop:0.5 #d6dfed,stop:1 #f8fbff);
border: 1px solid #9aaac0;
border-radius: 10px;
padding: 6px;
font-size: 13px;
}
QToolBar QToolButton:hover, QToolBar QPushButton:hover { border-color: #4b8cde; }
QToolBar QToolButton:focus, QToolBar QToolButton:checked, QToolBar QPushButton:focus, QToolBar QPushButton:checked {
background: qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 #e9f8ff,stop:0.45 #a7d0ff,stop:0.5 #649be5,stop:1 #c2e2ff);
border-color: #5687c4;
}
QToolBar QToolButton:pressed, QToolBar QPushButton:pressed { background: #8db6e8; }
QToolBar QToolButton:disabled, QToolBar QPushButton:disabled { color: #8590a0; }
QToolBar::separator { background: #b0bac8; width: 1px; height: 1px; margin: 4px; }
QToolBar::handle { background: #d1d8e3; border: 1px solid #b0bac8; width: 4px; height: 4px; border-radius: 2px; }
+1
View File
@@ -0,0 +1 @@
name = "Aqua"