From cbe3bc013c6ebc5ad1656aef32f6a6c3186ab8c1 Mon Sep 17 00:00:00 2001
From: SeeLook <seelook@gmail.com>
Date: Fri, 3 Jan 2020 22:07:28 +0100
Subject: [PATCH] [Android] Set teal color as a highlight and better shadow

Qt highlight under Android is always blue,
which doesn't correspond with the OS.
And shadow color seems to be too light
---
 src/main.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index f2874f688..479f59af1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2011-2018 by Tomasz Bojczuk                             *
+ *   Copyright (C) 2011-2020 by Tomasz Bojczuk                             *
  *   seelook@gmail.com                                                     *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -34,6 +34,7 @@
 
 #include <QtWidgets/qapplication.h>
 #include <QtGui/qicon.h>
+#include <QtGui/qpalette.h>
 #include <QtQml/qqmlapplicationengine.h>
 #include <QtQml/qqmlcontext.h>
 #include <QtCore/qtranslator.h>
@@ -122,6 +123,10 @@ int main(int argc, char *argv[])
     auto f = a->font();
 #if defined (Q_OS_ANDROID)
     f.setPixelSize(f.pixelSize() * gl->guiScale());
+    auto pal = qApp->palette();
+    pal.setColor(QPalette::Active, QPalette::Highlight, QColor(0, 128, 128)); // Teal color of highlight for Android
+    pal.setColor(QPalette::Active, QPalette::Shadow, QColor(144, 144, 144)); // Dark gray for shadow
+    qApp->setPalette(pal);
 #else
 //     f.setPixelSize(Tmtr::fingerPixels() * 0.45 * gl->guiScale());
     f.setPointSizeF(f.pointSizeF() * gl->guiScale());
-- 
GitLab