1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

feat: add color for links in palette

This commit is contained in:
TriKriSta 2019-02-23 19:40:59 +02:00
parent 9a82d8144f
commit d35dbcc870
7 changed files with 13 additions and 7 deletions

View File

@ -22,6 +22,7 @@
#include "src/widget/tool/recursivesignalblocker.h"
#include "src/net/updatecheck.h"
#include "src/widget/style.h"
#include "src/widget/translator.h"
#include "src/persistence/profile.h"
#include "src/persistence/settings.h"
@ -192,8 +193,8 @@ void AboutForm::onUpdateCheckFailed()
QString AboutForm::createLink(QString path, QString text) const
{
return QString::fromUtf8(
"<a href=\"%1\" style=\"text-decoration: underline; color:#0000ff;\">%2</a>")
.arg(path, text);
"<a href=\"%1\" style=\"text-decoration: underline; color:%2;\">%3</a>")
.arg(path, Style::getColor(Style::Link).name(), text);
}
AboutForm::~AboutForm()

View File

@ -136,7 +136,8 @@ QMap<Style::ColorPalette, QString> Style::aliasColors = {{Green, "green"},
{ThemeMediumDark, "themeMediumDark"},
{ThemeMedium, "themeMedium"},
{ThemeLight, "themeLight"},
{Action, "action"}};
{Action, "action"},
{Link, "link"}};
// stylesheet filename, font -> stylesheet
// QString implicit sharing deduplicates stylesheets rather than constructing a new one each time
@ -397,7 +398,8 @@ void Style::initDictColor()
{"@groundExtra", Style::getColor(Style::GroundExtra).name()},
{"@groundBase", Style::getColor(Style::GroundBase).name()},
{"@orange", Style::getColor(Style::Orange).name()},
{"@action", Style::getColor(Style::Action).name()}};
{"@action", Style::getColor(Style::Action).name()},
{"@link", Style::getColor(Style::Link).name()}};
}
QString Style::getThemePath()

View File

@ -44,7 +44,8 @@ public:
ThemeMediumDark,
ThemeMedium,
ThemeLight,
Action
Action,
Link
};
enum Font

View File

@ -32,6 +32,6 @@ p {
}
a {
color: #d292ff;
color: @link;
font-weight: bold
}

View File

@ -13,3 +13,4 @@ themeMediumDark="#2a2a2a"
themeMedium="#100f0f"
themeLight="#201f1f"
action="#546eff"
link="#d292ff"

View File

@ -31,5 +31,5 @@ p {
}
a {
color: blue;
color: @link;
}

View File

@ -13,3 +13,4 @@ themeMediumDark="#2a2a2a"
themeMedium="#414141"
themeLight="#4e4e4e"
action="#1818FF"
link="#0000ff"