From 1716502eff3e5108f05aba8acbabd5c9287d624c Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Wed, 19 Sep 2018 22:42:26 +0300 Subject: Improvements on the system theme --- src/Utils.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/Utils.cpp') diff --git a/src/Utils.cpp b/src/Utils.cpp index 221f89a0..41be9e08 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -370,3 +370,17 @@ utils::markdownToHtml(const QString &text) return result; } + +QString +utils::linkColor() +{ + QSettings settings; + const auto theme = settings.value("user/theme", "light").toString(); + + if (theme == "light") + return "#0077b5"; + else if (theme == "dark") + return "#38A3D8"; + + return QPalette().color(QPalette::Link).name(); +} -- cgit 1.5.1