From b435aedca4253305b4442b994158f022232daea7 Mon Sep 17 00:00:00 2001 From: like Date: Sun, 28 Apr 2024 10:49:48 +0800 Subject: [PATCH 1/5] fix addwidget UI --- src/module/cursorthemefeature.cpp | 12 ++++++++++-- src/module/globalthemefeature.cpp | 12 ++++++++++-- src/module/grubthemefeature.cpp | 12 ++++++++++-- src/module/iconwidgetfeature.cpp | 12 ++++++++++-- src/module/iconwidgetfeature.h | 1 + src/module/plymouththemefeature.cpp | 12 ++++++++++-- 6 files changed, 51 insertions(+), 10 deletions(-) diff --git a/src/module/cursorthemefeature.cpp b/src/module/cursorthemefeature.cpp index 540bb8b..8c690e9 100644 --- a/src/module/cursorthemefeature.cpp +++ b/src/module/cursorthemefeature.cpp @@ -536,8 +536,16 @@ void cursorAddIconWidget::paintEvent(QPaintEvent *event) Q_UNUSED(event); QPainter painter(this); - painter.setPen(Qt::DashLine); - painter.drawRect(rect().adjusted(1, 1, -1, -1)); + QPen *m_pen = new QPen(); + m_pen->setColor(QColor(Qt::gray)); + m_pen->setStyle(Qt::DashLine); + painter.setPen(*m_pen); + + int radius = 7; + QPainterPath path; + path.addRoundedRect(rect().adjusted(1,1,-1,-1), radius, radius); + + painter.drawPath(path); } void cursorAddIconWidget::dragEnterEvent(QDragEnterEvent *event) diff --git a/src/module/globalthemefeature.cpp b/src/module/globalthemefeature.cpp index 22810f2..7b209f8 100644 --- a/src/module/globalthemefeature.cpp +++ b/src/module/globalthemefeature.cpp @@ -677,8 +677,16 @@ void addPicWidget::paintEvent(QPaintEvent *event) Q_UNUSED(event); QPainter painter(this); - painter.setPen(Qt::DashLine); - painter.drawRect(rect().adjusted(1, 1, -1, -1)); + QPen *m_pen = new QPen(); + m_pen->setColor(QColor(Qt::gray)); + m_pen->setStyle(Qt::DashLine); + painter.setPen(*m_pen); + + int radius = 7; + QPainterPath path; + path.addRoundedRect(rect().adjusted(1,1,-1,-1), radius, radius); + + painter.drawPath(path); } void addPicWidget::dragEnterEvent(QDragEnterEvent *event) diff --git a/src/module/grubthemefeature.cpp b/src/module/grubthemefeature.cpp index 78f27e4..fe64702 100644 --- a/src/module/grubthemefeature.cpp +++ b/src/module/grubthemefeature.cpp @@ -318,8 +318,16 @@ void grubAddPicWidget::paintEvent(QPaintEvent *event) Q_UNUSED(event); QPainter painter(this); - painter.setPen(Qt::DashLine); - painter.drawRect(rect().adjusted(1, 1, -1, -1)); + QPen *m_pen = new QPen(); + m_pen->setColor(QColor(Qt::gray)); + m_pen->setStyle(Qt::DashLine); + painter.setPen(*m_pen); + + int radius = 7; + QPainterPath path; + path.addRoundedRect(rect().adjusted(1,1,-1,-1), radius, radius); + + painter.drawPath(path); } void grubAddPicWidget::dragEnterEvent(QDragEnterEvent *event) diff --git a/src/module/iconwidgetfeature.cpp b/src/module/iconwidgetfeature.cpp index 5057ffd..e38b397 100644 --- a/src/module/iconwidgetfeature.cpp +++ b/src/module/iconwidgetfeature.cpp @@ -900,8 +900,16 @@ void addIconWidget::paintEvent(QPaintEvent *event) Q_UNUSED(event); QPainter painter(this); - painter.setPen(Qt::DashLine); - painter.drawRect(rect().adjusted(1, 1, -1, -1)); + QPen *m_pen = new QPen(); + m_pen->setColor(QColor(Qt::gray)); + m_pen->setStyle(Qt::DashLine); + painter.setPen(*m_pen); + + int radius = 7; + QPainterPath path; + path.addRoundedRect(rect().adjusted(1,1,-1,-1), radius, radius); + + painter.drawPath(path); } void addIconWidget::dragEnterEvent(QDragEnterEvent *event) diff --git a/src/module/iconwidgetfeature.h b/src/module/iconwidgetfeature.h index ba0f4bd..654b2fc 100644 --- a/src/module/iconwidgetfeature.h +++ b/src/module/iconwidgetfeature.h @@ -27,6 +27,7 @@ #include #include #include +#include class MainInterFaceFeature : public QWidget { diff --git a/src/module/plymouththemefeature.cpp b/src/module/plymouththemefeature.cpp index e93f70d..83214e3 100644 --- a/src/module/plymouththemefeature.cpp +++ b/src/module/plymouththemefeature.cpp @@ -401,8 +401,16 @@ void plymouthAddPicWidget::paintEvent(QPaintEvent *event) Q_UNUSED(event); QPainter painter(this); - painter.setPen(Qt::DashLine); - painter.drawRect(rect().adjusted(1, 1, -1, -1)); + QPen *m_pen = new QPen(); + m_pen->setColor(QColor(Qt::gray)); + m_pen->setStyle(Qt::DashLine); + painter.setPen(*m_pen); + + int radius = 7; + QPainterPath path; + path.addRoundedRect(rect().adjusted(1,1,-1,-1), radius, radius); + + painter.drawPath(path); } void plymouthAddPicWidget::dragEnterEvent(QDragEnterEvent *event) From 3e6d8cd9623a143228976e044e2bb51c77c59bbe Mon Sep 17 00:00:00 2001 From: like Date: Sun, 28 Apr 2024 11:23:14 +0800 Subject: [PATCH 2/5] Upload themepackage address update --- src/build/buildresultwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build/buildresultwidget.cpp b/src/build/buildresultwidget.cpp index 746644a..11ad3e6 100644 --- a/src/build/buildresultwidget.cpp +++ b/src/build/buildresultwidget.cpp @@ -18,7 +18,7 @@ buildResultWidget::buildResultWidget(QWidget *parent) : m_buildResult->setText("主题制作完成!"); QLabel *guideLabel = new QLabel(); - QString str = "" + tr("上传主题平台") + ""; + QString str = "" + tr("上传主题平台") + ""; guideLabel->setText(str); guideLabel->setTextFormat(Qt::RichText); guideLabel->setCursor(Qt::PointingHandCursor); From d8e861235c2004ade0d291b931c28c2848668693 Mon Sep 17 00:00:00 2001 From: like Date: Sun, 28 Apr 2024 15:05:27 +0800 Subject: [PATCH 3/5] update translation --- src/build/buildresultwidget.cpp | 6 +- src/module/batchimportdialog.cpp | 6 +- src/module/cursorthemefeature.cpp | 2 +- src/module/cursorthemewidget.cpp | 4 +- src/module/globalthemefeature.cpp | 2 +- src/module/globalthemewidget.cpp | 2 +- src/module/grubthemefeature.cpp | 2 +- src/module/grubthemewidget.cpp | 2 +- src/module/iconthemewidget.cpp | 6 +- src/module/iconwidgetfeature.cpp | 2 +- src/module/plymouththemefeature.cpp | 6 +- src/module/plymouththemewidget.cpp | 2 +- translation/themebuilder_en_US.ts | 571 +++++++++++++++++++++++----- translation/themebuilder_zh_CN.ts | 571 +++++++++++++++++++++++----- 14 files changed, 971 insertions(+), 213 deletions(-) diff --git a/src/build/buildresultwidget.cpp b/src/build/buildresultwidget.cpp index 11ad3e6..c768b2d 100644 --- a/src/build/buildresultwidget.cpp +++ b/src/build/buildresultwidget.cpp @@ -15,17 +15,17 @@ buildResultWidget::buildResultWidget(QWidget *parent) : QLabel *iconlabel = new QLabel(); iconlabel->setPixmap(QIcon::fromTheme("ukui-dialog-success").pixmap(16,16)); QLabel *m_buildResult = new QLabel; - m_buildResult->setText("主题制作完成!"); + m_buildResult->setText(tr("Theme finished!")); QLabel *guideLabel = new QLabel(); - QString str = "" + tr("上传主题平台") + ""; + QString str = "" + tr("Upload theme platform") + ""; guideLabel->setText(str); guideLabel->setTextFormat(Qt::RichText); guideLabel->setCursor(Qt::PointingHandCursor); guideLabel->setOpenExternalLinks(true); // 将此属性设置为 true QPushButton *m_backHomeBtn = new QPushButton(); - m_backHomeBtn->setText("确认"); + m_backHomeBtn->setText(tr("OK")); tipLayout->addWidget(iconlabel); tipLayout->addWidget(m_buildResult); tipLayout->addStretch(1); diff --git a/src/module/batchimportdialog.cpp b/src/module/batchimportdialog.cpp index 39e1ae2..9964324 100644 --- a/src/module/batchimportdialog.cpp +++ b/src/module/batchimportdialog.cpp @@ -20,11 +20,11 @@ BatchImportDialog::BatchImportDialog(QWidget *parent) : tip->setPixmap(pixmap); QLabel *tip1 = new QLabel(); - tip1->setText(tr("批量导入前,请确保所有图标已按照规范要求命名。")); + tip1->setText(tr("Before importing the ICONS in batches, ensure that all ICONS are named according to the specifications.")); QPushButton *specificationBtn = new QPushButton(this); specificationBtn->setFixedSize(120,36); - specificationBtn->setText(tr("查看图标规范")); + specificationBtn->setText(tr("View icon specification")); connect(specificationBtn,&QPushButton::clicked,this,[=](){ QUrl Url("https://gitee.com/openkylin/kylin-theme-builder/blob/openkylin/nile/README.md"); QDesktopServices::openUrl(Url); @@ -32,7 +32,7 @@ BatchImportDialog::BatchImportDialog(QWidget *parent) : QPushButton *importBtn = new QPushButton(this); importBtn->setFixedSize(96,36); - importBtn->setText(tr("批量导入")); + importBtn->setText(tr("Batch import")); connect(importBtn,&QPushButton::clicked,this,[=](){ emit startimport(); }); diff --git a/src/module/cursorthemefeature.cpp b/src/module/cursorthemefeature.cpp index 8c690e9..8391e7f 100644 --- a/src/module/cursorthemefeature.cpp +++ b/src/module/cursorthemefeature.cpp @@ -519,7 +519,7 @@ cursorAddIconWidget::cursorAddIconWidget(QWidget *parent) button->setProperty("isRoundButton", true); QLabel *tip = new QLabel(); - tip->setText(tr("添加图标")); + tip->setText(tr("Add Icon")); layout->addStretch(1); layout->addWidget(button); diff --git a/src/module/cursorthemewidget.cpp b/src/module/cursorthemewidget.cpp index 94f86d9..73687b5 100644 --- a/src/module/cursorthemewidget.cpp +++ b/src/module/cursorthemewidget.cpp @@ -467,7 +467,7 @@ void CursorThemeWidget::initBuildWidget() QPushButton *buildButton = new QPushButton(m_buildwidget); QPushButton *bacthButton = new QPushButton(); // buildButton->setFixedSize(346,36); - buildButton->setText(tr("制作光标主题")); + buildButton->setText(tr("Start Cursor Theme Building")); QHBoxLayout *buildlayout = new QHBoxLayout(m_buildwidget); buildlayout->addWidget(bacthButton); buildlayout->addWidget(buildButton); @@ -549,7 +549,7 @@ void CursorThemeWidget::initFormatWidget() QHBoxLayout*layout = new QHBoxLayout(m_formatwidget); QLabel *tipslabel = new QLabel(m_formatwidget); - tipslabel->setText(tr("*上传的图标尺寸为96 X 96、格式为 SVG")); + tipslabel->setText(tr("*The uploaded ICONS are 96 X 96 in SVG format")); layout->addWidget(tipslabel); } diff --git a/src/module/globalthemefeature.cpp b/src/module/globalthemefeature.cpp index 7b209f8..2394cf2 100644 --- a/src/module/globalthemefeature.cpp +++ b/src/module/globalthemefeature.cpp @@ -650,7 +650,7 @@ addPicWidget::addPicWidget(QWidget *parent) button->setProperty("isRoundButton", true); QLabel *tip = new QLabel(); - tip->setText(tr("添加图片")); + tip->setText(tr("Add picture")); tip->setAlignment(Qt::AlignHCenter); diff --git a/src/module/globalthemewidget.cpp b/src/module/globalthemewidget.cpp index 90dad6a..91d6c22 100644 --- a/src/module/globalthemewidget.cpp +++ b/src/module/globalthemewidget.cpp @@ -742,7 +742,7 @@ void GlobalThemeWidget::initbuildWidget() m_buildwidget->setFixedHeight(70); QPushButton *buildButton = new QPushButton(); buildButton->setFixedSize(346,36); - buildButton->setText(tr("制作全局主题")); + buildButton->setText(tr("Start Global Theme Building")); QHBoxLayout *buildlayout = new QHBoxLayout(m_buildwidget); buildlayout->addWidget(buildButton); connect(buildButton,&QPushButton::clicked,this,[=](){ diff --git a/src/module/grubthemefeature.cpp b/src/module/grubthemefeature.cpp index fe64702..8448c78 100644 --- a/src/module/grubthemefeature.cpp +++ b/src/module/grubthemefeature.cpp @@ -296,7 +296,7 @@ grubAddPicWidget::grubAddPicWidget(QWidget *parent) button->setProperty("isRoundButton", true); QLabel *tip = new QLabel(); - tip->setText(tr("添加图片")); + tip->setText(tr("Add picture")); tip->setAlignment(Qt::AlignHCenter); diff --git a/src/module/grubthemewidget.cpp b/src/module/grubthemewidget.cpp index 545bcb7..091587c 100644 --- a/src/module/grubthemewidget.cpp +++ b/src/module/grubthemewidget.cpp @@ -184,7 +184,7 @@ void GrubThemeWidget::initBuildWidget() m_buildwidget->setFixedHeight(70); QPushButton *buildButton = new QPushButton(m_buildwidget); buildButton->setFixedSize(346,36); - buildButton->setText(tr("制作GRUB主题")); + buildButton->setText(tr("Start Grub Theme Building")); QHBoxLayout *buildlayout = new QHBoxLayout(m_buildwidget); buildlayout->addWidget(buildButton); connect(buildButton,&QPushButton::clicked,this,[=](){ diff --git a/src/module/iconthemewidget.cpp b/src/module/iconthemewidget.cpp index 0c0510c..7dcf0a0 100644 --- a/src/module/iconthemewidget.cpp +++ b/src/module/iconthemewidget.cpp @@ -618,9 +618,9 @@ void IconThemeWidget::initBatchEditWidget() m_batchwidget = new QWidget(m_rightwidget); QPushButton *bacthButton = new QPushButton(m_batchwidget); - bacthButton->setText(tr("批量添加")); + bacthButton->setText(tr("Batch addition")); QPushButton*buildButton = new QPushButton(m_batchwidget); - buildButton->setText(tr("制作光标主题")); + buildButton->setText(tr("Start Icon Theme Building")); m_batchimportdlg = new BatchImportDialog(); QHBoxLayout *layout = new QHBoxLayout(m_batchwidget); @@ -987,7 +987,7 @@ void IconThemeWidget::initRightWidget() line->setFixedWidth(m_rightwidget->width()); QLabel *tip = new QLabel(); - tip->setText(tr("*上传的图标尺寸为96 X 96、格式为 SVG")); + tip->setText(tr("*The uploaded ICONS are 96 X 96 in SVG format")); m_rightwidgetlayout->addWidget(m_changebuttonwidget); m_rightwidgetlayout->addWidget(tip); diff --git a/src/module/iconwidgetfeature.cpp b/src/module/iconwidgetfeature.cpp index e38b397..2de7379 100644 --- a/src/module/iconwidgetfeature.cpp +++ b/src/module/iconwidgetfeature.cpp @@ -883,7 +883,7 @@ addIconWidget::addIconWidget(QWidget *parent) button->setProperty("isRoundButton", true); QLabel *tip = new QLabel(); - tip->setText(tr("添加图标")); + tip->setText(tr("Add icon")); layout->addStretch(1); layout->addWidget(button); diff --git a/src/module/plymouththemefeature.cpp b/src/module/plymouththemefeature.cpp index 83214e3..1c8af1e 100644 --- a/src/module/plymouththemefeature.cpp +++ b/src/module/plymouththemefeature.cpp @@ -369,7 +369,7 @@ plymouthAddPicWidget::plymouthAddPicWidget(QWidget *parent) button->setProperty("isRoundButton", true); tip = new QLabel(); - tip->setText(tr("添加视频")); + tip->setText(tr("Add video")); tip->setAlignment(Qt::AlignHCenter); @@ -390,9 +390,9 @@ void plymouthAddPicWidget::setType(QString type) { m_type = type; if(m_type == "pic"){ - tip->setText(tr("添加图片")); + tip->setText(tr("Add picture")); }else{ - tip->setText(tr("添加视频")); + tip->setText(tr("Add video")); } } diff --git a/src/module/plymouththemewidget.cpp b/src/module/plymouththemewidget.cpp index 7fc04af..b484724 100644 --- a/src/module/plymouththemewidget.cpp +++ b/src/module/plymouththemewidget.cpp @@ -242,7 +242,7 @@ void PlymouthThemeWidget::initBuildWidget() m_buildwidget->setFixedHeight(70); QPushButton *buildButton = new QPushButton(m_buildwidget); buildButton->setFixedSize(346,36); - buildButton->setText(tr("制作开机动画")); + buildButton->setText(tr("Start Plymouth Theme Building")); QHBoxLayout *buildlayout = new QHBoxLayout(m_buildwidget); buildlayout->addWidget(buildButton); connect(buildButton,&QPushButton::clicked,this,[=](){ diff --git a/translation/themebuilder_en_US.ts b/translation/themebuilder_en_US.ts index 16fda05..3fbc864 100644 --- a/translation/themebuilder_en_US.ts +++ b/translation/themebuilder_en_US.ts @@ -9,25 +9,58 @@ + + BatchImportDialog + + + Before importing the ICONS in batches, ensure that all ICONS are named according to the specifications. + + + + + View icon specification + + + + + Batch import + + + CursorThemeWidget - - + + Select SVG file - - + + SVG file (*.svg) + + + Start Cursor Theme Building + + + + + Select Batch + + + + + *The uploaded ICONS are 96 X 96 in SVG format + + EditButton - + Import @@ -37,40 +70,64 @@ - - - + + + + + + + + + error + The wallpaper size must be 3840x2160 + The file size cannot exceed 10MB - + + The file is not a jpg + + + + Cover size must be 1640x1080 - + The file size cannot exceed 5MB - - The file size cannot exceed 1MB + + + The file is not a png + + + + + The file is not a mp4 + The file size cannot exceed 1MB + + + + The file size cannot exceed 20KB @@ -78,117 +135,122 @@ GlobalThemeWidget - + Overall theme rendering - - + + Select picture file - - + + Picture file (*.png *.jpg) - + Desktop wallpaper - + Window appearance - + light - + dark - + Control fillet - + Accent colour - + daybreakBlue - + jamPurple - + magenta - + sunRed - + sunsetOrange - + dustGold - + polarGreen - + Window transparency - + Window fillet - + Large - + Medium - + Small + + + Start Global Theme Building + + GrubEditButton - + Import @@ -196,15 +258,20 @@ GrubThemeWidget - + Select picture file - + Picture file (*.png) + + + Start Grub Theme Building + + HistoryButton @@ -250,99 +317,342 @@ IconThemeWidget - - + + + + Select SVG file - - + + + + SVG file (*.svg) + + + Batch addition + + + + + Start Icon Theme Building + + + + + Select Batch + + + + + *The uploaded ICONS are 96 X 96 in SVG format + + + + + ImageWidget + + + 生物特征管理工具 + + + + + 文件保护箱 + + + + + 刻录 + + + + + 天气 + + + + + 安全中心 + + + + + 闹钟 + + + + + 工具箱 + + + + + 计算器 + + + + + 摄像头 + + + + + 多端协同 + + + + + 字体管理器 + + + + + 安装器 + + + + + 飞书 + + + + + 日志查看器 + + + + + 音乐 + + + + + 新功能介绍 + + + + + 便签本 + + + + + 麒麟管家 + + + + + 看图 + + + + + 打印机 + + + + + 录音 + + + + + 截图 + + + + + 服务与支持 + + + + + 软件商店 + + + + + U盘启动器 + + + + + 用户手册 + + + + + 影音 + + + + + 文件管理器 + + + + + 设置 + + + + + 系统监视器 + + + + + 终端 + + + + + 备份还原 + + + + + 账户 + + + + + 系统 + + + + + 设备 + + + + + 网络 + + + + + 个性化 + + + + + 时间和语言 + + + + + 更新 + + + + + 安全 + + + + + + 应用 + + + + + 搜索 + + InfoCreateWidget - + ThemeName-CN - + ThemeName-EN - + Builder Name - + Builder Mail - + Back - + OK - + Create - - - + + + Please enter less than 15 characters - - - - + + + + Input format error! - - - + + + Input is empty! - + Please enter more than 1 characters - + Please don't duplicate the name of a package that already exists! - + Please keep theme names in lowercase! - + Please enter more than 6 characters - + + Set as a theme for system use during installation + + + + Please enter less than 35 characters @@ -350,52 +660,52 @@ MainInterface - + GlobalTheme - + IconTheme - + CursorTheme - + PlymouthTheme - + GrubTheme - + Start Global Theme Building - + Start Icon Theme Building - + Start Cursor Theme Building - + Start Plymouth Theme Building - + Start Grub Theme Building @@ -403,62 +713,62 @@ MainWindow - + kylin-theme-builder - + User guide - + Global Theme - + Topics include basic styles for windows and controls, icons, cursors, and more! - + Icon Theme - + The icon theme includes multiple application icons and system settings homepage icons. - + Cursor Theme - + Cursor theme for pointer cursor icon - + Plymouth Theme - + Boot animation can be customized to boot screen effect - + GRUB Theme - + Modify GRUB background wallpaper @@ -466,31 +776,36 @@ PlymouthThemeWidget - + Select Png file - + Png file (*.png) - + Select MP4 file - + MP4 file (*.mp4) + + + Start Plymouth Theme Building + + SavePathDialog - + Storage Path: @@ -505,7 +820,7 @@ - + Select Directory @@ -524,8 +839,8 @@ - - + + Minimize @@ -565,12 +880,46 @@ - - + + Restore + + addIconWidget + + + Add icon + + + + + addPicWidget + + + Add picture + + + + + buildResultWidget + + + Theme finished! + + + + + Upload theme platform + + + + + OK + + + cacheConfirmedWidget @@ -595,4 +944,34 @@ + + cursorAddIconWidget + + + Add Icon + + + + + grubAddPicWidget + + + Add picture + + + + + plymouthAddPicWidget + + + + Add video + + + + + Add picture + + + diff --git a/translation/themebuilder_zh_CN.ts b/translation/themebuilder_zh_CN.ts index 014851e..aae192b 100644 --- a/translation/themebuilder_zh_CN.ts +++ b/translation/themebuilder_zh_CN.ts @@ -9,25 +9,58 @@ 主题制作工坊 + + BatchImportDialog + + + Before importing the ICONS in batches, ensure that all ICONS are named according to the specifications. + 批量导入前,请确保所有图标已按照规范要求命名。 + + + + View icon specification + 查看图标规范 + + + + Batch import + 批量导入 + + CursorThemeWidget - - + + Select SVG file 选择SVG文件 - - + + SVG file (*.svg) SVG 文件 (*.svg) + + + Start Cursor Theme Building + 制作光标主题 + + + + Select Batch + 选择批量导入文件夹 + + + + *The uploaded ICONS are 96 X 96 in SVG format + 上传的图标尺寸为96 X 96、格式为 SVG + EditButton - + Import 导入 @@ -37,40 +70,64 @@ - - - + + + + + + + + + error 错误 + The wallpaper size must be 3840x2160 壁纸尺寸必须为3840x2160 + The file size cannot exceed 10MB 文件大小不能超过10MB - + + The file is not a jpg + 该文件不是jpg格式 + + + Cover size must be 1640x1080 封面尺寸必须为1640x1080 - + The file size cannot exceed 5MB 文件大小不能超过5MB - + + + The file is not a png + 该文件不是png格式 + + + + The file is not a mp4 + 该文件不是mp4格式 + + + The file size cannot exceed 1MB 文件大小不能超过5MB {1M?} - + The file size cannot exceed 20KB 文件大小不能超过5MB {20K?} @@ -78,117 +135,122 @@ GlobalThemeWidget - + Overall theme rendering 全局主题效果图 - - + + Select picture file 选择图片文件 - - + + Picture file (*.png *.jpg) 图片文件 (*.png *.jpg) - + Desktop wallpaper 桌面壁纸 - + Window appearance 窗口外观 - + light 浅色 - + dark 深色 - + Control fillet 控件圆角 - + Accent colour 强调色 - + daybreakBlue 拂晓蓝 - + jamPurple 果酱紫 - + magenta 玫瑰红 - + sunRed 烈日红 - + sunsetOrange 日暮橙 - + dustGold 薄雾金 - + polarGreen 极光绿 - + Window transparency 窗口透明度 - + Window fillet 窗口圆角 - + Large - + Medium - + Small + + + Start Global Theme Building + 制作全局主题 + GrubEditButton - + Import 导入 @@ -196,15 +258,20 @@ GrubThemeWidget - + Select picture file 选择图片文件 - + Picture file (*.png) 图片文件 (*.png) + + + 制作GRUB主题 + 制作GRUB主题 + Picture file (*.png *.jpg) 图片文件 (*.png *.jpg) @@ -254,17 +321,41 @@ IconThemeWidget - - + + + + Select SVG file 选择SVG文件 - - + + + + SVG file (*.svg) SVG 文件 (*.svg) + + + Batch addition + 批量添加 + + + + Start Icon Theme Building + 制作图标主题 + + + + Select Batch + 选择批量导入文件夹 + + + + *The uploaded ICONS are 96 X 96 in SVG format + 上传的图标尺寸为96 X 96、格式为 SVG + APP APP @@ -274,85 +365,304 @@ 系统设置 + + ImageWidget + + + 生物特征管理工具 + + + + + 文件保护箱 + + + + + 刻录 + + + + + 天气 + + + + + 安全中心 + + + + + 闹钟 + + + + + 工具箱 + + + + + 计算器 + + + + + 摄像头 + + + + + 多端协同 + + + + + 字体管理器 + + + + + 安装器 + + + + + 飞书 + + + + + 日志查看器 + + + + + 音乐 + + + + + 新功能介绍 + + + + + 便签本 + + + + + 麒麟管家 + + + + + 看图 + + + + + 打印机 + + + + + 录音 + + + + + 截图 + + + + + 服务与支持 + + + + + 软件商店 + + + + + U盘启动器 + + + + + 用户手册 + + + + + 影音 + + + + + 文件管理器 + + + + + 设置 + + + + + 系统监视器 + + + + + 终端 + + + + + 备份还原 + + + + + 账户 + + + + + 系统 + + + + + 设备 + + + + + 网络 + + + + + 个性化 + + + + + 时间和语言 + + + + + 更新 + + + + + 安全 + + + + + + 应用 + + + + + 搜索 + + + InfoCreateWidget - + ThemeName-CN 主题名称-中文 - + ThemeName-EN 主题名称-英文 - + Builder Name 创作者 - + Builder Mail 联系邮箱 - + Back 取消 - + OK 确定 - + Create 创建 - - - + + + Please enter less than 15 characters 请保障输入内容小于15个字节 - - - - + + + + Input format error! 输入格式错误! - - - + + + Input is empty! 输入为空! - + Please enter more than 1 characters 请保障输入内容多于1个字节 - + Please don't duplicate the name of a package that already exists! 请不要重复已经存在的软件包名称! - + Please keep theme names in lowercase! 请保持主题名字小写! - + Please enter more than 6 characters 请保障输入内容多于6个字节 + + + Set as a theme for system use during installation + 安装时设置为系统使用主题 + Please enter less than 6 characters 请保障输入内容多于6个字节 @@ -362,7 +672,7 @@ themename 不符合规范 - + Please enter less than 35 characters 请保障输入内容小于35个字节 @@ -370,52 +680,52 @@ MainInterface - + GlobalTheme 全局样式 - + IconTheme 图标主题 - + CursorTheme 光标主题 - + PlymouthTheme 开机动画 - + GrubTheme 启动个性化 - + Start Global Theme Building 开始制作全局主题 - + Start Icon Theme Building 开始制作图标主题 - + Start Cursor Theme Building 开始制作光标主题 - + Start Plymouth Theme Building 开始制作开机动画主题 - + Start Grub Theme Building 开始制作Grub主题 @@ -427,62 +737,62 @@ MainWindow - + kylin-theme-builder 主题制作工坊 - + User guide 使用指南 - + Global Theme 全局主题 - + Topics include basic styles for windows and controls, icons, cursors, and more! 主题包含窗口与控件基础样式、图标、光标等内容 - + Icon Theme 图标主题 - + The icon theme includes multiple application icons and system settings homepage icons. 图标主题包含系统自带多个应用图标和系统设置首页图标 - + Cursor Theme 光标主题 - + Cursor theme for pointer cursor icon 光标主题为指针光标图标 - + Plymouth Theme 开机动画 - + Boot animation can be customized to boot screen effect 开机动画可以自定义开机界面效果 - + GRUB Theme GRUB背景 - + Modify GRUB background wallpaper 修改 GRUB 背景壁纸 @@ -502,25 +812,30 @@ 图片文件 (*.svg *.png *.gif *.mp4) - + Select Png file 选择图片文件 - + Png file (*.png) 图片文件 - + Select MP4 file 选择MP4文件 - + MP4 file (*.mp4) MP4文件 (*.mp4) + + + Start Plymouth Theme Building + 制作开机动画主题 + MP4 file (*.svg *.png *.gif *.mp4) 选择MP4文件(*.mp4) @@ -530,7 +845,7 @@ SavePathDialog - + Storage Path: 生成deb包路径: @@ -545,7 +860,7 @@ 确认 - + Select Directory 选择文件夹 @@ -564,8 +879,8 @@ - - + + Minimize 最小化 @@ -605,12 +920,46 @@ 退出 - - + + Restore 还原 + + addIconWidget + + + Add icon + 添加图标 + + + + addPicWidget + + + Add picture + 添加图片 + + + + buildResultWidget + + + Theme finished! + 主题制作完成! + + + + Upload theme platform + 上传主题平台 + + + + OK + 确定 + + cacheConfirmedWidget @@ -635,4 +984,34 @@ 取消 + + cursorAddIconWidget + + + Add Icon + 添加图标 + + + + grubAddPicWidget + + + Add picture + 添加图片 + + + + plymouthAddPicWidget + + + + Add video + 添加视频 + + + + Add picture + 添加图片 + + From a6331d3cd0de29bcf51d2fa40c39233f8f13f351 Mon Sep 17 00:00:00 2001 From: like Date: Sun, 28 Apr 2024 16:15:58 +0800 Subject: [PATCH 4/5] fix build btn test --- src/maininterface.cpp | 8 ++++++++ src/maininterface.h | 1 + src/mainwindow.cpp | 14 ++++++++++++++ src/module/cursorthemewidget.cpp | 21 ++++++++++++++------- src/module/cursorthemewidget.h | 3 ++- src/module/grubthemewidget.cpp | 19 ++++++++++++++----- src/module/grubthemewidget.h | 2 ++ src/module/iconthemewidget.cpp | 18 ++++++++++++++---- src/module/iconthemewidget.h | 3 ++- src/module/plymouththemewidget.cpp | 19 ++++++++++++++----- src/module/plymouththemewidget.h | 3 ++- 11 files changed, 87 insertions(+), 24 deletions(-) diff --git a/src/maininterface.cpp b/src/maininterface.cpp index 040463d..752f1e0 100644 --- a/src/maininterface.cpp +++ b/src/maininterface.cpp @@ -453,3 +453,11 @@ void MainInterface::hideNavigation(bool isglobal) { m_navigationwidget->setHidden(!isglobal); } + +void MainInterface::setBuildBtnText(bool isglobal) +{ + m_iconthemewidget->setBuildBtnText(isglobal); + m_cursorthemewidget->setBuildBtnText(isglobal); + m_plymouththemewidget->setBuildBtnText(isglobal); + m_grubthemewidget->setBuildBtnText(isglobal); +} diff --git a/src/maininterface.h b/src/maininterface.h index 5d10cc1..c4985fb 100644 --- a/src/maininterface.h +++ b/src/maininterface.h @@ -58,6 +58,7 @@ public: void hideNavigation(bool isglobal); + void setBuildBtnText(bool isglobal); signals: void wallpaperupdate(const QString& filePath); void wallpaperPathChanged(QString path); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4548173..cd39009 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -252,8 +252,12 @@ void MainWindow::initUI() m_ishistory = true; if(InfoData.themetype == "globalTheme"){ m_maininterface->hideNavigation(true); + m_maininterface->setBuildBtnText(true); + }else{ m_maininterface->hideNavigation(false); + m_maininterface->setBuildBtnText(false); + } }); @@ -283,6 +287,8 @@ void MainWindow::initUI() m_maininterface->refresh("plymouth"); m_maininterface->refresh("grub"); m_maininterface->hideNavigation(true); + m_maininterface->setBuildBtnText(true); + m_maininterface->setBuildBtnText(false); } else if (button == m_iconbtn) { m_maininterface->setIconTheme(); @@ -294,6 +300,8 @@ void MainWindow::initUI() m_bridge->updateIconCache(m_maininterface->getDeviceIconsMap(),"deviceicon"); m_maininterface->refresh("icon"); m_maininterface->hideNavigation(false); + m_maininterface->setBuildBtnText(false); + } else if (button == m_cursorbtn) { m_maininterface->setCursorTheme(); m_fileProcess.FileCreate("cursorTheme"); @@ -302,6 +310,8 @@ void MainWindow::initUI() m_bridge->updateIconCache(m_maininterface->getTimeCurosrMap(),"timecursor"); m_maininterface->refresh("cursor"); m_maininterface->hideNavigation(false); + m_maininterface->setBuildBtnText(false); + }else if (button == m_plymouthbtn) { m_maininterface->setPlymouthTheme(); m_fileProcess.FileCreate("plymouthTheme"); @@ -310,6 +320,8 @@ void MainWindow::initUI() startShowPlymouth(); m_maininterface->refresh("plymouth"); m_maininterface->hideNavigation(false); + m_maininterface->setBuildBtnText(false); + }else if (button == m_grubbtn) { m_maininterface->setGrubTheme(); m_fileProcess.FileCreate("grubTheme"); @@ -317,6 +329,8 @@ void MainWindow::initUI() m_bridge->createGrub(); m_maininterface->refresh("grub"); m_maininterface->hideNavigation(false); + m_maininterface->setBuildBtnText(false); + } if (false == m_historywidget->isVisible()) { diff --git a/src/module/cursorthemewidget.cpp b/src/module/cursorthemewidget.cpp index 73687b5..1283ec5 100644 --- a/src/module/cursorthemewidget.cpp +++ b/src/module/cursorthemewidget.cpp @@ -148,6 +148,15 @@ void CursorThemeWidget::useRestoreScale() m_preview2->miniscale(); } +void CursorThemeWidget::setBuildBtnText(bool isglobal) +{ + if(isglobal){ + m_buildButton->setText(tr("Start Global Theme Building")); + } else { + m_buildButton->setText(tr("Start Cursor Theme Building")); + } +} + /** * @brief 获取资源应用程序图标映射 * @@ -464,13 +473,14 @@ void CursorThemeWidget::initBuildWidget() m_batchimportdlg = new BatchImportDialog(); m_buildwidget->setFixedHeight(70); - QPushButton *buildButton = new QPushButton(m_buildwidget); + m_buildButton = new QPushButton(m_buildwidget); QPushButton *bacthButton = new QPushButton(); + bacthButton->setText(tr("Batch addition")); // buildButton->setFixedSize(346,36); - buildButton->setText(tr("Start Cursor Theme Building")); + m_buildButton->setText(tr("Start Cursor Theme Building")); QHBoxLayout *buildlayout = new QHBoxLayout(m_buildwidget); buildlayout->addWidget(bacthButton); - buildlayout->addWidget(buildButton); + buildlayout->addWidget(m_buildButton); connect(m_batchimportdlg,&BatchImportDialog::startimport,this,[=](){ m_batchimportdlg->close(); @@ -537,7 +547,7 @@ void CursorThemeWidget::initBuildWidget() connect(bacthButton,&QPushButton::clicked,this,[=](){ m_batchimportdlg->show(); }); - connect(buildButton,&QPushButton::clicked,this,[=](){ + connect(m_buildButton,&QPushButton::clicked,this,[=](){ emit build(); }); } @@ -663,7 +673,4 @@ void CursorThemeWidget::updateCustomPathMap(QMap *historyMap, } } } - - - } diff --git a/src/module/cursorthemewidget.h b/src/module/cursorthemewidget.h index 5bd5a20..f77c979 100644 --- a/src/module/cursorthemewidget.h +++ b/src/module/cursorthemewidget.h @@ -35,7 +35,7 @@ public: void useMaximumScale(); void useRestoreScale(); - + void setBuildBtnText(bool isglobal); signals: void wallpaperupdate(const QString& filePath); void newCursorMap(QMap *cursormap); @@ -82,6 +82,7 @@ private: HistoryInfo m_info; BatchImportDialog *m_batchimportdlg; QScrollArea *m_scrollArea; + QPushButton *m_buildButton; }; #endif // CURSORTHEMEWIDGET_H diff --git a/src/module/grubthemewidget.cpp b/src/module/grubthemewidget.cpp index 091587c..c80b7ad 100644 --- a/src/module/grubthemewidget.cpp +++ b/src/module/grubthemewidget.cpp @@ -182,12 +182,12 @@ void GrubThemeWidget::initBuildWidget() { m_buildwidget = new QWidget(); m_buildwidget->setFixedHeight(70); - QPushButton *buildButton = new QPushButton(m_buildwidget); - buildButton->setFixedSize(346,36); - buildButton->setText(tr("Start Grub Theme Building")); + m_buildButton = new QPushButton(m_buildwidget); + m_buildButton->setFixedSize(346,36); + m_buildButton->setText(tr("Start Grub Theme Building")); QHBoxLayout *buildlayout = new QHBoxLayout(m_buildwidget); - buildlayout->addWidget(buildButton); - connect(buildButton,&QPushButton::clicked,this,[=](){ + buildlayout->addWidget(m_buildButton); + connect(m_buildButton,&QPushButton::clicked,this,[=](){ emit build(); }); } @@ -220,6 +220,15 @@ void GrubThemeWidget::useRestoreScale() m_preview->miniscale(); } +void GrubThemeWidget::setBuildBtnText(bool isglobal) +{ + if(isglobal){ + m_buildButton->setText(tr("Start Global Theme Building")); + } else { + m_buildButton->setText(tr("Start Grub Theme Building")); + } +} + void GrubThemeWidget::addspaceritem() { QSpacerItem *spacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding); diff --git a/src/module/grubthemewidget.h b/src/module/grubthemewidget.h index ac3996e..ad23d1b 100644 --- a/src/module/grubthemewidget.h +++ b/src/module/grubthemewidget.h @@ -28,6 +28,7 @@ public: void refresh(); void useMaximumScale(); void useRestoreScale(); + void setBuildBtnText(bool isglobal); signals: void newGrubFilePath(const QString& path); void build(); @@ -40,6 +41,7 @@ private: QWidget *m_buildwidget; QVBoxLayout *m_previewlayout; GrubEditButton *m_showBtn; + QPushButton *m_buildButton; }; #endif // GRUBTHEMEWIDGET_H diff --git a/src/module/iconthemewidget.cpp b/src/module/iconthemewidget.cpp index 7dcf0a0..a91b89d 100644 --- a/src/module/iconthemewidget.cpp +++ b/src/module/iconthemewidget.cpp @@ -619,14 +619,14 @@ void IconThemeWidget::initBatchEditWidget() QPushButton *bacthButton = new QPushButton(m_batchwidget); bacthButton->setText(tr("Batch addition")); - QPushButton*buildButton = new QPushButton(m_batchwidget); - buildButton->setText(tr("Start Icon Theme Building")); + m_buildButton = new QPushButton(m_batchwidget); + m_buildButton->setText(tr("Start Icon Theme Building")); m_batchimportdlg = new BatchImportDialog(); QHBoxLayout *layout = new QHBoxLayout(m_batchwidget); layout->addWidget(bacthButton); - layout->addWidget(buildButton); + layout->addWidget(m_buildButton); m_batchwidget->setFixedHeight(60); @@ -800,7 +800,7 @@ void IconThemeWidget::initBatchEditWidget() connect(bacthButton,&QPushButton::clicked,this,[=](){ m_batchimportdlg->show(); }); - connect(buildButton,&QPushButton::clicked,this,[=](){ + connect(m_buildButton,&QPushButton::clicked,this,[=](){ emit build(); }); } @@ -1190,3 +1190,13 @@ void IconThemeWidget::useRestoreScale() { m_preview->miniscale(); } + +void IconThemeWidget::setBuildBtnText(bool isglobal) +{ + if(isglobal){ + m_buildButton->setText(tr("Start Global Theme Building")); + } else { + m_buildButton->setText(tr("Start Icon Theme Building")); + } + +} diff --git a/src/module/iconthemewidget.h b/src/module/iconthemewidget.h index 6a6221a..2809bc1 100644 --- a/src/module/iconthemewidget.h +++ b/src/module/iconthemewidget.h @@ -69,7 +69,7 @@ public: QMap *m_iconPresenceMap; void useMaximumScale(); void useRestoreScale(); - + void setBuildBtnText(bool isglobal); signals: void wallpaperupdate(const QString& filePath); @@ -130,6 +130,7 @@ private: QScrollArea *m_placescrollArea; // QScrollArea *m_systemscrollArea; BatchImportDialog *m_batchimportdlg; + QPushButton*m_buildButton; }; #endif // ICONTHEMEWIDGET_H diff --git a/src/module/plymouththemewidget.cpp b/src/module/plymouththemewidget.cpp index b484724..fcff5c7 100644 --- a/src/module/plymouththemewidget.cpp +++ b/src/module/plymouththemewidget.cpp @@ -240,12 +240,12 @@ void PlymouthThemeWidget::initBuildWidget() { m_buildwidget = new QWidget(); m_buildwidget->setFixedHeight(70); - QPushButton *buildButton = new QPushButton(m_buildwidget); - buildButton->setFixedSize(346,36); - buildButton->setText(tr("Start Plymouth Theme Building")); + m_buildButton = new QPushButton(m_buildwidget); + m_buildButton->setFixedSize(346,36); + m_buildButton->setText(tr("Start Plymouth Theme Building")); QHBoxLayout *buildlayout = new QHBoxLayout(m_buildwidget); - buildlayout->addWidget(buildButton); - connect(buildButton,&QPushButton::clicked,this,[=](){ + buildlayout->addWidget(m_buildButton); + connect(m_buildButton,&QPushButton::clicked,this,[=](){ emit build(); }); } @@ -304,6 +304,15 @@ void PlymouthThemeWidget::useRestoreScale() m_preview->miniscale(); } +void PlymouthThemeWidget::setBuildBtnText(bool isglobal) +{ + if(isglobal){ + m_buildButton->setText(tr("Start Global Theme Building")); + } else { + m_buildButton->setText(tr("Start Plymouth Theme Building")); + } +} + void PlymouthThemeWidget::addspaceritem() { QSpacerItem *spacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding); diff --git a/src/module/plymouththemewidget.h b/src/module/plymouththemewidget.h index 7e3b385..73193e2 100644 --- a/src/module/plymouththemewidget.h +++ b/src/module/plymouththemewidget.h @@ -31,7 +31,7 @@ public: void refresh(); void useMaximumScale(); void useRestoreScale(); - + void setBuildBtnText(bool isglobal); signals: void newPlymouthFilePath(const QString& path); void refreshPlymouthDir(); @@ -49,6 +49,7 @@ private: QLabel *pixLabel; QRadioButton *video; QLabel *videoLabel; + QPushButton *m_buildButton; }; #endif // PLYMOUTHMOUTHTHEMEWIDGET_H From ef388d8c442dca5361e7d6a8a5b604ee5a59d813 Mon Sep 17 00:00:00 2001 From: like Date: Sun, 28 Apr 2024 16:17:19 +0800 Subject: [PATCH 5/5] update changelog --- translation/themebuilder_en_US.ts | 61 ++++++++++++++++++++------- translation/themebuilder_zh_CN.ts | 69 +++++++++++++++++++++++-------- 2 files changed, 96 insertions(+), 34 deletions(-) diff --git a/translation/themebuilder_en_US.ts b/translation/themebuilder_en_US.ts index 3fbc864..7439fb0 100644 --- a/translation/themebuilder_en_US.ts +++ b/translation/themebuilder_en_US.ts @@ -30,29 +30,40 @@ CursorThemeWidget - - + + Select SVG file - - + + SVG file (*.svg) - + + Start Cursor Theme Building + + + Start Global Theme Building + + + Batch addition + + + + Select Batch - + *The uploaded ICONS are 96 X 96 in SVG format @@ -269,9 +280,15 @@ + Start Grub Theme Building + + + Start Global Theme Building + + HistoryButton @@ -339,6 +356,7 @@ + Start Icon Theme Building @@ -352,6 +370,11 @@ *The uploaded ICONS are 96 X 96 in SVG format + + + Start Global Theme Building + + ImageWidget @@ -723,52 +746,52 @@ - + Global Theme - + Topics include basic styles for windows and controls, icons, cursors, and more! - + Icon Theme - + The icon theme includes multiple application icons and system settings homepage icons. - + Cursor Theme - + Cursor theme for pointer cursor icon - + Plymouth Theme - + Boot animation can be customized to boot screen effect - + GRUB Theme - + Modify GRUB background wallpaper @@ -797,9 +820,15 @@ + Start Plymouth Theme Building + + + Start Global Theme Building + + SavePathDialog diff --git a/translation/themebuilder_zh_CN.ts b/translation/themebuilder_zh_CN.ts index aae192b..7ed2771 100644 --- a/translation/themebuilder_zh_CN.ts +++ b/translation/themebuilder_zh_CN.ts @@ -30,29 +30,40 @@ CursorThemeWidget - - + + Select SVG file 选择SVG文件 - - + + SVG file (*.svg) SVG 文件 (*.svg) - + + Start Cursor Theme Building 制作光标主题 + + + Start Global Theme Building + 制作全局主题 + + Batch addition + 批量添加 + + + Select Batch 选择批量导入文件夹 - + *The uploaded ICONS are 96 X 96 in SVG format 上传的图标尺寸为96 X 96、格式为 SVG @@ -269,8 +280,18 @@ + + Start Grub Theme Building + 制作Grub主题 + + + + Start Global Theme Building + 制作全局主题 + + 制作GRUB主题 - 制作GRUB主题 + 制作GRUB主题 Picture file (*.png *.jpg) @@ -343,6 +364,7 @@ + Start Icon Theme Building 制作图标主题 @@ -356,6 +378,11 @@ *The uploaded ICONS are 96 X 96 in SVG format 上传的图标尺寸为96 X 96、格式为 SVG + + + Start Global Theme Building + 制作全局主题 + APP APP @@ -370,7 +397,7 @@ 生物特征管理工具 - + @@ -747,52 +774,52 @@ 使用指南 - + Global Theme 全局主题 - + Topics include basic styles for windows and controls, icons, cursors, and more! 主题包含窗口与控件基础样式、图标、光标等内容 - + Icon Theme 图标主题 - + The icon theme includes multiple application icons and system settings homepage icons. 图标主题包含系统自带多个应用图标和系统设置首页图标 - + Cursor Theme 光标主题 - + Cursor theme for pointer cursor icon 光标主题为指针光标图标 - + Plymouth Theme 开机动画 - + Boot animation can be customized to boot screen effect 开机动画可以自定义开机界面效果 - + GRUB Theme GRUB背景 - + Modify GRUB background wallpaper 修改 GRUB 背景壁纸 @@ -833,9 +860,15 @@ + Start Plymouth Theme Building 制作开机动画主题 + + + Start Global Theme Building + 制作全局主题 + MP4 file (*.svg *.png *.gif *.mp4) 选择MP4文件(*.mp4)