diff --git a/resources/skins/nudus-dark/metadata.xml b/resources/skins/nudus-dark/metadata.xml
index 5bc583041..e47d73fc2 100644
--- a/resources/skins/nudus-dark/metadata.xml
+++ b/resources/skins/nudus-dark/metadata.xml
@@ -1,13 +1,48 @@
-
-
+
+
- akinokonomi
+ akinokonomi, martinrotter
- #85ACF6
- #D9E3F7
- #DF5656
- #910303
- #44AA44
+ #85ACF6
+ #D9E3F7
+ #DF5656
+ #910303
+ #44AA44
-
+ true
+
+
+ #373A3D
+ #323437
+ #2D2F32
+ #202224
+ #292c2e
+ #292c2e
+ #292c2e
+ #323437
+ #8291AD
+
+ #2D2F32
+ #323437
+
+ #D8D8D8
+ #373A3D
+ #FFFFFF
+ #A7A7A7
+ #D8D8D8
+ #E7E7E7
+ #D8D8D8
+ #a1acc1
+ #a1acc1
+
+ #2D2F32
+
+
+
+ #999999
+ #A7A7A7
+ #999999
+
+
+
\ No newline at end of file
diff --git a/resources/skins/nudus-light/metadata.xml b/resources/skins/nudus-light/metadata.xml
index 79c4753dd..6a44037a1 100644
--- a/resources/skins/nudus-light/metadata.xml
+++ b/resources/skins/nudus-light/metadata.xml
@@ -1,13 +1,48 @@
-
-
+
+
- akinokonomi
+ akinokonomi, martinrotter
- #3A6FE4
- #F0F2FC
- #E74343
- #FFD7D7
- #77dd77
+ #3A6FE4
+ #F0F2FC
+ #E74343
+ #FFD7D7
+ #77dd77
-
+ false
+
+
+ #373A3D
+ #323437
+ #2D2F32
+ #202224
+ #292c2e
+ #292c2e
+ #292c2e
+ #323437
+ #8291AD
+
+ #2D2F32
+ #323437
+
+ #D8D8D8
+ #373A3D
+ #FFFFFF
+ #A7A7A7
+ #D8D8D8
+ #E7E7E7
+ #D8D8D8
+ #a1acc1
+ #a1acc1
+
+ #2D2F32
+
+
+
+ #999999
+ #A7A7A7
+ #999999
+
+
+
\ No newline at end of file
diff --git a/src/librssguard/gui/settings/settingsgui.cpp b/src/librssguard/gui/settings/settingsgui.cpp
index 7879fec70..34e73529a 100644
--- a/src/librssguard/gui/settings/settingsgui.cpp
+++ b/src/librssguard/gui/settings/settingsgui.cpp
@@ -28,9 +28,9 @@ SettingsGui::SettingsGui(Settings* settings, QWidget* parent) : SettingsPanel(se
m_ui->m_editorFeedsToolbar->activeItemsWidget()->viewport()->installEventFilter(this);
m_ui->m_editorMessagesToolbar->availableItemsWidget()->viewport()->installEventFilter(this);
m_ui->m_editorFeedsToolbar->availableItemsWidget()->viewport()->installEventFilter(this);
- m_ui->m_treeSkins->setColumnCount(5);
+ m_ui->m_treeSkins->setColumnCount(4);
m_ui->m_treeSkins->setHeaderHidden(false);
- m_ui->m_treeSkins->setHeaderLabels({ tr("Name"), tr("Version"), tr("Author"), tr("Forced style"), tr("Forced alternative palette") });
+ m_ui->m_treeSkins->setHeaderLabels({ tr("Name"), tr("Author"), tr("Forced style"), tr("Forced alternative palette") });
m_ui->m_tabUi->setTabVisible(m_ui->m_tabUi->indexOf(m_ui->m_tabTaskBar),
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) || defined(Q_OS_WIN)
@@ -47,7 +47,6 @@ SettingsGui::SettingsGui(Settings* settings, QWidget* parent) : SettingsPanel(se
m_ui->m_treeSkins->header()->setSectionResizeMode(1, QHeaderView::ResizeMode::ResizeToContents);
m_ui->m_treeSkins->header()->setSectionResizeMode(2, QHeaderView::ResizeMode::ResizeToContents);
m_ui->m_treeSkins->header()->setSectionResizeMode(3, QHeaderView::ResizeMode::ResizeToContents);
- m_ui->m_treeSkins->header()->setSectionResizeMode(4, QHeaderView::ResizeMode::ResizeToContents);
connect(m_ui->m_cmbStyles, &QComboBox::currentTextChanged, this, &SettingsGui::updateSkinOptions);
@@ -125,9 +124,9 @@ void SettingsGui::updateSkinOptions() {
const Skin skin = it->data(0, Qt::ItemDataRole::UserRole).value();
const bool skin_has_palette = !skin.m_stylePalette.isEmpty();
const bool skin_forces_palette = skin.m_forcedStylePalette;
- const bool skin_forces_style = skin.m_forcedStyles.isEmpty();
+ const bool skin_forces_style = !skin.m_forcedStyles.isEmpty();
- m_ui->m_cmbStyles->setEnabled(!qApp->skins()->styleIsFrozen() && skin_forces_style);
+ m_ui->m_cmbStyles->setEnabled(!qApp->skins()->styleIsFrozen() && !skin_forces_style);
m_ui->m_checkForceAlternativePalette->setEnabled(skin_has_palette
? !skin_forces_palette
: qApp->skins()->isStyleGoodForAlternativeStylePalette(m_ui->m_cmbStyles->currentText()));
@@ -204,16 +203,15 @@ void SettingsGui::loadSettings() {
for (const Skin& skin : qAsConst(skins)) {
QTreeWidgetItem* new_item = new QTreeWidgetItem({
skin.m_visibleName,
- skin.m_version,
skin.m_author,
skin.m_forcedStyles.isEmpty() ? QString() : skin.m_forcedStyles.join(QSL(", ")),
QString() });
if (skin.m_forcedStyles.isEmpty()) {
- new_item->setIcon(3, qApp->icons()->fromTheme(QSL("dialog-cancel"), QSL("gtk-cancel")));
+ new_item->setIcon(2, qApp->icons()->fromTheme(QSL("dialog-cancel"), QSL("gtk-cancel")));
}
- new_item->setIcon(4, skin.m_forcedStylePalette
+ new_item->setIcon(3, skin.m_forcedStylePalette
? qApp->icons()->fromTheme(QSL("dialog-yes"), QSL("dialog-ok"))
: qApp->icons()->fromTheme(QSL("dialog-cancel"), QSL("gtk-cancel")));
diff --git a/src/librssguard/gui/settings/settingsgui.ui b/src/librssguard/gui/settings/settingsgui.ui
index b563eabff..d20fb8c13 100644
--- a/src/librssguard/gui/settings/settingsgui.ui
+++ b/src/librssguard/gui/settings/settingsgui.ui
@@ -109,7 +109,7 @@
-
- Force alternative UI colors defined in skin
+ Force UI colors defined in skin
diff --git a/src/librssguard/gui/tabbar.cpp b/src/librssguard/gui/tabbar.cpp
index c33db4c90..84d932c67 100644
--- a/src/librssguard/gui/tabbar.cpp
+++ b/src/librssguard/gui/tabbar.cpp
@@ -11,7 +11,7 @@
#include
TabBar::TabBar(QWidget* parent) : QTabBar(parent) {
- setDocumentMode(true);
+ setDocumentMode(false);
setUsesScrollButtons(true);
setContextMenuPolicy(Qt::ContextMenuPolicy::CustomContextMenu);
}
diff --git a/src/librssguard/miscellaneous/skinfactory.cpp b/src/librssguard/miscellaneous/skinfactory.cpp
index ed7c10701..1fe9ade8d 100644
--- a/src/librssguard/miscellaneous/skinfactory.cpp
+++ b/src/librssguard/miscellaneous/skinfactory.cpp
@@ -85,93 +85,11 @@ void SkinFactory::loadSkinFromData(const Skin& skin) {
m_currentStyle = qApp->style()->objectName();
if (isStyleGoodForAlternativeStylePalette(m_currentStyle) &&
-
- /* Skin has alternative style palette and forces its usage. */
- ((!skin.m_stylePalette.isEmpty() && skin.m_forcedStylePalette) ||
-
- /* User wants alternative style palette anyway. */
- qApp->settings()->value(GROUP(GUI), SETTING(GUI::ForceDarkFusion)).toBool())) {
+ !skin.m_stylePalette.isEmpty() &&
+ (skin.m_forcedStylePalette || qApp->settings()->value(GROUP(GUI), SETTING(GUI::ForceDarkFusion)).toBool())) {
qDebugNN << LOGSEC_GUI << "Activating alternative palette.";
- QPalette pal;
-
- if (skin.m_stylePalette.isEmpty()) {
- QColor clr_maibg(QSL("#2D2F32"));
- QColor clr_basbg(QSL("#373A3D"));
- QColor clr_altbg(QSL("#323437"));
- QColor clr_selbg(QSL("#8291AD"));
- QColor clr_selfg(QSL("#FFFFFF"));
- QColor clr_btnfg(QSL("#E7E7E7"));
- QColor clr_dibfg(QSL("#A7A7A7"));
- QColor clr_winfg(QSL("#D8D8D8"));
- QColor clr_diwfg(QSL("#999999"));
- QColor clr_brdbg(QSL("#202224")); // Use color picker on dark brdr under list header for this one
- QColor clr_wlink(QSL("#a1acc1"));
-
- //
- // Normal state.
- //
-
- // Backgrounds & bases.
- pal.setColor(QPalette::ColorRole::Window, clr_maibg);
- pal.setColor(QPalette::ColorRole::Base, clr_basbg);
- pal.setColor(QPalette::ColorRole::Dark, clr_brdbg);
- pal.setColor(QPalette::ColorRole::AlternateBase, clr_altbg);
- pal.setColor(QPalette::ColorRole::Button, clr_altbg);
- pal.setColor(QPalette::ColorRole::Light, clr_altbg);
- pal.setColor(QPalette::ColorRole::Highlight, clr_selbg);
-
- // Texts.
- pal.setColor(QPalette::ColorRole::ButtonText, clr_btnfg);
- pal.setColor(QPalette::ColorRole::WindowText, clr_winfg);
- pal.setColor(QPalette::ColorRole::BrightText, clr_basbg);
- pal.setColor(QPalette::ColorRole::Text, clr_winfg);
- pal.setColor(QPalette::ColorRole::PlaceholderText, clr_dibfg);
- pal.setColor(QPalette::ColorRole::Link, clr_wlink);
- pal.setColor(QPalette::ColorRole::LinkVisited, clr_wlink);
- pal.setColor(QPalette::ColorRole::HighlightedText, clr_selfg);
-
- //
- // Inactive state.
- //
-
- // Backgrounds & bases.
-
- // Texts.
-
- //
- // Disabled state.
- //
-
- // Backgrounds & bases.
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Window, clr_maibg);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Base, clr_basbg);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Dark, clr_brdbg);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::AlternateBase, clr_altbg);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Button, clr_altbg);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Light, clr_altbg);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Highlight, clr_selbg);
-
- // Texts.
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::ButtonText, clr_dibfg);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::WindowText, clr_diwfg);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::BrightText, clr_basbg);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Text, clr_diwfg);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::PlaceholderText, clr_dibfg);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Link, clr_wlink);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::LinkVisited, clr_wlink);
- pal.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::HighlightedText, clr_selfg);
-
- //
- // Tooltips.
- //
-
- pal.setColor(QPalette::ColorGroup::All, QPalette::ColorRole::ToolTipBase, clr_maibg);
- pal.setColor(QPalette::ColorGroup::All, QPalette::ColorRole::ToolTipText, clr_winfg);
- }
- else {
- pal = skin.extractPalette();
- }
+ QPalette pal = skin.extractPalette();
QToolTip::setPalette(pal);
qApp->setPalette(pal);
@@ -312,10 +230,12 @@ Skin SkinFactory::skinInfo(const QString& skin_name, bool* ok) const {
if (!style_palette_root.isNull()) {
const QMetaObject& mop = QPalette::staticMetaObject;
- QMetaEnum enumerp = mop.enumerator(mop.indexOfEnumerator(QSL("ColorGroup").toLocal8Bit().constData()));
- QMetaEnum enumerx = mop.enumerator(mop.indexOfEnumerator(QSL("ColorRole").toLocal8Bit().constData()));
- QMultiHash> groups;
+ QMetaEnum enumerp = QMetaEnum::fromType();
+ QMetaEnum enumerx = QMetaEnum::fromType();
+ QMetaEnum enumery = QMetaEnum::fromType();
+
+ QMultiHash>> groups;
QDomNodeList groups_of_palette = style_palette_root.elementsByTagName(QSL("group"));
@@ -330,8 +250,10 @@ Skin SkinFactory::skinInfo(const QString& skin_name, bool* ok) const {
QColor color(color_nd.toElement().text());
QPalette::ColorRole role = QPalette::ColorRole(enumerx.keyToValue(color_nd.toElement().attribute(QSL("role")).toLatin1()));
+ Qt::BrushStyle brush = Qt::BrushStyle(enumery.keyToValue(color_nd.toElement().attribute(QSL("brush")).toLatin1()));
- groups.insert(group, QPair(role, color));
+ groups.insert(group, QPair>(role,
+ { color, brush }));
}
}
@@ -475,7 +397,12 @@ QPalette Skin::extractPalette() const {
auto roles = m_stylePalette.values(grp);
for (const auto& rl : roles) {
- pal.setColor(grp, rl.first, rl.second);
+ if (rl.second.second <= 0) {
+ pal.setColor(grp, rl.first, rl.second.first);
+ }
+ else {
+ pal.setBrush(grp, rl.first, QBrush(rl.second.first, rl.second.second));
+ }
}
}
diff --git a/src/librssguard/miscellaneous/skinfactory.h b/src/librssguard/miscellaneous/skinfactory.h
index 666d8900a..412a5cbf2 100644
--- a/src/librssguard/miscellaneous/skinfactory.h
+++ b/src/librssguard/miscellaneous/skinfactory.h
@@ -52,7 +52,7 @@ struct RSSGUARD_DLLSPEC Skin {
QHash m_colorPalette;
QStringList m_forcedStyles;
bool m_forcedStylePalette;
- QMultiHash> m_stylePalette;
+ QMultiHash>> m_stylePalette;
QVariant colorForModel(SkinEnums::PaletteColors type, bool ignore_custom_colors = false) const;
QPalette extractPalette() const;