add new theme

This commit is contained in:
zj
2026-01-01 15:00:05 +08:00
parent 4293f31dc8
commit 4dd522a534
3 changed files with 240 additions and 247 deletions

View File

@@ -12,7 +12,7 @@ depends=()
provides=("${pkgname}") provides=("${pkgname}")
options=(!strip !emptydirs) options=(!strip !emptydirs)
source=("tms-calamares-config.zip") source=("tms-calamares-config.zip")
sha256sums=('fea0994e77a6575a68581c31f5833709c656c99b46ab9234ae3161778674bed6') sha256sums=('0d356250310635f980e0f50330c4e36a26cea8a4894c96f3266a713e50ba716c')
package() { package() {
install -dm755 ${pkgdir}${_destname1} install -dm755 ${pkgdir}${_destname1}
cp -r ${srcdir}/${pkgname}${_destname1}/* ${pkgdir}${_destname1} cp -r ${srcdir}/${pkgname}${_destname1}/* ${pkgdir}${_destname1}

View File

@@ -175,8 +175,8 @@ images:
# branding component also ships a stylesheet.qss. Then they are # branding component also ships a stylesheet.qss. Then they are
# the corresponding CSS attributes of #sidebarApp. # the corresponding CSS attributes of #sidebarApp.
style: style:
SidebarBackground: "#292F34" SidebarBackground: "#FAD59E"
SidebarText: "#FFFFFF" SidebarText: "#3E3E6E"
### SLIDESHOW ### SLIDESHOW
# #

View File

@@ -1,282 +1,275 @@
/* /*
* Calamares Stylesheet for Bobocorn Branding - Lighter Yellow Sidebar, Light Main Background
A branding component can ship a stylesheet (like this one) * Based on logo colors:
which is applied to parts of the Calamares user-interface. * - Sidebar Background (Lighter Orange/Yellow): #FAD59E
In principle, all parts can be styled through CSS. * - Main Background (Very Pale Warm Yellow): #FFFBF0
Missing parts should be filed as issues. * - Main Text/Dark Accent (Dark Blue/Purple): #3E3E6E
* - Primary Accent (Light Blue/Cyan): #8DD0D9
The IDs are based on the object names in the C++ code. * - Secondary Accent (Pink/Red): #E75677
You can use the Debug Dialog to find out object names:
- Open the debug dialog
- Choose tab *Tools*
- Click *Widget Tree* button
The list of object names is printed in the log.
Documentation for styling Qt Widgets through a stylesheet
can be found at
https://doc.qt.io/qt-5/stylesheet-examples.html
https://doc.qt.io/qt-5/stylesheet-reference.html
In Calamares, styling widget classes is supported (e.g.
using `QComboBox` as a selector).
This example stylesheet has all the actual styling commented out.
The examples are not exhaustive.
*/ */
/* ########## 全局设置 ########## */
/* ########## MAIN APPLICATION WINDOW ########## */ /* 整个应用程序的默认字体和颜色 */
#mainApp {
}
#mainText{
font : bold 16px;
}
#sidebarApp {
}
#logoApp {
}
#sidebarMenuApp {
padding: 3px;
background-color: #292F34;
}
QWidget { QWidget {
font: 16px; font: 16px "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
color: #3E3E6E; /* 默认文字颜色为深紫/蓝 */
background-color: #FFFBF0; /* 全局背景色设为非常浅的暖黄色 */
} }
QTextEdit, QListView { /* 主内容区域的背景色 */
QWizardPage {
background-color: #FFFBF0; /* 主内容区背景色设为非常浅的暖黄色 */
} }
QDialogButtonBox {
/* ########## 侧边栏 ########## */
/* 侧边栏整体背景和文字颜色 */
#sidebarApp { /* Calamares 侧边栏的根容器 ID */
background-color: #FAD59E; /* 侧边栏改为更淡的橙黄色 */
color: #3E3E6E; /* 深紫/蓝文字 */
} }
QAbstractSpinBox {
/* 侧边栏菜单列表的背景,确保与 #sidebarApp 背景一致 */
#sidebarMenuApp { /* 侧边栏内部的 QListWidget 的 ID */
padding: 3px;
background-color: #FAD59E; /* 确保与 #sidebarApp 背景一致 */
} }
QListWidget::item:alternate {
/* 侧边栏未选中项的样式 */
#sidebarMenuApp QListWidget::item {
background-color: transparent; /* 透明背景 */
color: #3E3E6E; /* 深紫/蓝文字 */
padding: 8px 15px; /* 内边距 */
}
/* 侧边栏选中项的样式 */
#sidebarMenuApp QListWidget::item:selected {
background-color: #8DD0D9; /* 浅蓝/青 (主要强调色) */
color: #3E3E6E; /* 深紫/蓝 (在浅蓝背景上更清晰) */
border-radius: 3px; /* 稍微圆角 */
}
/* 鼠标悬停在侧边栏项上时的样式 */
#sidebarMenuApp QListWidget::item:hover {
background-color: #F5BE7A; /* 鼠标悬停时,比侧边栏背景稍深一点的橙黄色 */
}
/* Logo 区域 - 重点修改这里 */
#logoApp {
padding: 0px; /* 减少所有方向的内边距给logo本身更多空间 */
min-height: 70px; /* 确保logo区域有足够的最小高度防止被挤压 */
/* mix-width: 180px; 这个属性是错误的,应该是 max-width */
max-width: 180px; /* 限制logo区域的最大宽度防止溢出 */
} }
#debugButton { /* ########## 主内容区域标题和文本 ########## */
font: bold 8px;
color: #FFFFFF; /* 主标题,例如 "欢迎使用 BBTTMS 安装程序" */
#mainText { /* 您的 qss 中已经有这个 ID */
font: bold 24px "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
color: #3E3E6E; /* 深紫/蓝,与主要文字色呼应 */
padding-bottom: 10px;
padding-top: 20px; /* 顶部留白 */
background-color: transparent; /* 确保标题背景透明,显示主内容区背景色 */
} }
/* 普通标签文字颜色 */
/* ########## TOOLTIP ########## */ QLabel {
color: #3E3E6E;
background-color: transparent; /* 确保标签背景透明,显示主内容区背景色 */
QPushButton {
font : 16px;
} }
QDialogButtonBox { /* ########## 底部导航按钮 ########## */
dialogbuttonbox-buttons-have-icons: 0;
/* 底部导航按钮的通用样式 */
QDialogButtonBox QPushButton { /* 针对 QDialogButtonBox 内部的 QPushButton */
background-color: #8DD0D9; /* 浅蓝/青 (主要强调色) */
color: #3E3E6E; /* 深紫/蓝 文字 */
border: none;
padding: 10px 20px;
border-radius: 5px;
font: bold 16px "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
min-width: 80px; /* 确保按钮有最小宽度 */
} }
/* 鼠标悬停在导航按钮上时的样式 */
/* ########## QLIST VIEW ########## */ QDialogButtonBox QPushButton:hover {
background-color: #7BC4CC; /* 浅蓝/青 稍深 */
QListView {
font: 16px;
} }
/* 鼠标按下导航按钮时的样式 */
/* ########## QLINE EDIT ########## */ QDialogButtonBox QPushButton:pressed {
background-color: #6AAEB6; /* 浅蓝/青 更深 */
QLineEdit#LE_TestKeyboard {
font: 16px;
} }
QLineEdit#m_passphraseLineEdit, QLineEdit#vgName, /* "取消" 按钮的特定样式 */
QLineEdit#m_confirmLineEdit { QDialogButtonBox QPushButton[text="取消"] { /* 假设取消按钮的文本是 "取消" */
font: 16px; background-color: #E75677; /* 粉红/红 (次要强调色) */
color: #FFFFFF; /* 白色文字 */
}
QDialogButtonBox QPushButton[text="取消"]:hover {
background-color: #D04A6A; /* 粉红/红 稍深 */
}
QDialogButtonBox QPushButton[text="取消"]:pressed {
background-color: #B93E5A; /* 粉红/红 更深 */
} }
QLineEdit#textBoxUserVerifiedPassword, QLineEdit#textBoxVerifiedRootPassword { /* ########## 输入框和下拉框 ########## */
font: 16px;
}
QLineEdit#textBoxFullName, QLineEdit#textBoxLoginName, QLineEdit#textBoxHostName,
QLineEdit#textBoxUserPassword, QLineEdit#textBoxRootPassword {
font: 16px;
}
#textBoxFullName, #textBoxLoginName, #textBoxHostName, #textBoxUserPassword,
#textBoxRootPassword, #textBoxAutoLogin, #vgName {
font: 16px;
}
#textBoxUserVerifiedPassword, #textBoxVerifiedRootPassword,
#LE_TestKeyboard, #m_confirmLineEdit, #m_passphraseLineEdit {
font: 16px;
}
/* ##########PARTITION ########## */
#partResizerWidget {
font: 16px;
}
/* ########## PAGE_USERSETUP ########## */
#labelWhatIsYourName {
font: 16px;
}
#textBoxFullName {
font: 16px;
}
#labelFullName {
font: 16px;
}
#labelFullNameError {
font: 16px;
}
#username_label_2 {
font: 16px;
}
#textBoxLoginName {
font: 16px;
}
#labelUsername {
font: 16px;
}
#labelUsernameError {
font: 16px;
}
#hostname_label_2 {
font: 16px;
}
#textBoxHostName {
font: 16px;
}
#labelHostname {
font: 16px;
}
#labelHostnameError {
font: 16px;
}
#password_label_2 {
font: 16px;
}
#textBoxUserPassword {
font: 16px;
}
#textBoxUserVerifiedPassword {
font: 16px;
}
#labelUserPassword {
font: 16px;
}
#labelUserPasswordError {
font: 16px;
}
#checkBoxRequireStrongPassword {
font: 16px;
}
#checkBoxDoAutoLogin {
font: 16px;
}
#checkBoxReusePassword {
font: 16px;
}
#labelChooseRootPassword {
font: 16px;
}
#textBoxRootPassword {
font: 16px;
}
#textBoxVerifiedRootPassword {
font: 16px;
}
#labelRootPassword {
font: 16px;
}
#labelRootPasswordError {
font: 16px;
}
/* ########## COMBO BOX ########## */
QComboBox {
font: 16px;
}
#mountPointComboBox::drop-down {
font: 16px;
}
/* ########## SPIN BOX ########## */
QSpinBox {
font: 16px;
}
/* 通用输入框样式 */
QLineEdit { QLineEdit {
font: 16px; background-color: #FFFFFF; /* 白色背景,确保可读性 */
color: #3E3E6E; /* 深紫/蓝文字 */
border: 1px solid #CCCCCC; /* 浅灰色边框 */
border-radius: 3px;
padding: 5px;
font: 16px "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
} }
/* ########## TREE VIEW ########## */ /* QComboBox 的通用样式 (与 QLineEdit 分开,以便单独调整 padding) */
QComboBox {
background-color: #FFFFFF; /* 白色背景,确保可读性 */
color: #3E3E6E; /* 深紫/蓝文字 */
border: 1px solid #CCCCCC; /* 浅灰色边框 */
border-radius: 3px;
padding: 5px 26px 5px 5px; /* 右侧留出足够的空间给箭头 (24px 宽度 + 2px 额外间距) */
min-height: 24px; /* 确保最小高度 */
font: 16px "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}
/* 鼠标悬停在输入框/下拉框上时的样式 */
QLineEdit:hover, QComboBox:hover {
border: 1px solid #B0B0B0; /* 悬停时边框颜色稍深 */
}
/* 输入框/下拉框获得焦点时的样式 */
QLineEdit:focus, QComboBox:focus {
border: 1px solid #8DD0D9; /* 焦点边框为浅蓝/青 */
outline: none;
}
/* 下拉框的下拉箭头区域 (即右侧可点击的箭头背景区域) */
QComboBox::drop-down {
subcontrol-origin: padding; /* 确保子控件的定位起点正确 */
subcontrol-position: top right; /* 定位在右上角 */
width: 24px; /* 给予足够的宽度来显示箭头图标 */
border-left: 1px solid #CCCCCC; /* 左侧边框,与文本区域分隔开 */
border-top-right-radius: 3px; /* 匹配 QComboBox 的圆角 */
border-bottom-right-radius: 3px;
background-color: #F0F0F0; /* 浅灰色背景,让箭头区域更突出 */
}
/* 鼠标悬停在下拉箭头区域时 */
QComboBox::drop-down:hover {
background-color: #E0E0E0; /* 悬停时背景稍深,提供视觉反馈 */
}
/* 针对下拉框中的向下箭头图标本身 */
QComboBox::down-arrow {
image: url(:/qt-project.org/styles/commonstyle/images/down-arrow.png); /* 使用 Qt 默认的向下箭头图标 */
width: 16px; /* 调整图标大小 */
height: 16px;
/* 可以通过 padding 或 margin 调整图标在 drop-down 区域内的位置,使其居中 */
}
/* 如果 QComboBox 是可编辑的,文本部分也需要留出空间 */
QComboBox:editable {
padding-right: 26px;
}
/* 下拉列表本身的样式 (例如,当点击箭头后弹出的列表) */
QComboBox QAbstractItemView {
border: 1px solid #BBBBBB; /* 下拉列表的边框 */
background-color: #FFFFFF;
selection-background-color: #8DD0D9; /* 选中项背景色 */
selection-color: #3E3E6E; /* 选中项文字颜色 */
}
/* ########## 其他元素 ########## */
/* 底部左侧的 "关于" 和 "调试" 按钮 */
#debugButton, #aboutButton {
/* 1. 完全透明化按钮本身及其内容 */
opacity: 0;
/* 2. 移除其占据的布局空间 */
width: 0px;
height: 0px;
padding: 0px;
margin: 0px;
/* 3. 确保其他视觉元素也被隐藏或不显示 */
background-color: transparent; /* 保持背景透明 */
color: transparent; /* 确保任何文本或可着色元素都透明 */
border: none; /* 移除边框 */
font-size: 0px; /* 字体大小设为0确保不占空间 */
/* 4. 显式地尝试移除图标(虽然 opacity: 0 应该已经足够,但这是更保险的做法) */
qproperty-icon: url(); /* 设置为空URL移除图标文件 */
qproperty-icon-size: 0px 0px; /* 将图标尺寸设置为0 */
}
/* 鼠标悬停时也保持完全隐藏状态 */
#debugButton:hover, #aboutButton:hover {
opacity: 0; /* 悬停时也完全透明 */
color: transparent; /* 悬停时文字颜色也保持透明 */
}
/* 进度条 (如果有的话) */
QProgressBar {
border: 1px solid #CCCCCC;
border-radius: 5px;
text-align: center;
background-color: #8DD0D9; /* 进度条背景可以稍暗的黄色 */
}
QProgressBar::chunk {
background-color: #F7B060; /* 进度条填充色为浅蓝/青 */
border-radius: 5px;
}
/* 复选框 */
QCheckBox {
color: #3E3E6E;
background-color: transparent;
}
QCheckBox::indicator:checked {
background-color: #8DD0D9; /* 选中时背景色 */
border: 1px solid #8DD0D9;
}
QCheckBox::indicator:unchecked {
background-color: #FFFFFF;
border: 1px solid #CCCCCC;
}
/* 标题 */
QHeaderView::section {
font : bold 16px "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
background-color: #F7B060; /* 表格头背景可以稍暗的黄色 */
color: #3E3E6E; /* 表格头文字颜色 */
padding: 5px;
}
/* 树形视图 */
QTreeView { QTreeView {
font: 16px; font: 16px "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
show-decoration-selected: 0; show-decoration-selected: 0;
background-color: #FFFFFF; /* 树形视图背景用白色,提高可读性 */
border: 1px solid #CCCCCC;
} }
QTreeView::item { QTreeView::item {
padding: 2px; padding: 2px;
background-color: transparent;
} }
QTreeView::branch:has-siblings:!adjoins-item { QTreeView::item:selected {
} background-color: #8DD0D9;
QTreeView::branch:has-siblings:adjoins-item { color: #3E3E6E;
}
QTreeView::branch:!has-children:!has-siblings:adjoins-item {
}
QTreeView::branch:has-children:!has-siblings:closed,
QTreeView::branch:closed:has-children:has-siblings {
}
QTreeView::branch:open:has-children:!has-siblings,
QTreeView::branch:open:has-children:has-siblings {
} }
/* ########## CHECK BOX ########## */ QTreeView::item:hover {
background-color: #E0F2F5; /* 浅色悬停背景 */
QCheckBox {
}
QCheckBox::indicator:unchecked {
}
QCheckBox::indicator:checked {
}
QItemSelectionModel::Select {
}
/* ########## HEADER VIEW ########## */
QHeaderView::section {
font : 16px;
}
#debugButton {
background-color: none;
font: 12px;
color: #edecf0;
height: 32px;
border: none;
}
#debugButton:hover {
color: #ff7f7f;
}
#aboutButton {
background-color: none;
font: 12px;
color: #edecf0;
height: 32px;
border: none;
} }