mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-29 11:38:52 +02:00
Krita: add haiku iconset, use system colors for ui
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
From 8efae06743f1b685f59847db22a99b3b0edd2eda Mon Sep 17 00:00:00 2001
|
||||
From 2a67d81ba9e9945aafb6c530b27a032cfa803998 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 15 Oct 2020 11:45:23 +1000
|
||||
Subject: Fix haiku build
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 60a5b88..f0c59ad 100644
|
||||
index 3746767..86e3894 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -408,7 +408,7 @@ set_package_properties(Qt5QuickWidgets PROPERTIES
|
||||
@@ -18,7 +18,7 @@ index 60a5b88..f0c59ad 100644
|
||||
find_package(Qt5 ${MIN_QT_VERSION} REQUIRED X11Extras)
|
||||
|
||||
diff --git a/krita/main.cc b/krita/main.cc
|
||||
index c1f492a..5c09734 100644
|
||||
index 3fd1595..898fd49 100644
|
||||
--- a/krita/main.cc
|
||||
+++ b/krita/main.cc
|
||||
@@ -333,6 +333,9 @@ extern "C" int main(int argc, char **argv)
|
||||
@@ -31,7 +31,7 @@ index c1f492a..5c09734 100644
|
||||
#else
|
||||
qputenv("XDG_DATA_DIRS", QFile::encodeName(root + "share"));
|
||||
#endif
|
||||
@@ -472,6 +475,12 @@ extern "C" int main(int argc, char **argv)
|
||||
@@ -495,6 +498,12 @@ extern "C" int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ index c1f492a..5c09734 100644
|
||||
#if defined HAVE_KCRASH
|
||||
KCrash::initialize();
|
||||
#elif defined USE_DRMINGW
|
||||
@@ -627,6 +636,8 @@ extern "C" int main(int argc, char **argv)
|
||||
@@ -650,6 +659,8 @@ extern "C" int main(int argc, char **argv)
|
||||
if (logUsage) {
|
||||
KisUsageLogger::close();
|
||||
}
|
||||
@@ -178,3 +178,167 @@ index db5e216..49b098e 100644
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
From 9d98639fc9b7257e1752ffca5609bcf90e3adcee Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 31 Dec 2020 12:18:11 +1000
|
||||
Subject: Add icons for configure
|
||||
|
||||
|
||||
diff --git a/krita/pics/Breeze-dark/breeze-dark-icons.qrc b/krita/pics/Breeze-dark/breeze-dark-icons.qrc
|
||||
index 22a8f23..9bb0b08 100644
|
||||
--- a/krita/pics/Breeze-dark/breeze-dark-icons.qrc
|
||||
+++ b/krita/pics/Breeze-dark/breeze-dark-icons.qrc
|
||||
@@ -13,7 +13,6 @@
|
||||
<file>dark_arrow-right.svg</file>
|
||||
<file>dark_arrow-up.svg</file>
|
||||
<file>dark_bookmarks.svg</file>
|
||||
- <file alias="dark_configure-shortcuts.svg">dark_applications-system.svg</file>
|
||||
<file>dark_configure.svg</file>
|
||||
<file alias="dark_configure-toolbars.svg">dark_configure.svg</file>
|
||||
<file>dark_dialog-cancel.svg</file>
|
||||
@@ -23,6 +22,7 @@
|
||||
<file>dark_document-edit.svg</file>
|
||||
<file>dark_document-export.svg</file>
|
||||
<file>dark_document-import.svg</file>
|
||||
+ <file>dark_configure-shortcuts.svg</file>
|
||||
<file>dark_document-new.svg</file>
|
||||
<file>dark_document-open-recent.svg</file>
|
||||
<file>dark_document-open.svg</file>
|
||||
diff --git a/krita/pics/Breeze-light/breeze-light-icons.qrc b/krita/pics/Breeze-light/breeze-light-icons.qrc
|
||||
index a7688a6..54f8da1 100644
|
||||
--- a/krita/pics/Breeze-light/breeze-light-icons.qrc
|
||||
+++ b/krita/pics/Breeze-light/breeze-light-icons.qrc
|
||||
@@ -13,7 +13,7 @@
|
||||
<file>light_arrow-right.svg</file>
|
||||
<file>light_arrow-up.svg</file>
|
||||
<file>light_bookmarks.svg</file>
|
||||
- <file alias="light_configure-shortcuts.svg">light_applications-system.svg</file>
|
||||
+ <file>light_configure-shortcuts.svg</file>
|
||||
<file>light_configure.svg</file>
|
||||
<file alias="light_configure-toolbars.svg">light_configure.svg</file>
|
||||
<file>light_dialog-cancel.svg</file>
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
From e29a81e0130e5e17b40c23c027120130d0c9450f Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 31 Dec 2020 12:25:08 +1000
|
||||
Subject: Use configure-shortcuts instead document-export icon
|
||||
|
||||
|
||||
diff --git a/libs/ui/dialogs/kis_dlg_preferences.cc b/libs/ui/dialogs/kis_dlg_preferences.cc
|
||||
index c7a1e9c..8849648 100644
|
||||
--- a/libs/ui/dialogs/kis_dlg_preferences.cc
|
||||
+++ b/libs/ui/dialogs/kis_dlg_preferences.cc
|
||||
@@ -1463,7 +1463,7 @@ KisDlgPreferences::KisDlgPreferences(QWidget* parent, const char* name)
|
||||
page = new KPageWidgetItem(vbox, i18n("Keyboard Shortcuts"));
|
||||
page->setObjectName("shortcuts");
|
||||
page->setHeader(i18n("Shortcuts"));
|
||||
- page->setIcon(KisIconUtils::loadIcon("document-export"));
|
||||
+ page->setIcon(KisIconUtils::loadIcon("configure-shortcuts"));
|
||||
m_pages << page;
|
||||
addPage(page);
|
||||
m_shortcutSettings = new ShortcutSettingsTab(vbox);
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
From 18dc0a9ab3429a1992ae4aca9e9a692c998c915b Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 31 Dec 2020 12:25:28 +1000
|
||||
Subject: Use haiku style
|
||||
|
||||
|
||||
diff --git a/libs/ui/KisApplication.cpp b/libs/ui/KisApplication.cpp
|
||||
index 7bfed5e..13b870b 100644
|
||||
--- a/libs/ui/KisApplication.cpp
|
||||
+++ b/libs/ui/KisApplication.cpp
|
||||
@@ -164,7 +164,7 @@ KisApplication::KisApplication(const QString &key, int &argc, char **argv)
|
||||
setWindowIcon(KisIconUtils::loadIcon("krita"));
|
||||
|
||||
if (qgetenv("KRITA_NO_STYLE_OVERRIDE").isEmpty()) {
|
||||
- QStringList styles = QStringList() << "breeze" << "fusion" << "plastique";
|
||||
+ QStringList styles = QStringList() << "haiku" << "breeze" << "fusion" << "plastique";
|
||||
if (!styles.contains(style()->objectName().toLower())) {
|
||||
Q_FOREACH (const QString & style, styles) {
|
||||
if (!setStyle(style)) {
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
From d6667313dd80d260aa0142499e13fbf65c3b857e Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 31 Dec 2020 14:20:31 +1000
|
||||
Subject: Use system colors
|
||||
|
||||
|
||||
diff --git a/libs/ui/KisMainWindow.cpp b/libs/ui/KisMainWindow.cpp
|
||||
index e1991b2..e72cbaa 100644
|
||||
--- a/libs/ui/KisMainWindow.cpp
|
||||
+++ b/libs/ui/KisMainWindow.cpp
|
||||
@@ -279,9 +279,9 @@ public:
|
||||
KoToolDocker *toolOptionsDocker {0};
|
||||
|
||||
QCloseEvent *deferredClosingEvent {0};
|
||||
-
|
||||
+#ifndef Q_OS_HAIKU
|
||||
Digikam::ThemeManager *themeManager {0};
|
||||
-
|
||||
+#endif
|
||||
QScrollArea *welcomeScroller {0};
|
||||
KisWelcomePageWidget *welcomePage {0};
|
||||
|
||||
@@ -335,8 +335,9 @@ KisMainWindow::KisMainWindow(QUuid uuid)
|
||||
|
||||
d->viewManager = new KisViewManager(this, actionCollection());
|
||||
KConfigGroup group( KSharedConfig::openConfig(), "theme");
|
||||
+#ifndef Q_OS_HAIKU
|
||||
d->themeManager = new Digikam::ThemeManager(group.readEntry("Theme", "Krita dark"), this);
|
||||
-
|
||||
+#endif
|
||||
d->windowStateConfig = KSharedConfig::openConfig()->group("MainWindow");
|
||||
|
||||
setStandardToolBarMenuEnabled(true);
|
||||
@@ -764,8 +765,9 @@ void KisMainWindow::slotThemeChanged()
|
||||
{
|
||||
// save theme changes instantly
|
||||
KConfigGroup group( KSharedConfig::openConfig(), "theme");
|
||||
+#ifndef Q_OS_HAIKU
|
||||
group.writeEntry("Theme", d->themeManager->currentThemeName());
|
||||
-
|
||||
+#endif
|
||||
// reload action icons!
|
||||
Q_FOREACH (QAction *action, actionCollection()->actions()) {
|
||||
KisIconUtils::updateIcon(action);
|
||||
@@ -2549,7 +2551,9 @@ void KisMainWindow::configChanged()
|
||||
#endif
|
||||
|
||||
KConfigGroup group( KSharedConfig::openConfig(), "theme");
|
||||
+#ifndef Q_OS_HAIKU
|
||||
d->themeManager->setCurrentTheme(group.readEntry("Theme", "Krita dark"));
|
||||
+#endif
|
||||
d->actionManager()->updateGUI();
|
||||
|
||||
QString s = cfg.getMDIBackgroundColor();
|
||||
@@ -2750,14 +2754,14 @@ void KisMainWindow::createActions()
|
||||
d->showDocumentInfo = actionManager->createAction("file_documentinfo");
|
||||
connect(d->showDocumentInfo, SIGNAL(triggered(bool)), this, SLOT(slotDocumentInfo()));
|
||||
|
||||
-
|
||||
+#ifndef Q_OS_HAIKU
|
||||
d->themeManager->setThemeMenuAction(new KActionMenu(i18nc("@action:inmenu", "&Themes"), this));
|
||||
d->themeManager->registerThemeActions(actionCollection());
|
||||
connect(d->themeManager, SIGNAL(signalThemeChanged()), this, SLOT(slotThemeChanged()));
|
||||
|
||||
|
||||
connect(d->themeManager, SIGNAL(signalThemeChanged()), d->welcomePage, SLOT(slotUpdateThemeColors()));
|
||||
-
|
||||
+#endif
|
||||
d->toggleDockers = actionManager->createAction("view_toggledockers");
|
||||
KisConfig(true).showDockers(true);
|
||||
d->toggleDockers->setChecked(true);
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user