mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge branch 'pr2363'
This commit is contained in:
commit
aa303b24b3
|
@ -106,7 +106,7 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
|
|||
else
|
||||
bodyUI->styleBrowser->setCurrentText(tr("None"));
|
||||
|
||||
for (QString color : Style::themeColorNames)
|
||||
for (QString color : Style::getThemeColorNames())
|
||||
bodyUI->themeColorCBox->addItem(color);
|
||||
|
||||
bodyUI->themeColorCBox->setCurrentIndex(Settings::getInstance().getThemeColor());
|
||||
|
@ -482,4 +482,12 @@ void GeneralForm::retranslateUi()
|
|||
int proxyType = bodyUI->proxyType->currentIndex();
|
||||
bodyUI->retranslateUi(this);
|
||||
bodyUI->proxyType->setCurrentIndex(proxyType);
|
||||
|
||||
QStringList colorThemes(Style::getThemeColorNames());
|
||||
for (int i = 0; i != colorThemes.size(); ++i)
|
||||
{
|
||||
bodyUI->themeColorCBox->setItemText(i, colorThemes[i]);
|
||||
}
|
||||
|
||||
bodyUI->styleBrowser->setItemText(0, tr("None"));
|
||||
}
|
||||
|
|
|
@ -71,9 +71,12 @@ static QColor palette[] = {
|
|||
|
||||
static QMap<QString, QString> dict;
|
||||
|
||||
QStringList Style::themeColorNames = {QObject::tr("Default"), QObject::tr("Blue"), QObject::tr("Olive"), QObject::tr("Red"), QObject::tr("Violet")};
|
||||
QList<QColor> Style::themeColorColors = {QColor(), QColor("#004aa4"), QColor("#97ba00"), QColor("#c23716"), QColor("#4617b5")};
|
||||
QStringList Style::getThemeColorNames()
|
||||
{
|
||||
return {QObject::tr("Default"), QObject::tr("Blue"), QObject::tr("Olive"), QObject::tr("Red"), QObject::tr("Violet")};
|
||||
}
|
||||
|
||||
QList<QColor> Style::themeColorColors = {QColor(), QColor("#004aa4"), QColor("#97ba00"), QColor("#c23716"), QColor("#4617b5")};
|
||||
|
||||
QString Style::getStylesheet(const QString &filename)
|
||||
{
|
||||
|
|
|
@ -58,6 +58,7 @@ public:
|
|||
SmallLight // [SystemDefault - 2]px, light
|
||||
};
|
||||
|
||||
static QStringList getThemeColorNames();
|
||||
static QString getStylesheet(const QString& filename);
|
||||
static QColor getColor(ColorPalette entry);
|
||||
static QFont getFont(Font font);
|
||||
|
@ -68,7 +69,6 @@ public:
|
|||
static void applyTheme(); ///< Reloads some CCS
|
||||
static QPixmap scaleSvgImage(const QString& path, uint32_t width, uint32_t height);
|
||||
|
||||
static QStringList themeColorNames;
|
||||
static QList<QColor> themeColorColors;
|
||||
|
||||
signals:
|
||||
|
|
Loading…
Reference in New Issue
Block a user