From 98f80641a286588708595bfb4afe3afb7791d6a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Mon, 25 Dec 2017 22:08:42 +0100
Subject: Haiku build fix


diff --git a/ImageLounge/CMakeLists.txt b/ImageLounge/CMakeLists.txt
index 1a31e58..9ee09e5 100644
--- a/ImageLounge/CMakeLists.txt
+++ b/ImageLounge/CMakeLists.txt
@@ -103,7 +103,11 @@ endif()
 
 if (ENABLE_CODE_COV AND CMAKE_COMPILER_IS_GNUCXX)
 	# Codecov
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage")
+	if (HAIKU)
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -g -O0 -fprofile-arcs -ftest-coverage -lexpat")
+	else()
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage")
+	endif()
 endif()
 
 # find Qt
-- 
2.28.0


From 4a5aab3e5451171b91fed7f3c5639930c78c738f Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 9 Jun 2020 12:06:32 +1000
Subject: Change default bgColor


diff --git a/ImageLounge/src/DkCore/DkSettings.cpp b/ImageLounge/src/DkCore/DkSettings.cpp
index e8dee7b..f1a4fbd 100644
--- a/ImageLounge/src/DkCore/DkSettings.cpp
+++ b/ImageLounge/src/DkCore/DkSettings.cpp
@@ -855,8 +855,8 @@ void DkSettings::setToDefaultSettings() {
 	display_p.highlightColor = QColor(0, 204, 255);
 	display_p.hudBgColor = QColor(0, 0, 0, 100);
 	display_p.hudFgdColor = QColor(255, 255, 255);
-	display_p.bgColor = QColor(100, 100, 100, 255);
-	display_p.iconColor = QColor(100,100,100,255);
+	display_p.bgColor = QColor(216, 216, 216, 255);
+	display_p.iconColor = QColor(0, 0, 0, 255);
 	display_p.bgColorFrameless = QColor(0, 0, 0, 180);
 	display_p.thumbSize = 64;
 	display_p.iconSize = 16;
-- 
2.28.0


From d7484c02d3b2477e08138903c6e5400ff4fd668d Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 9 Jun 2020 12:06:48 +1000
Subject: Fix plugins dir


diff --git a/ImageLounge/src/DkCore/DkPluginManager.cpp b/ImageLounge/src/DkCore/DkPluginManager.cpp
index 6d69cfd..01dca69 100644
--- a/ImageLounge/src/DkCore/DkPluginManager.cpp
+++ b/ImageLounge/src/DkCore/DkPluginManager.cpp
@@ -1306,7 +1306,7 @@ void DkPluginManager::createPluginsPath() {
 
 #ifdef WITH_PLUGINS
 	// initialize plugin paths -----------------------------------------
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN) || defined(Q_OS_HAIKU)
 	QDir pluginsDir = QCoreApplication::applicationDirPath() + "/plugins";
 #else
 	QDir pluginsDir = QCoreApplication::applicationDirPath() +  "/../lib/nomacs-plugins/";
-- 
2.28.0


From 91238b4d6d8751e331abb0e7f9708edb3279e179 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 9 Jun 2020 16:38:41 +1000
Subject: Disable colorize icons


diff --git a/ImageLounge/src/DkCore/DkImageStorage.cpp b/ImageLounge/src/DkCore/DkImageStorage.cpp
index 8c2bc05..ac6064f 100644
--- a/ImageLounge/src/DkCore/DkImageStorage.cpp
+++ b/ImageLounge/src/DkCore/DkImageStorage.cpp
@@ -1004,7 +1004,9 @@ cv::Mat DkImage::applyLUT(const cv::Mat& src, const cv::Mat& lut) {
 #endif // WITH_OPENCV
 
 QPixmap DkImage::colorizePixmap(const QPixmap& icon, const QColor& col, float opacity) {
-
+#ifdef __HAIKU__
+	return icon;
+#else
 	if (icon.isNull())
 		return icon;
 
@@ -1019,6 +1021,7 @@ QPixmap DkImage::colorizePixmap(const QPixmap& icon, const QColor& col, float op
 	painter.drawPixmap(glow.rect(), sGlow);
 
 	return glow;
+#endif
 }
 
 QPixmap DkImage::loadIcon(const QString & filePath, const QSize& size, const QColor& col) {
-- 
2.28.0


From 61771756ff5e4a1577824b71ff8413b2de2baa4e Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 9 Jun 2020 16:39:14 +1000
Subject: Use system color for panel background


diff --git a/ImageLounge/src/DkCore/DkSettings.cpp b/ImageLounge/src/DkCore/DkSettings.cpp
index f1a4fbd..de6be1c 100644
--- a/ImageLounge/src/DkCore/DkSettings.cpp
+++ b/ImageLounge/src/DkCore/DkSettings.cpp
@@ -855,7 +855,7 @@ void DkSettings::setToDefaultSettings() {
 	display_p.highlightColor = QColor(0, 204, 255);
 	display_p.hudBgColor = QColor(0, 0, 0, 100);
 	display_p.hudFgdColor = QColor(255, 255, 255);
-	display_p.bgColor = QColor(216, 216, 216, 255);
+	display_p.bgColor = QApplication::palette().color(QPalette::Window);
 	display_p.iconColor = QColor(0, 0, 0, 255);
 	display_p.bgColorFrameless = QColor(0, 0, 0, 180);
 	display_p.thumbSize = 64;
diff --git a/ImageLounge/src/DkGui/DkPreferenceWidgets.cpp b/ImageLounge/src/DkGui/DkPreferenceWidgets.cpp
index 7bd4dd6..794e829 100644
--- a/ImageLounge/src/DkGui/DkPreferenceWidgets.cpp
+++ b/ImageLounge/src/DkGui/DkPreferenceWidgets.cpp
@@ -303,7 +303,7 @@ void DkGeneralPreference::createLayout() {
 	iconColorChooser->setColor(&DkSettingsManager::param().display().iconColor);
 	connect(iconColorChooser, SIGNAL(accepted()), this, SLOT(showRestartLabel()));
 
-	DkColorChooser* bgColorChooser = new DkColorChooser(QColor(100, 100, 100, 255), tr("Background Color"), this);
+	DkColorChooser* bgColorChooser = new DkColorChooser(QWidget::palette().color(QPalette::Window), tr("Background Color"), this);
 	bgColorChooser->setObjectName("backgroundColor");
 	bgColorChooser->setColor(&DkSettingsManager::param().display().bgColor);
 	connect(bgColorChooser, SIGNAL(accepted()), this, SLOT(showRestartLabel()));
-- 
2.28.0


From 5abd3ca15f574bfbf91844c1656c040dd7d06e77 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 9 Jun 2020 16:57:18 +1000
Subject: Set iconSize to 22px by default


diff --git a/ImageLounge/src/DkCore/DkSettings.cpp b/ImageLounge/src/DkCore/DkSettings.cpp
index de6be1c..7cc20be 100644
--- a/ImageLounge/src/DkCore/DkSettings.cpp
+++ b/ImageLounge/src/DkCore/DkSettings.cpp
@@ -859,7 +859,7 @@ void DkSettings::setToDefaultSettings() {
 	display_p.iconColor = QColor(0, 0, 0, 255);
 	display_p.bgColorFrameless = QColor(0, 0, 0, 180);
 	display_p.thumbSize = 64;
-	display_p.iconSize = 16;
+	display_p.iconSize = 22;
 	display_p.thumbPreviewSize = 64;
 	display_p.antiAliasing = true;
 	display_p.highQualityAntiAliasing = false;
-- 
2.28.0

