!138 fix somo bugs and update changelog
Merge pull request !138 from likehomedream/UIFIX
This commit is contained in:
commit
0b58f25ffb
|
@ -1,3 +1,17 @@
|
|||
kylin-theme-builder (1.0.0.1-ok2.5) nile; urgency=medium
|
||||
|
||||
* BUG:
|
||||
#I9PUTX 【需求28549】【主要】【主题制作工坊】字体最大化后,“是否保存为历史记录”的弹窗显示不全,且“清楚”的按钮应该显示为不保存
|
||||
#I9Q251 【需求28549】【X】【不重要】【主题制作工坊】窗口透明度滑动条数值输入<30的数字,没有自动变更为30
|
||||
#IA68VB【主题制作工坊】【次要】【全局主题】创建窗口外观为深色的主题,安装应用后部分应用未变为深色
|
||||
#IA6D0B【主题制作工坊】【次要】【全局主题】设置控件圆角主题后,部分控件并未变为所设置的直角
|
||||
#IA6OA5【主题制作工坊】【次要】【图标主题】系统桌面界面有一个图标名称未汉化
|
||||
* 需求号:无
|
||||
* 其他改动说明:无
|
||||
* 其他改动说明影响域:无
|
||||
|
||||
-- 李柯 <like1@kylinos.cn> Tue, 18 Jun 2024 14:19:41 +0800
|
||||
|
||||
kylin-theme-builder (1.0.0.1-ok2.4) nile; urgency=medium
|
||||
|
||||
* BUG:
|
||||
|
|
|
@ -5,7 +5,7 @@ void build::run()
|
|||
//生成源码orig文件
|
||||
QProcess process1;
|
||||
QString dir1 = QDir::homePath() + "/.cache/theme-build/"+FileProcess::g_date;
|
||||
qDebug() << dir1;
|
||||
// qDebug() << dir1;
|
||||
QString command1 = "tar";
|
||||
QStringList arguments1;
|
||||
arguments1 << "-zcvf" << FileProcess::g_themeENName+"_1.0.orig.tar.xz"
|
||||
|
@ -26,7 +26,7 @@ void build::run()
|
|||
//编译
|
||||
QProcess process2;
|
||||
QString dir2 = QDir::homePath() + "/.cache/theme-build/" + FileProcess::g_date + "/src/";
|
||||
qDebug() << dir2;
|
||||
// qDebug() << dir2;
|
||||
QString command2 = "debuild";
|
||||
QStringList arguments2;
|
||||
arguments2 << "-us"<<"-uc";
|
||||
|
|
|
@ -56,7 +56,7 @@ buildWidget::buildWidget(QWidget *parent):
|
|||
continue;
|
||||
}
|
||||
|
||||
qDebug() << "File copied successfully:" << debFile;
|
||||
// qDebug() << "File copied successfully:" << debFile;
|
||||
}
|
||||
//完成返回界面
|
||||
buildResultWidget *m_buildResult = new buildResultWidget();
|
||||
|
|
|
@ -16,7 +16,7 @@ void buildCheckWidget::buildCopy(){
|
|||
|
||||
QString m_debPath = QDir::homePath() + "/.cache/theme-build/" + FileProcess::g_date + "/src";
|
||||
QDir m_debSource = m_debPath +"/debian/source";
|
||||
qDebug()<<m_debSource;
|
||||
// qDebug()<<m_debSource;
|
||||
m_debSource.mkdir(m_debSource.absolutePath());
|
||||
|
||||
if (QFile::copy(m_debSourceFormat,m_debPath+"/debian/source/format") &&
|
||||
|
@ -314,7 +314,7 @@ void buildCheckWidget::buildForIcon(){
|
|||
QTextStream m_iconIndexStream(&m_iconIndex);
|
||||
//写入icon index.theme文件
|
||||
if (m_iconIndex.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {
|
||||
qDebug()<< m_iconIndex;
|
||||
// qDebug()<< m_iconIndex;
|
||||
m_iconIndexStream << QStringLiteral("[Icon Theme]");
|
||||
m_iconIndexStream << endl << QStringLiteral("Name=")+ FileProcess::g_themeENName;
|
||||
m_iconIndexStream << endl << QStringLiteral("Comment=Icon theme for UKUI ,from moka.");
|
||||
|
@ -349,7 +349,7 @@ void buildCheckWidget::buildForIcon(){
|
|||
int length = sizeof(array) / sizeof(array[0]);
|
||||
|
||||
for (int i = 0; i < length; i++) {
|
||||
qDebug()<< m_iconIndex;
|
||||
// qDebug()<< m_iconIndex;
|
||||
m_iconIndexStream << endl << QStringLiteral("[")+QString::number(array[i])+QStringLiteral("x")+QString::number(array[i])+QStringLiteral("/mimetypes]");
|
||||
m_iconIndexStream << endl << QStringLiteral("Context=Mimetypes");
|
||||
m_iconIndexStream << endl << QStringLiteral("Size=")+QString::number(array[i]);
|
||||
|
@ -414,7 +414,7 @@ void buildCheckWidget::buildForIcon(){
|
|||
|
||||
// 遍历QStringList
|
||||
foreach (const QString &m_iconType, m_iconTypeList) {
|
||||
qDebug() << m_iconType;
|
||||
// qDebug() << m_iconType;
|
||||
|
||||
QString m_type;
|
||||
QString m_typeContext;
|
||||
|
@ -459,7 +459,7 @@ void buildCheckWidget::buildForIcon(){
|
|||
int length = sizeof(array) / sizeof(array[0]);
|
||||
|
||||
for (int i = 0; i < length; i++) {
|
||||
qDebug()<< m_iconIndex;
|
||||
// qDebug()<< m_iconIndex;
|
||||
m_iconIndexStream << endl << QStringLiteral("[")+QString::number(array[i])+QStringLiteral("x")+
|
||||
QString::number(array[i])+QStringLiteral("/")+m_type+QStringLiteral("]");
|
||||
m_iconIndexStream << endl << QStringLiteral("Context=")+m_typeContext;
|
||||
|
@ -560,7 +560,7 @@ void buildCheckWidget::buildForCursor(){
|
|||
QFile m_cursorIndex(m_buildcursorThemePath+"/index.theme");
|
||||
QTextStream m_cursorIndexStream(&m_cursorIndex);
|
||||
if (m_cursorIndex.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {
|
||||
qDebug()<< m_cursorIndex;
|
||||
// qDebug()<< m_cursorIndex;
|
||||
m_cursorIndexStream << QStringLiteral("[Icon Theme]");
|
||||
m_cursorIndexStream << endl << QStringLiteral("Name=") + FileProcess::g_themeENName + QStringLiteral("-cursor");
|
||||
m_cursorIndexStream << endl << QStringLiteral("Comment=cursor theme");
|
||||
|
@ -573,7 +573,7 @@ void buildCheckWidget::buildForCursor(){
|
|||
QFile m_cursorTheme(m_buildcursorThemePath+"/cursor.theme");
|
||||
QTextStream m_cursorThemeStream(&m_cursorTheme);
|
||||
if (m_cursorTheme.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {
|
||||
qDebug()<< m_cursorTheme;
|
||||
// qDebug()<< m_cursorTheme;
|
||||
m_cursorThemeStream << QStringLiteral("[Icon Theme]");
|
||||
m_cursorThemeStream << endl << QStringLiteral("Inherits=") + FileProcess::g_themeENName + QStringLiteral("-cursor");
|
||||
m_cursorThemeStream << endl;
|
||||
|
@ -586,7 +586,7 @@ void buildCheckWidget::buildForCursor(){
|
|||
QTextStream m_cursorShellStream(&m_cursorShell);
|
||||
if(!m_cursorShell.exists()){
|
||||
if (m_cursorShell.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) {
|
||||
qDebug()<< m_cursorShell;
|
||||
// qDebug()<< m_cursorShell;
|
||||
m_cursorShellStream << QStringLiteral("#!/bin/bash");
|
||||
m_cursorShellStream << endl << QStringLiteral(" mkdir cursors");
|
||||
|
||||
|
@ -947,7 +947,7 @@ void buildCheckWidget::buildForPlymouth(){
|
|||
QFile m_themeplymouth(m_buildPlymouthPath + FileProcess::g_themeENName+"-logo.plymouth");
|
||||
QTextStream m_themeplymouthStream(&m_themeplymouth);
|
||||
if (m_themeplymouth.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {
|
||||
qDebug()<< m_themeplymouth;
|
||||
// qDebug()<< m_themeplymouth;
|
||||
m_themeplymouthStream << QStringLiteral("[Plymouth Theme]");
|
||||
m_themeplymouthStream << endl << QStringLiteral("Name=My Theme");
|
||||
m_themeplymouthStream << endl << QStringLiteral("Description=This theme is a template to build on");
|
||||
|
@ -1018,7 +1018,7 @@ void buildCheckWidget::buildForGrub(){
|
|||
QTextStream m_grubpostinstStream(&m_postinst);
|
||||
QStringList lines;
|
||||
if (m_postinst.open(QIODevice::ReadWrite | QIODevice::Append | QIODevice::Text)) {
|
||||
qDebug()<< m_postinst;
|
||||
// qDebug()<< m_postinst;
|
||||
//处理多次编译
|
||||
m_grubpostinstStream.seek(0);
|
||||
QStringList linesToRemove; // 用于存储需要移除的行
|
||||
|
@ -1211,11 +1211,11 @@ void buildCheckWidget::buildCheckResult(QDir m_buildPath){
|
|||
|
||||
// 获取目录下的所有文件和目录
|
||||
QFileInfoList fileList = m_buildThemePath.entryInfoList();
|
||||
qDebug()<<fileList;
|
||||
// qDebug()<<fileList;
|
||||
// 遍历文件和目录
|
||||
foreach(const QFileInfo& fileInfo, fileList)
|
||||
{
|
||||
qDebug()<<fileInfo;
|
||||
// qDebug()<<fileInfo;
|
||||
if (fileInfo.isFile()){
|
||||
if(FileCheck::isLegalIconFile(fileInfo.absoluteFilePath())){
|
||||
// cacheIconInfo[fileInfo] = cacheIconInfoID;
|
||||
|
|
|
@ -230,23 +230,29 @@ bool ConfigFileManager::modifyRadiusJson(int radius,QString jsonFilePath)
|
|||
QRegularExpression regexMin(R"("Min_Radius"\s*:\s*{"value"\s*:\s*"\d+"\s*,\s*"type"\s*:\s*"int"\s*})");
|
||||
content.replace(regexMin, "\"Min_Radius\" : {\"value\": \"" + QString::number(radius) + "\", \"type\": \"int\"}");
|
||||
|
||||
qDebug()<<QString::number(radius);
|
||||
// 写回文件
|
||||
if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) {
|
||||
// qDebug()<<QString::number(radius);
|
||||
|
||||
// 写回文件,限制输出行数为最多 927 行
|
||||
if (!file.open(QIODevice::Truncate | QIODevice::WriteOnly | QIODevice::Text)) {
|
||||
qDebug() << "Failed to open file for writing";
|
||||
return false;
|
||||
}
|
||||
|
||||
QTextStream out(&file);
|
||||
out << content;
|
||||
file.close();
|
||||
QStringList lines = content.split("\n");
|
||||
int linesToWrite = qMin(lines.size(), 927); // 取最小值,确保不超过 927 行
|
||||
|
||||
return true;
|
||||
for (int i = 0; i < linesToWrite; ++i) {
|
||||
out << lines[i] << "\n";
|
||||
}
|
||||
|
||||
file.close();
|
||||
|
||||
qDebug() << "Config file updated successfully";
|
||||
emit updateInfo();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* @brief 修改配置文件中的强调色配置
|
||||
*
|
||||
|
@ -747,7 +753,7 @@ void ConfigFileManager::copyPicstoCacheDir(const QString &destinationFilePath, Q
|
|||
}
|
||||
|
||||
if (sourceFile.copy(newFileName)) {
|
||||
qDebug() << "Copied" << destinationFilePath << "to" << newFileName;
|
||||
// qDebug() << "Copied" << destinationFilePath << "to" << newFileName;
|
||||
} else {
|
||||
qDebug() << "Failed to copy" << destinationFilePath << "to" << newFileName;
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@ QStringList FileCheck::isLegalBatchIcon(const QString &filePath, const QMap<QStr
|
|||
|
||||
qDebug() << "Keys in the map:";
|
||||
for (auto it = map->begin(); it != map->end(); ++it) {
|
||||
qDebug() << it.key();
|
||||
// qDebug() << it.key();
|
||||
}
|
||||
|
||||
// 打印在文件夹里存在且在map中的key中存在的文件名
|
||||
|
|
|
@ -66,7 +66,7 @@ void FileProcess::FileCreate(const QString &m_themeType){
|
|||
|
||||
QDateTime currentDateTime = QDateTime::currentDateTime();
|
||||
g_date = currentDateTime.toString("yyyyMMddhhmmss");
|
||||
qDebug()<< g_date;
|
||||
// qDebug()<< g_date;
|
||||
|
||||
//创建新的记录文件目录
|
||||
QString m_themePath = QDir::homePath() + "/.cache/theme-build/" + g_date;
|
||||
|
|
|
@ -300,9 +300,9 @@ void HistoryInfoLoad::getRadius()
|
|||
|
||||
QJsonObject rootObj = jsonDoc.object();
|
||||
QJsonObject radiusObj = rootObj["Radius"].toObject();
|
||||
qDebug() << "Normal_Radius value:" << radiusObj["Normal_Radius"].toObject()["value"];
|
||||
qDebug() << "radiusObj:" << radiusObj;
|
||||
qDebug() << "Normal_Radius value type:" << radiusObj["Normal_Radius"].toObject()["value"].type();
|
||||
// qDebug() << "Normal_Radius value:" << radiusObj["Normal_Radius"].toObject()["value"];
|
||||
// qDebug() << "radiusObj:" << radiusObj;
|
||||
// qDebug() << "Normal_Radius value type:" << radiusObj["Normal_Radius"].toObject()["value"].type();
|
||||
QString normalRadiusValue = radiusObj["Normal_Radius"].toObject()["value"].toString();
|
||||
m_historyInfo.radius = normalRadiusValue.toInt();
|
||||
|
||||
|
@ -470,7 +470,7 @@ void HistoryInfoLoad::getWindowRadius()
|
|||
int windowRadiusValue = lineContent.toInt(&conversionSuccess);
|
||||
if (conversionSuccess) {
|
||||
m_historyInfo.windowradius = windowRadiusValue;
|
||||
qDebug() << "m_historyInfo.windowradius" << windowRadiusValue;
|
||||
// qDebug() << "m_historyInfo.windowradius" << windowRadiusValue;
|
||||
} else {
|
||||
qDebug() << "无法将字符串转换为整数:" << lineContent;
|
||||
}
|
||||
|
@ -486,7 +486,7 @@ void HistoryInfoLoad::getWindowRadius()
|
|||
*/
|
||||
HistoryInfo HistoryInfoLoad::getInfoData()
|
||||
{
|
||||
qDebug()<<m_historyInfo.accentcolor<<m_historyInfo.wallpaperpath<<m_historyInfo.filepath<<m_historyInfo.windowradius<<m_historyInfo.widgetstyle;
|
||||
// qDebug()<<m_historyInfo.accentcolor<<m_historyInfo.wallpaperpath<<m_historyInfo.filepath<<m_historyInfo.windowradius<<m_historyInfo.widgetstyle;
|
||||
return m_historyInfo;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
const QString& key = it.key();
|
||||
bool value = it.value();
|
||||
|
||||
qDebug() << "Key:" << key << "Value:" << value;
|
||||
// qDebug() << "Key:" << key << "Value:" << value;
|
||||
|
||||
// 判断键值是否为 true
|
||||
if (value) {
|
||||
|
@ -100,7 +100,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
const QString& key = it.key();
|
||||
bool value = it.value();
|
||||
|
||||
qDebug() << "Key:" << key << "Value:" << value;
|
||||
// qDebug() << "Key:" << key << "Value:" << value;
|
||||
|
||||
// 判断键值是否为 true
|
||||
if (value) {
|
||||
|
@ -116,7 +116,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
const QString& key = it.key();
|
||||
bool value = it.value();
|
||||
|
||||
qDebug() << "Key:" << key << "Value:" << value;
|
||||
// qDebug() << "Key:" << key << "Value:" << value;
|
||||
|
||||
// 判断键值是否为 true
|
||||
if (value) {
|
||||
|
@ -455,8 +455,8 @@ void MainWindow::onGoHomeClicked()
|
|||
//创建询问是否保存界面
|
||||
cacheConfirmedWidget *m_cacheConfirmedWidget = new cacheConfirmedWidget();
|
||||
m_cacheConfirmedWidget->show();
|
||||
qDebug()<<"grub"<<GrubThemeWidget::g_themeChange<<"ply"<<PlymouthThemeWidget::g_themeChange<<"icon"<<IconThemeWidget::g_themeChange
|
||||
<<"cursor"<<CursorThemeWidget::g_themeChange<<"global"<<GlobalThemeWidget::g_themeChange;
|
||||
// qDebug()<<"grub"<<GrubThemeWidget::g_themeChange<<"ply"<<PlymouthThemeWidget::g_themeChange<<"icon"<<IconThemeWidget::g_themeChange
|
||||
// <<"cursor"<<CursorThemeWidget::g_themeChange<<"global"<<GlobalThemeWidget::g_themeChange;
|
||||
//根据询问界面返回信号处理历史记录
|
||||
connect(m_cacheConfirmedWidget, &cacheConfirmedWidget::cacheClean, this, [=](){
|
||||
m_historywidget->updateHistoryDir();
|
||||
|
|
|
@ -281,7 +281,6 @@ void CursorImageWidget::updateIcon(const QString& widgetName, const QString& new
|
|||
newPixmapItem->setData(0, widgetName);
|
||||
newPixmapItem->setData(1, newFilePath);
|
||||
newPixmapItem->setPos(oldPosition);
|
||||
qDebug()<<"-----------------";
|
||||
} else {
|
||||
qDebug() << "Failed to load image:" << newFilePath;
|
||||
}
|
||||
|
|
|
@ -301,7 +301,6 @@ void CursorThemeWidget::initRightWidget()
|
|||
// 设置widget的默认图标为filePath指定的文件路径
|
||||
widget->setdefaulticon(filePath);
|
||||
widget->setProperty("widgetname",widgetName);
|
||||
qDebug()<<"aaaaaaaaaaaaaaaaaaaaaaa"<<widgetName;
|
||||
QPushButton *line = new QPushButton();
|
||||
line->setDisabled(true);
|
||||
line->setFixedHeight(1);
|
||||
|
@ -531,7 +530,7 @@ void CursorThemeWidget::initBuildWidget()
|
|||
QString widgetName = widget->property("widgetname").toString();
|
||||
QString fileName = QFileInfo(filePath).baseName();
|
||||
if (fileName == widgetName) {
|
||||
qDebug() << "File Path: " << filePath << " contains Widget Name: " << widgetName;
|
||||
// qDebug() << "File Path: " << filePath << " contains Widget Name: " << widgetName;
|
||||
if(FileCheck::isLegalCursorFile(filePath)){
|
||||
|
||||
if(m_customiconpathmap->contains(widgetName)){
|
||||
|
@ -552,7 +551,7 @@ void CursorThemeWidget::initBuildWidget()
|
|||
QString fileName = QFileInfo(filePath).baseName();
|
||||
QString widgetName = widget->property("widgetname").toString();
|
||||
if (fileName == widgetName) {
|
||||
qDebug() << "File Path: " << filePath << " contains Widget Name: " << widgetName;
|
||||
// qDebug() << "File Path: " << filePath << " contains Widget Name: " << widgetName;
|
||||
if(FileCheck::isLegalCursorFile(filePath)){
|
||||
|
||||
if(m_timecustomiconpathmap->contains(widgetName)){
|
||||
|
|
|
@ -443,7 +443,7 @@ void RoundedWidget::setRadius(int radius)
|
|||
void RoundedWidget::setTransparency(int transparency)
|
||||
{
|
||||
m_transparency = transparency / 100.0;
|
||||
qDebug()<<m_transparency;
|
||||
// qDebug()<<m_transparency;
|
||||
// update();
|
||||
}
|
||||
|
||||
|
@ -629,7 +629,7 @@ void EditButton::dropEvent(QDropEvent *event)
|
|||
if (mimeData->hasUrls()) {
|
||||
QList<QUrl> urlList = mimeData->urls();
|
||||
for (const QUrl &url : urlList) {
|
||||
qDebug() << "File path:" << url.toLocalFile();
|
||||
// qDebug() << "File path:" << url.toLocalFile();
|
||||
|
||||
bool islegal = FileCheck::isLegalWallPaperFile(url.toLocalFile(),m_type);
|
||||
if(islegal){
|
||||
|
@ -722,7 +722,7 @@ void addPicWidget::dropEvent(QDropEvent *event)
|
|||
|
||||
QList<QUrl> urlList = mimeData->urls();
|
||||
for (const QUrl &url : urlList) {
|
||||
qDebug() << "File path:" << url.toLocalFile();
|
||||
// qDebug() << "File path:" << url.toLocalFile();
|
||||
bool islegal = FileCheck::isLegalWallPaperFile(url.toLocalFile(),m_type);
|
||||
if(islegal){
|
||||
//发信号给widget,换图标
|
||||
|
|
|
@ -617,9 +617,9 @@ void GlobalThemeWidget::initAccentColorWidget()
|
|||
|
||||
QColor selectedColor = m_combobox->itemData(index).value<QColor>();
|
||||
|
||||
qDebug() << "Selected color:" << selectedColor;
|
||||
// qDebug() << "Selected color:" << selectedColor;
|
||||
|
||||
qDebug() << "RGB values:" << selectedColor.red() << selectedColor.green() << selectedColor.blue();
|
||||
// qDebug() << "RGB values:" << selectedColor.red() << selectedColor.green() << selectedColor.blue();
|
||||
m_preview->updatescale();
|
||||
m_preview->updateButtonColor(selectedColor);
|
||||
emit newAccentColor(selectedColor);
|
||||
|
|
|
@ -292,7 +292,7 @@ void GrubEditButton::dropEvent(QDropEvent *event)
|
|||
if (mimeData->hasUrls()) {
|
||||
QList<QUrl> urlList = mimeData->urls();
|
||||
for (const QUrl &url : urlList) {
|
||||
qDebug() << "File path:" << url.toLocalFile();
|
||||
// qDebug() << "File path:" << url.toLocalFile();
|
||||
|
||||
bool islegal = FileCheck::isLegalWallPaperFile(url.toLocalFile(),"grub");
|
||||
if(islegal){
|
||||
|
@ -363,7 +363,7 @@ void grubAddPicWidget::dropEvent(QDropEvent *event)
|
|||
|
||||
QList<QUrl> urlList = mimeData->urls();
|
||||
for (const QUrl &url : urlList) {
|
||||
qDebug() << "File path:" << url.toLocalFile();
|
||||
// qDebug() << "File path:" << url.toLocalFile();
|
||||
bool islegal = FileCheck::isLegalWallPaperFile(url.toLocalFile(),"grub");
|
||||
if(islegal){
|
||||
//发信号给widget,换图标
|
||||
|
|
|
@ -68,7 +68,7 @@ HistoryWidget::HistoryWidget(QWidget *parent) : QWidget(parent)
|
|||
QDateTime folderDateTime = QDateTime::fromString(yearStr + monthStr + dayStr + hourStr + minuteStr + secondStr, "yyyyMMddhhmmss");
|
||||
|
||||
if (folderDateTime.isValid() && folderDateTime.daysTo(currentDate) <= 30) {
|
||||
qDebug() << "Processing folder: " << folder;
|
||||
// qDebug() << "Processing folder: " << folder;
|
||||
validFolders.prepend(folder);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -433,7 +433,7 @@ void IconThemeWidget::initSystemEditWidget()
|
|||
clickedWidget->setcustomicon(newFilePath);
|
||||
|
||||
// 输出选择的文件路径和对应的widgetName。
|
||||
qDebug() << "Selected file path:" << newFilePath<< "Corresponding widgetName:" << widgetName;
|
||||
// qDebug() << "Selected file path:" << newFilePath<< "Corresponding widgetName:" << widgetName;
|
||||
// 更新系统预览图标的显示。
|
||||
m_systempreview->updateIcon(widgetName, newFilePath);
|
||||
}
|
||||
|
@ -522,7 +522,7 @@ void IconThemeWidget::initPlaceandDeviceEditWidget()
|
|||
m_placescustomiconpathmap->insert(widgetName, newFilePath);
|
||||
clickedWidget->setcustomicon(newFilePath);
|
||||
|
||||
qDebug() << "Selected file path:" << newFilePath<< "Corresponding widgetName:" << widgetName;
|
||||
// qDebug() << "Selected file path:" << newFilePath<< "Corresponding widgetName:" << widgetName;
|
||||
m_placepreview->updateIcon(widgetName, newFilePath);
|
||||
}
|
||||
}
|
||||
|
@ -595,7 +595,7 @@ void IconThemeWidget::initPlaceandDeviceEditWidget()
|
|||
if(FileCheck::isLegalIconFile(newFilePath)){
|
||||
m_devicescustomiconpathmap->insert(widgetName, newFilePath);
|
||||
clickedWidget->setcustomicon(newFilePath);
|
||||
qDebug() << "Selected file path:" << newFilePath<< "Corresponding widgetName:" << widgetName;
|
||||
// qDebug() << "Selected file path:" << newFilePath<< "Corresponding widgetName:" << widgetName;
|
||||
|
||||
// m_placepreview->updateIcon(widgetName, newFilePath);
|
||||
}
|
||||
|
@ -697,7 +697,7 @@ void IconThemeWidget::initBatchEditWidget()
|
|||
QString fileName = QFileInfo(filePath).baseName();
|
||||
QString widgetName = widget->property("widgetname").toString();
|
||||
if (fileName == widgetName) {
|
||||
qDebug() << "File Path: " << filePath << " contains Widget Name: " << widgetName;
|
||||
// qDebug() << "File Path: " << filePath << " contains Widget Name: " << widgetName;
|
||||
if(FileCheck::isLegalIconFile(filePath)){
|
||||
if(m_stackedwidget->currentIndex() == 0){
|
||||
m_customiconpathmap->insert(widgetName, filePath);
|
||||
|
@ -737,7 +737,7 @@ void IconThemeWidget::initBatchEditWidget()
|
|||
for (IconEditWidget *widget : childWidgets) {
|
||||
QString widgetName = widget->property("widgetname").toString();
|
||||
if (fileName == widgetName) {
|
||||
qDebug() << "File Path: " << filePath << " contains Widget Name: " << widgetName;
|
||||
// qDebug() << "File Path: " << filePath << " contains Widget Name: " << widgetName;
|
||||
if(FileCheck::isLegalIconFile(filePath)){
|
||||
if(m_stackedwidget->currentIndex() == 2){
|
||||
m_devicescustomiconpathmap->insert(widgetName, filePath);
|
||||
|
|
|
@ -487,13 +487,13 @@ void ImageWidget::updateIcon(const QString& widgetName, const QString& newFilePa
|
|||
{
|
||||
QGraphicsScene* scene = graphicsView->scene();
|
||||
QList<QGraphicsItem*> items = scene->items();
|
||||
for (int i = 0; i < items.size(); ++i) {
|
||||
QGraphicsItem* item = items.at(i);
|
||||
// 输出item的内容,例如位置和类型等信息
|
||||
qDebug() << "Item" << i << ":"
|
||||
<< "Position:" << item->pos()
|
||||
<< "Type:" << item->type();
|
||||
}
|
||||
// for (int i = 0; i < items.size(); ++i) {
|
||||
// QGraphicsItem* item = items.at(i);
|
||||
// // 输出item的内容,例如位置和类型等信息
|
||||
// qDebug() << "Item" << i << ":"
|
||||
// << "Position:" << item->pos()
|
||||
// << "Type:" << item->type();
|
||||
// }
|
||||
// 遍历所有的图形项
|
||||
for (QGraphicsItem* item : items) {
|
||||
// 尝试将当前图形项转换为图形位图项
|
||||
|
@ -913,7 +913,7 @@ void DropButton::dropEvent(QDropEvent *event)
|
|||
if (mimeData->hasUrls()) {
|
||||
QList<QUrl> urlList = mimeData->urls();
|
||||
for (const QUrl &url : urlList) {
|
||||
qDebug() << "File path:" << url.toLocalFile();
|
||||
// qDebug() << "File path:" << url.toLocalFile();
|
||||
bool islegal = FileCheck::isLegalIconFile(url.toLocalFile());
|
||||
if(islegal){
|
||||
//发信号给widget,换图标
|
||||
|
@ -977,7 +977,7 @@ void addIconWidget::dropEvent(QDropEvent *event)
|
|||
if (mimeData->hasUrls()) {
|
||||
QList<QUrl> urlList = mimeData->urls();
|
||||
for (const QUrl &url : urlList) {
|
||||
qDebug() << "File path:" << url.toLocalFile();
|
||||
// qDebug() << "File path:" << url.toLocalFile();
|
||||
bool islegal = FileCheck::isLegalIconFile(url.toLocalFile());
|
||||
if(islegal){
|
||||
//发信号给widget,换图标
|
||||
|
|
|
@ -458,13 +458,13 @@ void InfoCreateWidget::renameDesktop()
|
|||
|
||||
void InfoCreateWidget::createControlChangelog(const QString &m_date){
|
||||
//点击生成制作主题包按钮时,m_date将设为空
|
||||
qDebug()<<m_date;
|
||||
// qDebug()<<m_date;
|
||||
if(m_date != nullptr){
|
||||
QFile m_control(QDir::homePath() + "/.cache/theme-build/" + m_date + "/src/debian/control");
|
||||
|
||||
if (m_control.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {
|
||||
|
||||
qDebug()<< m_control;
|
||||
// qDebug()<< m_control;
|
||||
QTextStream m_controlStream(&m_control);
|
||||
m_controlStream << QStringLiteral("Source: ") + FileProcess::g_themeENName;
|
||||
m_controlStream << endl << QStringLiteral("Section: misc");
|
||||
|
@ -499,13 +499,13 @@ void InfoCreateWidget::createControlChangelog(const QString &m_date){
|
|||
//创建meson相关文件
|
||||
void InfoCreateWidget::createMeson(const QString &m_date){
|
||||
//点击生成制作主题包按钮时,m_date将设为空
|
||||
qDebug()<<m_date;
|
||||
// qDebug()<<m_date;
|
||||
if(m_date != nullptr){
|
||||
QFile m_meson(QDir::homePath() + "/.cache/theme-build/" + m_date + "/src/meson.build");
|
||||
|
||||
if (m_meson.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {
|
||||
|
||||
qDebug()<< m_meson;
|
||||
// qDebug()<< m_meson;
|
||||
QTextStream m_mesonStream(&m_meson);
|
||||
m_mesonStream << QStringLiteral("project('")+ FileProcess::g_themeENName +QStringLiteral("','c',default_options: ['prefix=/usr/'])");
|
||||
m_mesonStream << endl << QStringLiteral("components_d = ['globalTheme', 'iconTheme', 'cursorTheme','plymouthTheme','grubTheme','setupConfig','application']");
|
||||
|
|
|
@ -49,7 +49,7 @@ PlymouthImageWidget::PlymouthImageWidget(QWidget *parent)
|
|||
QPixmap pixmap(":/resource/plymouth/1.png");
|
||||
pixmapItem = new QGraphicsPixmapItem(pixmaps.first());
|
||||
qreal x = (scene->width() - pixmap.width()) / 2;
|
||||
qDebug()<<"x= "<<x<<"scene->width()"<<scene->width()<<" pixmap.width()" << pixmap.width();
|
||||
// qDebug()<<"x= "<<x<<"scene->width()"<<scene->width()<<" pixmap.width()" << pixmap.width();
|
||||
qreal y = (scene->height() - pixmap.height()) / 2;
|
||||
sceneWidth = scene->width();
|
||||
sceneHeight = scene->height();
|
||||
|
|
|
@ -263,27 +263,27 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="752"/>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="743"/>
|
||||
<source>Window fillet</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="756"/>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="747"/>
|
||||
<source>Large</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="757"/>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="748"/>
|
||||
<source>Medium</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="758"/>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="749"/>
|
||||
<source>Small</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="789"/>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="780"/>
|
||||
<source>Start Global Theme Building</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -906,62 +906,63 @@
|
|||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="184"/>
|
||||
<location filename="../src/mainwindow.cpp" line="30"/>
|
||||
<location filename="../src/mainwindow.cpp" line="185"/>
|
||||
<source>kylin-theme-builder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="187"/>
|
||||
<location filename="../src/mainwindow.cpp" line="188"/>
|
||||
<source>User guide</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="406"/>
|
||||
<location filename="../src/mainwindow.cpp" line="407"/>
|
||||
<source>Global Theme</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="407"/>
|
||||
<location filename="../src/mainwindow.cpp" line="408"/>
|
||||
<source>Topics include basic styles for windows and controls, icons, cursors, and more!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="409"/>
|
||||
<location filename="../src/mainwindow.cpp" line="410"/>
|
||||
<source>Icon Theme</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="410"/>
|
||||
<location filename="../src/mainwindow.cpp" line="411"/>
|
||||
<source>The icon theme includes multiple application icons and system settings homepage icons.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="412"/>
|
||||
<location filename="../src/mainwindow.cpp" line="413"/>
|
||||
<source>Cursor Theme</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="413"/>
|
||||
<location filename="../src/mainwindow.cpp" line="414"/>
|
||||
<source>Cursor theme for pointer cursor icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="415"/>
|
||||
<location filename="../src/mainwindow.cpp" line="416"/>
|
||||
<source>Plymouth Theme</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="416"/>
|
||||
<location filename="../src/mainwindow.cpp" line="417"/>
|
||||
<source>Boot animation can be customized to boot screen effect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="418"/>
|
||||
<location filename="../src/mainwindow.cpp" line="419"/>
|
||||
<source>GRUB Theme</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="419"/>
|
||||
<location filename="../src/mainwindow.cpp" line="420"/>
|
||||
<source>Modify GRUB background wallpaper</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
Binary file not shown.
|
@ -271,27 +271,27 @@
|
|||
<translation>窗口透明度</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="752"/>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="743"/>
|
||||
<source>Window fillet</source>
|
||||
<translation>窗口圆角</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="756"/>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="747"/>
|
||||
<source>Large</source>
|
||||
<translation>大</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="757"/>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="748"/>
|
||||
<source>Medium</source>
|
||||
<translation>中</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="758"/>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="749"/>
|
||||
<source>Small</source>
|
||||
<translation>小</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="789"/>
|
||||
<location filename="../src/module/globalthemewidget.cpp" line="780"/>
|
||||
<source>Start Global Theme Building</source>
|
||||
<translation>制作全局主题</translation>
|
||||
</message>
|
||||
|
@ -469,7 +469,7 @@
|
|||
<message>
|
||||
<location filename="../src/module/iconwidgetfeature.cpp" line="628"/>
|
||||
<source>folder-dropbox</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>升降箱</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/module/iconwidgetfeature.cpp" line="629"/>
|
||||
|
@ -946,62 +946,63 @@
|
|||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="184"/>
|
||||
<location filename="../src/mainwindow.cpp" line="30"/>
|
||||
<location filename="../src/mainwindow.cpp" line="185"/>
|
||||
<source>kylin-theme-builder</source>
|
||||
<translation>主题制作工坊</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="187"/>
|
||||
<location filename="../src/mainwindow.cpp" line="188"/>
|
||||
<source>User guide</source>
|
||||
<translation>使用指南</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="406"/>
|
||||
<location filename="../src/mainwindow.cpp" line="407"/>
|
||||
<source>Global Theme</source>
|
||||
<translation>全局主题</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="407"/>
|
||||
<location filename="../src/mainwindow.cpp" line="408"/>
|
||||
<source>Topics include basic styles for windows and controls, icons, cursors, and more!</source>
|
||||
<translation>主题包含窗口与控件基础样式、图标、光标等内容</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="409"/>
|
||||
<location filename="../src/mainwindow.cpp" line="410"/>
|
||||
<source>Icon Theme</source>
|
||||
<translation>图标主题</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="410"/>
|
||||
<location filename="../src/mainwindow.cpp" line="411"/>
|
||||
<source>The icon theme includes multiple application icons and system settings homepage icons.</source>
|
||||
<translation>图标主题包含系统自带多个应用图标和系统设置首页图标</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="412"/>
|
||||
<location filename="../src/mainwindow.cpp" line="413"/>
|
||||
<source>Cursor Theme</source>
|
||||
<translation>光标主题</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="413"/>
|
||||
<location filename="../src/mainwindow.cpp" line="414"/>
|
||||
<source>Cursor theme for pointer cursor icon</source>
|
||||
<translation>光标主题为指针光标图标</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="415"/>
|
||||
<location filename="../src/mainwindow.cpp" line="416"/>
|
||||
<source>Plymouth Theme</source>
|
||||
<translation>开机动画</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="416"/>
|
||||
<location filename="../src/mainwindow.cpp" line="417"/>
|
||||
<source>Boot animation can be customized to boot screen effect</source>
|
||||
<translation>开机动画可以自定义开机界面效果</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="418"/>
|
||||
<location filename="../src/mainwindow.cpp" line="419"/>
|
||||
<source>GRUB Theme</source>
|
||||
<translation>GRUB背景</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.cpp" line="419"/>
|
||||
<location filename="../src/mainwindow.cpp" line="420"/>
|
||||
<source>Modify GRUB background wallpaper</source>
|
||||
<translation>修改 GRUB 背景壁纸</translation>
|
||||
</message>
|
||||
|
|
Loading…
Reference in New Issue