!44 add plymouth grub module

Merge pull request !44 from KevinDuan/openkylin/nile
This commit is contained in:
likehomedream 2023-11-09 07:19:55 +00:00 committed by Gitee
commit c392841905
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 40 additions and 4 deletions

View File

@ -78,6 +78,8 @@ QString FileProcess::FileCreate(const QString &m_themeType){
QDir systemiconPath = m_builderPathSrc + "/iconTheme" + "/systemicon";
QDir cursorIconPath = m_builderPathSrc + "/cursorTheme" + "/cursor";
QDir timecursorPath = m_builderPathSrc + "/cursorTheme" + "/timecursor";
QDir plymouthPath = m_builderPathSrc+ "/plymouthTheme";
QDir grubPath = m_builderPathSrc+ "/grubTheme";
if(m_themeType == "globalTheme"){
iconPath.mkdir(iconPath.absolutePath());
@ -86,6 +88,8 @@ QString FileProcess::FileCreate(const QString &m_themeType){
systemiconPath.mkdir(systemiconPath.absolutePath());
cursorIconPath.mkdir(cursorIconPath.absolutePath());
timecursorPath.mkdir(timecursorPath.absolutePath());
plymouthPath.mkdir(plymouthPath.absolutePath());
grubPath.mkdir(grubPath.absolutePath());
} else if (m_themeType == "iconTheme"){
iconPath.mkdir(iconPath.absolutePath());
@ -97,6 +101,12 @@ QString FileProcess::FileCreate(const QString &m_themeType){
cursorIconPath.mkdir(cursorIconPath.absolutePath());
timecursorPath.mkdir(timecursorPath.absolutePath());
} else if (m_themeType == "plymouthTheme"){
plymouthPath.mkdir(cursorPath.absolutePath());
} else if (m_themeType == "grubTheme"){
grubPath.mkdir(cursorPath.absolutePath());
}
FileProcess::g_createThemeType = m_themeType;

View File

@ -165,25 +165,37 @@ void MainInterface::initLeftBar()
void MainInterface::setGlobalTheme()
{
m_themestackedwidget->setCurrentIndex(0);
m_globalbtn->setHidden(false);
m_globalbtn->setChecked(true);
m_globalbtn->setHidden(false);
m_iconbtn->setHidden(false);
m_cursorbtn->setHidden(false);
m_plymouthbtn->setHidden(false);
m_grubbtn->setHidden(false);
FileProcess::g_createThemeType = "globalTheme";
}
void MainInterface::setIconTheme()
{
m_themestackedwidget->setCurrentIndex(1);
m_globalbtn->setHidden(true);
m_iconbtn->setHidden(false);
m_iconbtn->setChecked(true);
m_globalbtn->setEnabled(false);
m_cursorbtn->setEnabled(false);
m_cursorbtn->setHidden(true);
m_plymouthbtn->setHidden(true);
m_grubbtn->setHidden(true);
FileProcess::g_createThemeType = "iconTheme";
}
void MainInterface::setCursorTheme()
{
m_themestackedwidget->setCurrentIndex(2);
m_globalbtn->setHidden(true);
m_iconbtn->setHidden(true);
m_cursorbtn->setHidden(false);
m_cursorbtn->setChecked(true);
m_globalbtn->setEnabled(false);
m_iconbtn->setEnabled(false);
m_plymouthbtn->setHidden(true);
m_grubbtn->setHidden(true);
FileProcess::g_createThemeType = "cursorTheme";
}
@ -191,13 +203,25 @@ void MainInterface::setCursorTheme()
void MainInterface::setPlymouthTheme()
{
m_themestackedwidget->setCurrentIndex(3);
m_globalbtn->setHidden(true);
m_iconbtn->setHidden(true);
m_cursorbtn->setHidden(true);
m_plymouthbtn->setHidden(false);
m_plymouthbtn->setChecked(true);
m_grubbtn->setHidden(true);
FileProcess::g_createThemeType = "plymouthTheme";
}
void MainInterface::setGrubTheme()
{
m_themestackedwidget->setCurrentIndex(4);
m_globalbtn->setHidden(true);
m_iconbtn->setHidden(true);
m_cursorbtn->setHidden(true);
m_plymouthbtn->setHidden(true);
m_grubbtn->setHidden(false);
m_grubbtn->setChecked(true);
FileProcess::g_createThemeType = "grubTheme";
}
void MainInterface::getThemeInfo(const HistoryInfo &InfoData)

View File

@ -144,6 +144,8 @@ void MainWindow::initUI()
InfoCreateWidget* m_infoCreateWidget = new InfoCreateWidget(nullptr, m_fileProcess.FileCreate("globalTheme"), "recognise");
m_infoCreateWidget->show();
m_bridge->createFileManager(false,FileProcess::g_date);
m_bridge->updateIconCache(m_maininterface->getAppIconsMap(),"appicon");
m_bridge->updateIconCache(m_maininterface->getSystemIconsMap(),"systemicon");
} else if (button == m_iconbtn) {
m_maininterface->setIconTheme();
InfoCreateWidget* m_infoCreateWidget = new InfoCreateWidget(nullptr, m_fileProcess.FileCreate("iconTheme"), "recognise");