diff --git a/CMakeLists.txt b/CMakeLists.txt index ad3a32c2..8c01799c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -587,6 +587,8 @@ endforeach() set(MULTIMC_QRCS resources/backgrounds/backgrounds.qrc resources/multimc/multimc.qrc + resources/pe_dark/pe_dark.qrc + resources/pe_light/pe_light.qrc resources/instances/instances.qrc ) diff --git a/MultiMC.cpp b/MultiMC.cpp index 41c81b7b..358d15fb 100644 --- a/MultiMC.cpp +++ b/MultiMC.cpp @@ -348,6 +348,7 @@ void MultiMC::initGlobalSettings() // Updates m_settings->registerSetting("UpdateChannel", BuildConfig.VERSION_CHANNEL); m_settings->registerSetting("AutoUpdate", true); + m_settings->registerSetting("IconTheme", QString("multimc")); // Notifications m_settings->registerSetting("ShownNotifications", QString()); diff --git a/gui/MainWindow.ui b/gui/MainWindow.ui index b4ae3441..47789449 100644 --- a/gui/MainWindow.ui +++ b/gui/MainWindow.ui @@ -558,6 +558,8 @@ + + diff --git a/gui/dialogs/SettingsDialog.cpp b/gui/dialogs/SettingsDialog.cpp index 2dd19077..4229ea91 100644 --- a/gui/dialogs/SettingsDialog.cpp +++ b/gui/dialogs/SettingsDialog.cpp @@ -316,7 +316,20 @@ void SettingsDialog::applySettings(SettingsObject *s) // Updates s->set("AutoUpdate", ui->autoUpdateCheckBox->isChecked()); s->set("UpdateChannel", m_currentUpdateChannel); - + //FIXME: make generic + switch (ui->themeComboBox->currentIndex()) + { + case 1: + s->set("IconTheme", "pe_dark"); + break; + case 2: + s->set("IconTheme", "pe_light"); + break; + case 0: + default: + s->set("IconTheme", "multimc"); + break; + } // FTB s->set("TrackFTBInstances", ui->trackFtbBox->isChecked()); s->set("FTBLauncherRoot", ui->ftbLauncherBox->text()); @@ -419,7 +432,20 @@ void SettingsDialog::loadSettings(SettingsObject *s) // Updates ui->autoUpdateCheckBox->setChecked(s->get("AutoUpdate").toBool()); m_currentUpdateChannel = s->get("UpdateChannel").toString(); - + //FIXME: make generic + auto theme = s->get("IconTheme").toString(); + if (theme == "pe_dark") + { + ui->themeComboBox->setCurrentIndex(1); + } + else if (theme == "pe_light") + { + ui->themeComboBox->setCurrentIndex(2); + } + else + { + ui->themeComboBox->setCurrentIndex(0); + } // FTB ui->trackFtbBox->setChecked(s->get("TrackFTBInstances").toBool()); ui->ftbLauncherBox->setText(s->get("FTBLauncherRoot").toString()); diff --git a/gui/dialogs/SettingsDialog.ui b/gui/dialogs/SettingsDialog.ui index 74ed68d2..d4e90302 100644 --- a/gui/dialogs/SettingsDialog.ui +++ b/gui/dialogs/SettingsDialog.ui @@ -20,7 +20,7 @@ Settings - + :/icons/toolbar/settings:/icons/toolbar/settings @@ -326,6 +326,43 @@ + + + + Icon Theme + + + + + + + 0 + 0 + + + + Qt::StrongFocus + + + + Default + + + + + Simple + + + + + Simple (Light Icons) + + + + + + + diff --git a/main.cpp b/main.cpp index 181d7299..25cfb153 100644 --- a/main.cpp +++ b/main.cpp @@ -4,7 +4,7 @@ int main_gui(MultiMC &app) { // show main window - QIcon::setThemeName("multimc"); + QIcon::setThemeName(MMC->settings()->get("IconTheme").toString()); MainWindow mainWin; mainWin.restoreState(QByteArray::fromBase64(MMC->settings()->get("MainWindowState").toByteArray())); mainWin.restoreGeometry(QByteArray::fromBase64(MMC->settings()->get("MainWindowGeometry").toByteArray())); @@ -22,6 +22,8 @@ int main(int argc, char *argv[]) Q_INIT_RESOURCE(instances); Q_INIT_RESOURCE(multimc); Q_INIT_RESOURCE(backgrounds); + Q_INIT_RESOURCE(pe_dark); + Q_INIT_RESOURCE(pe_light); switch (app.status()) { diff --git a/resources/pe_dark/16x16/status-bad.png b/resources/pe_dark/16x16/status-bad.png new file mode 100644 index 00000000..0187b990 Binary files /dev/null and b/resources/pe_dark/16x16/status-bad.png differ diff --git a/resources/pe_dark/16x16/status-good.png b/resources/pe_dark/16x16/status-good.png new file mode 100644 index 00000000..661405db Binary files /dev/null and b/resources/pe_dark/16x16/status-good.png differ diff --git a/resources/pe_dark/22x22/status-bad.png b/resources/pe_dark/22x22/status-bad.png new file mode 100644 index 00000000..7b6e9bcb Binary files /dev/null and b/resources/pe_dark/22x22/status-bad.png differ diff --git a/resources/pe_dark/22x22/status-good.png b/resources/pe_dark/22x22/status-good.png new file mode 100644 index 00000000..3da59106 Binary files /dev/null and b/resources/pe_dark/22x22/status-good.png differ diff --git a/resources/pe_dark/24x24/status-bad.png b/resources/pe_dark/24x24/status-bad.png new file mode 100644 index 00000000..bef1e5a3 Binary files /dev/null and b/resources/pe_dark/24x24/status-bad.png differ diff --git a/resources/pe_dark/24x24/status-good.png b/resources/pe_dark/24x24/status-good.png new file mode 100644 index 00000000..2b55aeae Binary files /dev/null and b/resources/pe_dark/24x24/status-good.png differ diff --git a/resources/pe_dark/32x32/status-bad.png b/resources/pe_dark/32x32/status-bad.png new file mode 100644 index 00000000..fc700e19 Binary files /dev/null and b/resources/pe_dark/32x32/status-bad.png differ diff --git a/resources/pe_dark/32x32/status-good.png b/resources/pe_dark/32x32/status-good.png new file mode 100644 index 00000000..eff50142 Binary files /dev/null and b/resources/pe_dark/32x32/status-good.png differ diff --git a/resources/pe_dark/48x48/status-bad.png b/resources/pe_dark/48x48/status-bad.png new file mode 100644 index 00000000..846ac51d Binary files /dev/null and b/resources/pe_dark/48x48/status-bad.png differ diff --git a/resources/pe_dark/48x48/status-good.png b/resources/pe_dark/48x48/status-good.png new file mode 100644 index 00000000..56574e38 Binary files /dev/null and b/resources/pe_dark/48x48/status-good.png differ diff --git a/resources/pe_dark/64x64/status-bad.png b/resources/pe_dark/64x64/status-bad.png new file mode 100644 index 00000000..b87772cc Binary files /dev/null and b/resources/pe_dark/64x64/status-bad.png differ diff --git a/resources/pe_dark/64x64/status-good.png b/resources/pe_dark/64x64/status-good.png new file mode 100644 index 00000000..afedf8cb Binary files /dev/null and b/resources/pe_dark/64x64/status-good.png differ diff --git a/resources/pe_dark/index.theme b/resources/pe_dark/index.theme new file mode 100644 index 00000000..2768cb50 --- /dev/null +++ b/resources/pe_dark/index.theme @@ -0,0 +1,39 @@ +[Icon Theme] +Name=pe_dark +Comment=Icons by pexner (dark) +Inherits=multimc +Directories=scalable/apps,8x8,16x16,22x22,24x24,32x32,48x48,scalable + +[scalable/apps] +Size=48 +Type=scalable +MinSize=1 +MaxSize=512 +Context=Applications + +[8x8] +Size=8 + +[16x16] +Size=16 + +[22x22] +Size=22 + +[24x24] +Size=24 + +[32x32] +Size=32 + +[48x48] +Size=48 + +[64x64] +Size=64 + +[scalable] +Size=48 +Type=Scalable +MinSize=16 +MaxSize=256 diff --git a/resources/pe_dark/pe_dark.qrc b/resources/pe_dark/pe_dark.qrc new file mode 100644 index 00000000..98823a27 --- /dev/null +++ b/resources/pe_dark/pe_dark.qrc @@ -0,0 +1,57 @@ + + + + index.theme + + scalable/console.svg + + + scalable/console_error.svg + + + scalable/about.svg + + + scalable/bug.svg + + + scalable/patreon.svg + + + scalable/centralmods.svg + + + scalable/checkupdate.svg + + + scalable/copy.svg + + + scalable/new.svg + + + 16x16/status-bad.png + 22x22/status-bad.png + 24x24/status-bad.png + 32x32/status-bad.png + 48x48/status-bad.png + 64x64/status-bad.png + + + 16x16/status-good.png + 22x22/status-good.png + 24x24/status-good.png + 32x32/status-good.png + 48x48/status-good.png + 64x64/status-good.png + + + scalable/refresh.svg + + + scalable/settings.svg + + + scalable/viewfolder.svg + + diff --git a/resources/pe_dark/scalable/about.svg b/resources/pe_dark/scalable/about.svg new file mode 100644 index 00000000..35eb8e87 --- /dev/null +++ b/resources/pe_dark/scalable/about.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/resources/pe_dark/scalable/bug.svg b/resources/pe_dark/scalable/bug.svg new file mode 100644 index 00000000..6f78087f --- /dev/null +++ b/resources/pe_dark/scalable/bug.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/pe_dark/scalable/centralmods.svg b/resources/pe_dark/scalable/centralmods.svg new file mode 100644 index 00000000..7c06f505 --- /dev/null +++ b/resources/pe_dark/scalable/centralmods.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + diff --git a/resources/pe_dark/scalable/checkupdate.svg b/resources/pe_dark/scalable/checkupdate.svg new file mode 100644 index 00000000..59a5ad75 --- /dev/null +++ b/resources/pe_dark/scalable/checkupdate.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/resources/pe_dark/scalable/console.svg b/resources/pe_dark/scalable/console.svg new file mode 100644 index 00000000..ec14ab68 --- /dev/null +++ b/resources/pe_dark/scalable/console.svg @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + MC + + + diff --git a/resources/pe_dark/scalable/console_error.svg b/resources/pe_dark/scalable/console_error.svg new file mode 100644 index 00000000..a71c6b35 --- /dev/null +++ b/resources/pe_dark/scalable/console_error.svg @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/resources/pe_dark/scalable/copy.svg b/resources/pe_dark/scalable/copy.svg new file mode 100644 index 00000000..dc89de43 --- /dev/null +++ b/resources/pe_dark/scalable/copy.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + diff --git a/resources/pe_dark/scalable/new.svg b/resources/pe_dark/scalable/new.svg new file mode 100644 index 00000000..88b9bb34 --- /dev/null +++ b/resources/pe_dark/scalable/new.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/resources/pe_dark/scalable/patreon.svg b/resources/pe_dark/scalable/patreon.svg new file mode 100644 index 00000000..071101eb --- /dev/null +++ b/resources/pe_dark/scalable/patreon.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/resources/pe_dark/scalable/refresh.svg b/resources/pe_dark/scalable/refresh.svg new file mode 100644 index 00000000..1bfcc007 --- /dev/null +++ b/resources/pe_dark/scalable/refresh.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + diff --git a/resources/pe_dark/scalable/settings.svg b/resources/pe_dark/scalable/settings.svg new file mode 100644 index 00000000..1d571214 --- /dev/null +++ b/resources/pe_dark/scalable/settings.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/pe_dark/scalable/viewfolder.svg b/resources/pe_dark/scalable/viewfolder.svg new file mode 100644 index 00000000..f520574a --- /dev/null +++ b/resources/pe_dark/scalable/viewfolder.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + diff --git a/resources/pe_light/16x16/status-bad.png b/resources/pe_light/16x16/status-bad.png new file mode 100644 index 00000000..0187b990 Binary files /dev/null and b/resources/pe_light/16x16/status-bad.png differ diff --git a/resources/pe_light/16x16/status-good.png b/resources/pe_light/16x16/status-good.png new file mode 100644 index 00000000..661405db Binary files /dev/null and b/resources/pe_light/16x16/status-good.png differ diff --git a/resources/pe_light/22x22/status-bad.png b/resources/pe_light/22x22/status-bad.png new file mode 100644 index 00000000..7b6e9bcb Binary files /dev/null and b/resources/pe_light/22x22/status-bad.png differ diff --git a/resources/pe_light/22x22/status-good.png b/resources/pe_light/22x22/status-good.png new file mode 100644 index 00000000..3da59106 Binary files /dev/null and b/resources/pe_light/22x22/status-good.png differ diff --git a/resources/pe_light/24x24/status-bad.png b/resources/pe_light/24x24/status-bad.png new file mode 100644 index 00000000..bef1e5a3 Binary files /dev/null and b/resources/pe_light/24x24/status-bad.png differ diff --git a/resources/pe_light/24x24/status-good.png b/resources/pe_light/24x24/status-good.png new file mode 100644 index 00000000..2b55aeae Binary files /dev/null and b/resources/pe_light/24x24/status-good.png differ diff --git a/resources/pe_light/32x32/status-bad.png b/resources/pe_light/32x32/status-bad.png new file mode 100644 index 00000000..fc700e19 Binary files /dev/null and b/resources/pe_light/32x32/status-bad.png differ diff --git a/resources/pe_light/32x32/status-good.png b/resources/pe_light/32x32/status-good.png new file mode 100644 index 00000000..eff50142 Binary files /dev/null and b/resources/pe_light/32x32/status-good.png differ diff --git a/resources/pe_light/48x48/status-bad.png b/resources/pe_light/48x48/status-bad.png new file mode 100644 index 00000000..846ac51d Binary files /dev/null and b/resources/pe_light/48x48/status-bad.png differ diff --git a/resources/pe_light/48x48/status-good.png b/resources/pe_light/48x48/status-good.png new file mode 100644 index 00000000..56574e38 Binary files /dev/null and b/resources/pe_light/48x48/status-good.png differ diff --git a/resources/pe_light/64x64/status-bad.png b/resources/pe_light/64x64/status-bad.png new file mode 100644 index 00000000..b87772cc Binary files /dev/null and b/resources/pe_light/64x64/status-bad.png differ diff --git a/resources/pe_light/64x64/status-good.png b/resources/pe_light/64x64/status-good.png new file mode 100644 index 00000000..afedf8cb Binary files /dev/null and b/resources/pe_light/64x64/status-good.png differ diff --git a/resources/pe_light/index.theme b/resources/pe_light/index.theme new file mode 100644 index 00000000..a782c2ec --- /dev/null +++ b/resources/pe_light/index.theme @@ -0,0 +1,39 @@ +[Icon Theme] +Name=pe_light +Comment=Icons by pexner (light) +Inherits=multimc +Directories=scalable/apps,8x8,16x16,22x22,24x24,32x32,48x48,scalable + +[scalable/apps] +Size=48 +Type=scalable +MinSize=1 +MaxSize=512 +Context=Applications + +[8x8] +Size=8 + +[16x16] +Size=16 + +[22x22] +Size=22 + +[24x24] +Size=24 + +[32x32] +Size=32 + +[48x48] +Size=48 + +[64x64] +Size=64 + +[scalable] +Size=48 +Type=Scalable +MinSize=16 +MaxSize=256 diff --git a/resources/pe_light/pe_light.qrc b/resources/pe_light/pe_light.qrc new file mode 100644 index 00000000..f1dce837 --- /dev/null +++ b/resources/pe_light/pe_light.qrc @@ -0,0 +1,61 @@ + + + + index.theme + + + scalable/console.svg + + + scalable/console_error.svg + + + scalable/about.svg + + + scalable/bug.svg + + + scalable/patreon.svg + + + scalable/centralmods.svg + + + scalable/checkupdate.svg + + + scalable/copy.svg + + + scalable/new.svg + + + scalable/news.svg + + + 16x16/status-bad.png + 22x22/status-bad.png + 24x24/status-bad.png + 32x32/status-bad.png + 48x48/status-bad.png + 64x64/status-bad.png + + + 16x16/status-good.png + 22x22/status-good.png + 24x24/status-good.png + 32x32/status-good.png + 48x48/status-good.png + 64x64/status-good.png + + + scalable/refresh.svg + + + scalable/settings.svg + + + scalable/viewfolder.svg + + diff --git a/resources/pe_light/scalable/about.svg b/resources/pe_light/scalable/about.svg new file mode 100644 index 00000000..9ee74686 --- /dev/null +++ b/resources/pe_light/scalable/about.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + diff --git a/resources/pe_light/scalable/bug.svg b/resources/pe_light/scalable/bug.svg new file mode 100644 index 00000000..44e6d72a --- /dev/null +++ b/resources/pe_light/scalable/bug.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/pe_light/scalable/centralmods.svg b/resources/pe_light/scalable/centralmods.svg new file mode 100644 index 00000000..fea7660a --- /dev/null +++ b/resources/pe_light/scalable/centralmods.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + diff --git a/resources/pe_light/scalable/checkupdate.svg b/resources/pe_light/scalable/checkupdate.svg new file mode 100644 index 00000000..a9199659 --- /dev/null +++ b/resources/pe_light/scalable/checkupdate.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + diff --git a/resources/pe_light/scalable/console.svg b/resources/pe_light/scalable/console.svg new file mode 100644 index 00000000..ec14ab68 --- /dev/null +++ b/resources/pe_light/scalable/console.svg @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + MC + + + diff --git a/resources/pe_light/scalable/console_error.svg b/resources/pe_light/scalable/console_error.svg new file mode 100644 index 00000000..a71c6b35 --- /dev/null +++ b/resources/pe_light/scalable/console_error.svg @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/resources/pe_light/scalable/copy.svg b/resources/pe_light/scalable/copy.svg new file mode 100644 index 00000000..d8c0fbdc --- /dev/null +++ b/resources/pe_light/scalable/copy.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + diff --git a/resources/pe_light/scalable/new.svg b/resources/pe_light/scalable/new.svg new file mode 100644 index 00000000..2cbd8b92 --- /dev/null +++ b/resources/pe_light/scalable/new.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + diff --git a/resources/pe_light/scalable/news.svg b/resources/pe_light/scalable/news.svg new file mode 100644 index 00000000..67a370df --- /dev/null +++ b/resources/pe_light/scalable/news.svg @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce convallis mauris ullamcorper mauris viverra molestie. Donec ultricies faucibus laoreet. Donec convallis congue neque consequat vehicula. Morbi condimentum tempor nulla et rhoncus. Etiam auctor, augue eu pharetra congue, elit justo lacinia risus, non lacinia est justo sed erat. Ut risus urna, viverra id interdum in, molestie non sem. Morbi leo orci, gravida auctor tempor vel, varius et enim. Nulla sem enim, ultricies vel laoreet ac, semper vel mauris. Ut adipiscing sapien sed leo pretium id vulputate erat gravida. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Cras tempor leo sit amet velit molestie commodo eget tincidunt leo. Cras dictum metus non ante pulvinar pellentesque. Morbi id elit ullamcorper mi vulputate lobortis. Cras ac vehicula felis. Phasellus dictum, tellus at molestie pellentesque, purus purus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce convallis mauris ullamcorper mauris viverra molestie. Donec ultricies faucibus laoreet. Donec convallis congue neque consequat vehicula. Morbi condimentum tempor nulla et rhoncus. Etiam auctor, augue eu pharetra congue, elit justo lacinia risus, non lacinia est justo sed erat. Ut risus urna, + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/pe_light/scalable/patreon.svg b/resources/pe_light/scalable/patreon.svg new file mode 100644 index 00000000..d48289c8 --- /dev/null +++ b/resources/pe_light/scalable/patreon.svg @@ -0,0 +1,83 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/resources/pe_light/scalable/refresh.svg b/resources/pe_light/scalable/refresh.svg new file mode 100644 index 00000000..8d25ea90 --- /dev/null +++ b/resources/pe_light/scalable/refresh.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + diff --git a/resources/pe_light/scalable/settings.svg b/resources/pe_light/scalable/settings.svg new file mode 100644 index 00000000..caa4e75f --- /dev/null +++ b/resources/pe_light/scalable/settings.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/pe_light/scalable/viewfolder.svg b/resources/pe_light/scalable/viewfolder.svg new file mode 100644 index 00000000..3161f61f --- /dev/null +++ b/resources/pe_light/scalable/viewfolder.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + +