| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/miscellaneous/skinfactory.cpp`/ |
| 2 | |
| 3 | #include "miscellaneous/skinfactory.h"cxx . . $ `<file>/src/librssguard/miscellaneous/skinfactory.h`/ |
| 4 | |
| 5 | #include "miscellaneous/application.h"cxx . . $ `<file>/src/librssguard/miscellaneous/application.h`/ |
| 6 | #include "miscellaneous/settings.h"cxx . . $ `<file>/src/librssguard/miscellaneous/settings.h`/ |
| 7 | #include "network-web/networkfactory.h"cxx . . $ `<file>/src/librssguard/network-web/networkfactory.h`/ |
| 8 | #include "network-web/webfactory.h"cxx . . $ `<file>/src/librssguard/network-web/webfactory.h`/ |
| 9 | #include "services/abstract/rootitem.h"cxx . . $ `<file>/src/librssguard/services/abstract/rootitem.h`/ |
| 10 | |
| 11 | #include <QDir> |
| 12 | #include <QDomDocument> |
| 13 | #include <QDomElement> |
| 14 | #include <QFontDatabase> |
| 15 | #include <QMetaEnum> |
| 16 | #include <QMetaObject> |
| 17 | #include <QProcessEnvironment> |
| 18 | #include <QStyle> |
| 19 | #include <QStyleFactory> |
| 20 | #include <QStyleHints> |
| 21 | #include <QTextDocument> |
| 22 | #include <QToolTip> |
| 23 | |
| 24 | SkinFactorycxx . . $ SkinFactory#::SkinFactorycxx . . $ SkinFactory#SkinFactory(749de1b6ae65bddd).(QObjectcxx . . $ QObject#* parent) : QObjectcxx . . $ QObject#QObject(749de1b6ae65bddd).(parent), m_styleIsFrozencxx . . $ SkinFactory#m_styleIsFrozen.(false), m_useSkinColorscxx . . $ SkinFactory#m_useSkinColors.(false) {} |
| 25 | |
| 26 | void SkinFactorycxx . . $ SkinFactory#::loadCurrentSkincxx . . $ SkinFactory#loadCurrentSkin(b0b38cda41d4ede4).(bool lite, bool replace_existing_qss) { |
| 27 | QListcxx . . $ QList#<QStringcxx . . $ QString#> skin_names_to_try = {cxx . . $ QList#QList(b6da5b9a9f304025).selectedSkinNamecxx . . $ SkinFactory#selectedSkinName(6ef7b6c27b00b43d).(), QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!(APP_SKIN_DEFAULTcxx . . $ `src/librssguard/definitions/definitions.h:246:9`!)}; |
| 28 | bool skin_parsed; |
| 29 | Skincxx . . $ Skin# skin_data; |
| 30 | QStringcxx . . $ QString# skin_namecxx . . $ QString#QString(ced63f7c635d850d).; |
| 31 | |
| 32 | while (!skin_names_to_try.isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) { |
| 33 | skin_name =cxx . . $ QString#`operator=`(4f35bf974e7f8568). skin_names_to_try.takeFirstcxx . . $ QList#takeFirst(5f357b03ed472e5e).(); |
| 34 | skin_data =cxx . . $ Skin#`operator=`(d68ec5e4eca24758). skinInfocxx . . $ SkinFactory#skinInfo(384eb71cba31a432).(skin_name, lite, &skin_parsed); |
| 35 | |
| 36 | if (skin_parsed) { |
| 37 | loadSkinFromDatacxx . . $ SkinFactory#loadSkinFromData(b0c7cdc1e1f5fb7e).(skin_data, replace_existing_qss); |
| 38 | |
| 39 | // Set this 'Skin' object as active one. |
| 40 | m_currentSkincxx . . $ SkinFactory#m_currentSkin. =cxx . . $ Skin#`operator=`(107b3e1b8ff29973). skin_data; |
| 41 | qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Skin" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(skin_name) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "loaded. Lite:" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(lite); |
| 42 | return; |
| 43 | } |
| 44 | else { |
| 45 | qWarningNNcxx . . $ `src/librssguard/definitions/definitions.h:417:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Failed to load skin" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(skin_name); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | qCriticalNNcxx . . $ `src/librssguard/definitions/definitions.h:421:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Failed to load selected or default skin. Quitting!"; |
| 50 | } |
| 51 | |
| 52 | QVariantcxx . . $ QVariant# SkinFactorycxx . . $ SkinFactory#::colorForModelcxx . . $ SkinFactory#colorForModel(4e684f27212d3c52).(SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors# type, bool ignore_custom_colors) const { |
| 53 | return m_currentSkincxx . . $ SkinFactory#m_currentSkin..colorForModelcxx . . $ Skin#colorForModel(b703ae9a1ce5301d).(type, m_useSkinColorscxx . . $ SkinFactory#m_useSkinColors., ignore_custom_colors); |
| 54 | } |
| 55 | |
| 56 | bool SkinFactorycxx . . $ SkinFactory#::isStyleGoodForAlternativeStylePalettecxx . . $ SkinFactory#isStyleGoodForAlternativeStylePalette(f3b39adf77d9c36c).(const QStringcxx . . $ QString#& style_name) const { |
| 57 | static QRegularExpressioncxx . . $ QRegularExpression# re = QRegularExpressioncxx . . $ QRegularExpression#QRegularExpression(4279d2539df7cd4a).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("^(fusion|windows|qt[56]ct-style)$")); |
| 58 | |
| 59 | return re.matchcxx . . $ QRegularExpression#match(d076266091fa4922).(style_name.toLowercxx . . $ QString#toLower(dca2c5857e9adf82).()).hasMatchcxx . . $ QRegularExpressionMatch#hasMatch(50ce9a9e25b4a850).(); |
| 60 | } |
| 61 | |
| 62 | // NOTE: Taken from "QPlatformThemePrivate" Qt class. |
| 63 | // This is here because in Qt 6.5.0, they hardcoded |
| 64 | // DARK palette if user has enabled "dark mode" in OS. |
| 65 | QPalettecxx . . $ QPalette# qt_fusionPalettecxx . . $ qt_fusionPalette(4e1a6b2020631d89).(bool dark_appearance) { |
| 66 | const QColorcxx . . $ QColor# window_text = dark_appearance ? QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(240, 240, 240) : Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::blackcxx . . $ Qt/black.; |
| 67 | const QColorcxx . . $ QColor# background = dark_appearance ? QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(50, 50, 50) : QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(239, 239, 239); |
| 68 | const QColorcxx . . $ QColor# light = background.lightercxx . . $ QColor#lighter(a312dab4e0811e0).(150); |
| 69 | const QColorcxx . . $ QColor# mid = (background.darkercxx . . $ QColor#darker(a312dab4e0811e0).(130)); |
| 70 | const QColorcxx . . $ QColor# midlight = mid.lightercxx . . $ QColor#lighter(a312dab4e0811e0).(110); |
| 71 | const QColorcxx . . $ QColor# base = dark_appearance ? background.darkercxx . . $ QColor#darker(a312dab4e0811e0).(140) : Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::whitecxx . . $ Qt/white.; |
| 72 | const QColorcxx . . $ QColor# disabled_base(background); |
| 73 | const QColorcxx . . $ QColor# dark = background.darkercxx . . $ QColor#darker(a312dab4e0811e0).(150); |
| 74 | const QColorcxx . . $ QColor# disabled_dark = QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(209, 209, 209).darkercxx . . $ QColor#darker(a312dab4e0811e0).(110); |
| 75 | const QColorcxx . . $ QColor# text = dark_appearance ? window_text : Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::blackcxx . . $ Qt/black.; |
| 76 | const QColorcxx . . $ QColor# highlight = QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(48, 140, 198); |
| 77 | const QColorcxx . . $ QColor# hightlighted_text = dark_appearance ? window_text : Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::whitecxx . . $ Qt/white.; |
| 78 | const QColorcxx . . $ QColor# disabled_text = dark_appearance ? QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(130, 130, 130) : QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(190, 190, 190); |
| 79 | const QColorcxx . . $ QColor# button = background; |
| 80 | const QColorcxx . . $ QColor# shadow = dark.darkercxx . . $ QColor#darker(a312dab4e0811e0).(135); |
| 81 | const QColorcxx . . $ QColor# disabled_shadow = shadow.lightercxx . . $ QColor#lighter(a312dab4e0811e0).(150); |
| 82 | |
| 83 | QColorcxx . . $ QColor# placeholder = text; |
| 84 | placeholder.setAlphacxx . . $ QColor#setAlpha(d4f767463ce0a6b3).(128); |
| 85 | |
| 86 | QPalettecxx . . $ QPalette# fusion_palettecxx . . $ QPalette#QPalette(40b3f6e97bf97baa).(window_text, background, light, dark, mid, text, base); |
| 87 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(3d16351d4a25c9ef).(QPalettecxx . . $ QPalette#::Midlightcxx . . $ QPalette#Midlight., midlightcxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 88 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(3d16351d4a25c9ef).(QPalettecxx . . $ QPalette#::Buttoncxx . . $ QPalette#Button., buttoncxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 89 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(3d16351d4a25c9ef).(QPalettecxx . . $ QPalette#::Shadowcxx . . $ QPalette#Shadow., shadowcxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 90 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(3d16351d4a25c9ef).(QPalettecxx . . $ QPalette#::HighlightedTextcxx . . $ QPalette#HighlightedText., hightlighted_textcxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 91 | |
| 92 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(4a01bd8406c2d545).(QPalettecxx . . $ QPalette#::Disabledcxx . . $ QPalette#Disabled., QPalettecxx . . $ QPalette#::Textcxx . . $ QPalette#Text., disabled_textcxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 93 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(4a01bd8406c2d545).(QPalettecxx . . $ QPalette#::Disabledcxx . . $ QPalette#Disabled., QPalettecxx . . $ QPalette#::WindowTextcxx . . $ QPalette#WindowText., disabled_textcxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 94 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(4a01bd8406c2d545).(QPalettecxx . . $ QPalette#::Disabledcxx . . $ QPalette#Disabled., QPalettecxx . . $ QPalette#::ButtonTextcxx . . $ QPalette#ButtonText., disabled_textcxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 95 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(4a01bd8406c2d545).(QPalettecxx . . $ QPalette#::Disabledcxx . . $ QPalette#Disabled., QPalettecxx . . $ QPalette#::Basecxx . . $ QPalette#Base., disabled_basecxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 96 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(4a01bd8406c2d545).(QPalettecxx . . $ QPalette#::Disabledcxx . . $ QPalette#Disabled., QPalettecxx . . $ QPalette#::Darkcxx . . $ QPalette#Dark., disabled_darkcxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 97 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(4a01bd8406c2d545).(QPalettecxx . . $ QPalette#::Disabledcxx . . $ QPalette#Disabled., QPalettecxx . . $ QPalette#::Shadowcxx . . $ QPalette#Shadow., disabled_shadowcxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 98 | |
| 99 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(4a01bd8406c2d545).(QPalettecxx . . $ QPalette#::Activecxx . . $ QPalette#Active., QPalettecxx . . $ QPalette#::Highlightcxx . . $ QPalette#Highlight., highlightcxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 100 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(4a01bd8406c2d545).(QPalettecxx . . $ QPalette#::Inactivecxx . . $ QPalette#Inactive., QPalettecxx . . $ QPalette#::Highlightcxx . . $ QPalette#Highlight., highlightcxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 101 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(4a01bd8406c2d545).(QPalettecxx . . $ QPalette#::Disabledcxx . . $ QPalette#Disabled., QPalettecxx . . $ QPalette#::Highlightcxx . . $ QPalette#Highlight., QColorcxx . . $ QBrush#QBrush(b50947b0752ea6ac).(145, 145, 145)); |
| 102 | |
| 103 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(3d16351d4a25c9ef).(QPalettecxx . . $ QPalette#::PlaceholderTextcxx . . $ QPalette#PlaceholderText., placeholdercxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 104 | |
| 105 | if (dark_appearance) { |
| 106 | fusion_palette.setBrushcxx . . $ QPalette#setBrush(3d16351d4a25c9ef).(QPalettecxx . . $ QPalette#::Linkcxx . . $ QPalette#Link., highlightcxx . . $ QBrush#QBrush(b50947b0752ea6ac).); |
| 107 | } |
| 108 | |
| 109 | return fusion_palettecxx . . $ QPalette#QPalette(30b8f77ffb5f27).; |
| 110 | } |
| 111 | |
| 112 | void SkinFactorycxx . . $ SkinFactory#::loadSkinFromDatacxx . . $ SkinFactory#loadSkinFromData(b0c7cdc1e1f5fb7e).(const Skincxx . . $ Skin#& skin, bool replace_existing_qss) { |
| 113 | #if QT_VERSIONcxx . . $ `<external>/3898848398875472725/qtversionchecks.h:17:9`! >= 0x060500 // Qt >= 6.5.0 |
| 114 | auto system_color_scheme = qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->styleHintscxx . . $ QGuiApplication#styleHints(c01229609ce938c0).()->colorSchemecxx . . $ QStyleHints#colorScheme(d695bd82d19194f3).(); |
| 115 | |
| 116 | qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "OS defines color scheme:" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(system_color_scheme); |
| 117 | #endif |
| 118 | |
| 119 | QStringcxx . . $ QString# style_name = qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(GUI), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(GUI::Style)).toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 120 | auto env = QProcessEnvironmentcxx . . $ QProcessEnvironment#::systemEnvironmentcxx . . $ QProcessEnvironment#systemEnvironment(f0e8295e01d32d01).(); |
| 121 | const QStringcxx . . $ QString# env_forced_style = env.valuecxx . . $ QProcessEnvironment#value(11b1083083847b8e).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("QT_STYLE_OVERRIDE")); |
| 122 | const QStringcxx . . $ QString# cli_forced_style = qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->cmdParsercxx . . $ Application#cmdParser(28f76cd94c3cf31d).()->valuecxx . . $ QCommandLineParser#value(5555d9024dcf93fb).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!(CLI_STYLE_SHORTcxx . . $ `src/librssguard/definitions/definitions.h:143:9`!)); |
| 123 | |
| 124 | if (env_forced_style.isEmptycxx . . $ QString#isEmpty(3482b152b9333168).() && cli_forced_style.isEmptycxx . . $ QString#isEmpty(3482b152b9333168).()) { |
| 125 | m_styleIsFrozencxx . . $ SkinFactory#m_styleIsFrozen. = false; |
| 126 | |
| 127 | if (!skin.m_forcedStylescxx . . $ Skin#m_forcedStyles..isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) { |
| 128 | qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Forcing one of skin's declared styles:" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(skin.m_forcedStyles); |
| 129 | |
| 130 | for (const QStringcxx . . $ QString#& skin_forced_style : skin.m_forcedStylescxx . . $ Skin#m_forcedStyles.) { |
| 131 | if (qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->setStylecxx . . $ QApplication#setStyle(1028a3ea1bbca2e8).(skin_forced_style) != nullptr) { |
| 132 | m_currentStylecxx . . $ SkinFactory#m_currentStyle. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). skin_forced_style; |
| 133 | break; |
| 134 | } |
| 135 | } |
| 136 | } |
| 137 | else { |
| 138 | qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Setting style:" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(style_name); |
| 139 | qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->setStylecxx . . $ QApplication#setStyle(1028a3ea1bbca2e8).(style_name); |
| 140 | m_currentStylecxx . . $ SkinFactory#m_currentStyle. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). style_name; |
| 141 | } |
| 142 | } |
| 143 | else { |
| 144 | m_styleIsFrozencxx . . $ SkinFactory#m_styleIsFrozen. = true; |
| 145 | m_currentStylecxx . . $ SkinFactory#m_currentStyle. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->stylecxx . . $ QApplication#style(8bb4f2215cbcf478).()->objectNamecxx . . $ QObject#objectName(6ef7b6c27b00b43d).(); |
| 146 | |
| 147 | qWarningNNcxx . . $ `src/librssguard/definitions/definitions.h:417:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Respecting forced style(s):\n" |
| 148 | <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). " QT_STYLE_OVERRIDE: " QUOTE_NO_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:433:9`!(env_forced_style) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "\n" |
| 149 | <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). " CLI (-style): " QUOTE_NO_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:433:9`!(cli_forced_style); |
| 150 | } |
| 151 | |
| 152 | m_useSkinColorscxx . . $ SkinFactory#m_useSkinColors. = |
| 153 | skin.m_forcedSkinColorscxx . . $ Skin#m_forcedSkinColors. || qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(GUI), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(GUI::ForcedSkinColors)).toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).(); |
| 154 | |
| 155 | if (m_useSkinColorscxx . . $ SkinFactory#m_useSkinColors. && isStyleGoodForAlternativeStylePalettecxx . . $ SkinFactory#isStyleGoodForAlternativeStylePalette(f3b39adf77d9c36c).(m_currentStylecxx . . $ SkinFactory#m_currentStyle.)) { |
| 156 | if (!skin.m_stylePalettecxx . . $ Skin#m_stylePalette..isEmptycxx . . $ QMultiHash#isEmpty(3482b152b9333168).()) { |
| 157 | qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Activating alternative palette."; |
| 158 | |
| 159 | QPalettecxx . . $ QPalette# pal = skin.extractPalettecxx . . $ Skin#extractPalette(e5fe513100f8bd45).(); |
| 160 | |
| 161 | QToolTipcxx . . $ QToolTip#::setPalettecxx . . $ QToolTip#setPalette(f826ed73d5553cd5).(pal); |
| 162 | qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->setPalettecxx . . $ QApplication#setPalette(7f7b15b5fe7473b9).(pal); |
| 163 | } |
| 164 | // NOTE: Very hacky way of avoiding automatic "dark mode" |
| 165 | // palettes in some styles. Also in light mode, |
| 166 | // colors are now derived from system. |
| 167 | #if QT_VERSIONcxx . . $ `<external>/3898848398875472725/qtversionchecks.h:17:9`! >= 0x060500 // Qt >= 6.5.0 |
| 168 | else /*if (qApp->styleHints()->colorScheme() == Qt::ColorScheme::Light)*/ { |
| 169 | qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->setPalettecxx . . $ QApplication#setPalette(7f7b15b5fe7473b9).(qt_fusionPalettecxx . . $ qt_fusionPalette(4e1a6b2020631d89).(false)); |
| 170 | } |
| 171 | #endif |
| 172 | } |
| 173 | |
| 174 | QStringcxx . . $ QString# qss_to_set = skincxx . . $ QString#QString(132dd6869045752b)..m_rawForcedDatacxx . . $ Skin#m_rawForcedData.; |
| 175 | |
| 176 | if (m_useSkinColorscxx . . $ SkinFactory#m_useSkinColors. && !skin.m_rawDatacxx . . $ Skin#m_rawData..isEmptycxx . . $ QString#isEmpty(3482b152b9333168).()) { |
| 177 | if (qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->styleSheetcxx . . $ QApplication#styleSheet(6ef7b6c27b00b43d).().simplifiedcxx . . $ QString#simplified(30b3b70527b1c61a).().isEmptycxx . . $ QString#isEmpty(3482b152b9333168).()) { |
| 178 | qss_to_set += QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("\r\n") + skin.m_rawDatacxx . . $ Skin#m_rawData.; |
| 179 | } |
| 180 | else { |
| 181 | qCriticalNNcxx . . $ `src/librssguard/definitions/definitions.h:421:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! |
| 182 | <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Skipped setting of application style and skin because there is already some style set."; |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | if (replace_existing_qss) { |
| 187 | qss_to_set =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). qss_to_set; |
| 188 | } |
| 189 | else { |
| 190 | qss_to_set =cxx . . $ QString#`operator=`(4f35bf974e7f8568). qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->styleSheetcxx . . $ QApplication#styleSheet(6ef7b6c27b00b43d).() + QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("\r\n") + qss_to_set; |
| 191 | } |
| 192 | |
| 193 | qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->setStyleSheetcxx . . $ QApplication#setStyleSheet(3520e46b33348bf6).(qss_to_set); |
| 194 | } |
| 195 | |
| 196 | void SkinFactorycxx . . $ SkinFactory#::setCurrentSkinNamecxx . . $ SkinFactory#setCurrentSkinName(3520e46b33348bf6).(const QStringcxx . . $ QString#& skin_name) { |
| 197 | qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->setValuecxx . . $ Settings#setValue(365356ede4ebaabb).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(GUI), GUIcxx . . $ GUI/::Skincxx . . $ GUI/Skin., skin_namecxx . . $ QVariant#QVariant(132dd6869045752b).); |
| 198 | } |
| 199 | |
| 200 | QStringcxx . . $ QString# SkinFactorycxx . . $ SkinFactory#::customSkinBaseFoldercxx . . $ SkinFactory#customSkinBaseFolder(6ef7b6c27b00b43d).() const { |
| 201 | return qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->userDataFoldercxx . . $ Application#userDataFolder(4365c3963150523e).() + QDircxx . . $ QDir#::separatorcxx . . $ QDir#separator(44eb9225326fcbf5).() + APP_SKIN_USER_FOLDERcxx . . $ `src/librssguard/definitions/definitions.h:245:9`!; |
| 202 | } |
| 203 | |
| 204 | QStringcxx . . $ QString# SkinFactorycxx . . $ SkinFactory#::selectedSkinNamecxx . . $ SkinFactory#selectedSkinName(6ef7b6c27b00b43d).() const { |
| 205 | return qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(GUI), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(GUI::Skin)).toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 206 | } |
| 207 | |
| 208 | QStringcxx . . $ QString# SkinFactorycxx . . $ SkinFactory#::adBlockedPagecxx . . $ SkinFactory#adBlockedPage(e9cecc7c907e7d19).(const QStringcxx . . $ QString#& url, const QStringcxx . . $ QString#& filter) { |
| 209 | const QStringcxx . . $ QString#& adblocked = |
| 210 | currentSkincxx . . $ SkinFactory#currentSkin(f1ebc492f3942f20).().m_adblockedcxx . . $ Skin#m_adblocked..argcxx . . $ QString#arg(89b093bd48b6d6c0).(trcxx . . $ SkinFactory#tr(75d9f1c324b4579d).("This page was blocked by AdBlock"), |
| 211 | trcxx . . $ SkinFactory#tr(75d9f1c324b4579d).(R"(Blocked URL: "%1"<br/>Used filter: "%2")").argcxx . . $ QString#arg(89b093bd48b6d6c0).(url, filter)); |
| 212 | |
| 213 | return currentSkincxx . . $ SkinFactory#currentSkin(f1ebc492f3942f20).().m_layoutMarkupWrappercxx . . $ Skin#m_layoutMarkupWrapper..argcxx . . $ QString#arg(89b093bd48b6d6c0).(trcxx . . $ SkinFactory#tr(75d9f1c324b4579d).("This page was blocked by AdBlock"), adblocked); |
| 214 | } |
| 215 | |
| 216 | PreparedHtmlcxx . . $ PreparedHtml# SkinFactorycxx . . $ SkinFactory#::prepareHtmlcxx . . $ SkinFactory#prepareHtml(58000ba8dd36147c).(const QStringcxx . . $ QString#& inner_html, const QUrlcxx . . $ QUrl#& base_url) { |
| 217 | return {currentSkincxx . . $ SkinFactory#currentSkin(f1ebc492f3942f20).().m_layoutMarkupWrappercxx . . $ Skin#m_layoutMarkupWrapper..argcxx . . $ QString#arg(89b093bd48b6d6c0).(QStringcxx . . $ QString#QString(ced63f7c635d850d).(), inner_html), base_url}; |
| 218 | } |
| 219 | |
| 220 | PreparedHtmlcxx . . $ PreparedHtml# SkinFactorycxx . . $ SkinFactory#::generateHtmlOfArticlescxx . . $ SkinFactory#generateHtmlOfArticles(e95722fdaa1a1d02).(const QListcxx . . $ QList#<Messagecxx . . $ Message#>& messages, |
| 221 | RootItemcxx . . $ RootItem#* root, |
| 222 | int desired_width) const { |
| 223 | Skincxx . . $ Skin# skin = currentSkincxx . . $ SkinFactory#currentSkin(f1ebc492f3942f20).(); |
| 224 | QStringcxx . . $ QString# messages_layoutcxx . . $ QString#QString(ced63f7c635d850d).; |
| 225 | QStringcxx . . $ QString# single_message_layout = skincxx . . $ QString#QString(132dd6869045752b)..m_layoutMarkupcxx . . $ Skin#m_layoutMarkup.; |
| 226 | const int forced_img_height = |
| 227 | qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(Messages), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(Messages::LimitArticleImagesHeight)).toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).(); |
| 228 | |
| 229 | auto* feed = root != nullptr |
| 230 | ? root->getParentServiceRootcxx . . $ RootItem#getParentServiceRoot(56209a8cf0725652).() |
| 231 | ->getItemFromSubTreecxx . . $ RootItem#getItemFromSubTree(d39f768279e67ac5).([cxx . . $ std/function#function(bdc3712e480e4d04).messages](const RootItemcxx . . $ RootItem#* it) { |
| 232 | return it->kindcxx . . $ RootItem#kind(faa800885e6a64b).() == RootItemcxx . . $ RootItem#::Kindcxx . . $ RootItem#Kind#::Feedcxx . . $ RootItem#Kind#Feed. && it->customIdcxx . . $ RootItem#customId(6ef7b6c27b00b43d).() ==cxx . . $ `operator==`(5bc2975d2d751687). messages.atcxx . . $ QList#at(c7965f769b39929).(0).m_feedIdcxx . . $ Message#m_feedId.; |
| 233 | }) |
| 234 | ->toFeedcxx . . $ RootItem#toFeed(6205f4b142e8b232).() |
| 235 | : nullptr; |
| 236 | |
| 237 | for (const Messagecxx . . $ Message#& message : messages) { |
| 238 | QStringcxx . . $ QString# enclosurescxx . . $ QString#QString(ced63f7c635d850d).; |
| 239 | QStringcxx . . $ QString# enclosure_imagescxx . . $ QString#QString(ced63f7c635d850d).; |
| 240 | bool is_plain = !TextFactorycxx . . $ TextFactory#::couldBeHtmlcxx . . $ TextFactory#couldBeHtml(e1defb592416720d).(message.m_contentscxx . . $ Message#m_contents.); |
| 241 | |
| 242 | if (root == nullptr || root->getParentServiceRootcxx . . $ RootItem#getParentServiceRoot(56209a8cf0725652).()->displaysEnclosurescxx . . $ ServiceRoot#displaysEnclosures(50ce9a9e25b4a850).()) { |
| 243 | for (const Enclosurecxx . . $ Enclosure#& enclosure : message.m_enclosurescxx . . $ Message#m_enclosures.) { |
| 244 | QStringcxx . . $ QString# enc_url = QUrlcxx . . $ QUrl#::fromPercentEncodingcxx . . $ QUrl#fromPercentEncoding(4e15edac36d215be).(enclosure.m_urlcxx . . $ Enclosure#m_url..toUtf8cxx . . $ QString#toUtf8(ef52b713090bc85a).()); |
| 245 | |
| 246 | enclosures +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). skin.m_enclosureMarkupcxx . . $ Skin#m_enclosureMarkup..argcxx . . $ QString#arg(89b093bd48b6d6c0).(enc_url, enclosure.m_mimeTypecxx . . $ Enclosure#m_mimeType.); |
| 247 | |
| 248 | if (qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(Messages), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(Messages::DisplayEnclosuresInMessage)).toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).()) { |
| 249 | if (enclosure.m_mimeTypecxx . . $ Enclosure#m_mimeType..startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("image/")) && |
| 250 | qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(Messages), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(Messages::DisplayEnclosuresInMessage)).toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).()) { |
| 251 | // Add thumbnail image. |
| 252 | enclosure_images +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). |
| 253 | skin.m_enclosureImageMarkupcxx . . $ Skin#m_enclosureImageMarkup..argcxx . . $ QString#arg(89b093bd48b6d6c0).(enclosure.m_urlcxx . . $ Enclosure#m_url., |
| 254 | enclosure.m_mimeTypecxx . . $ Enclosure#m_mimeType., |
| 255 | forced_img_height <= 0 ? QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(-1) |
| 256 | : QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(forced_img_height)); |
| 257 | } |
| 258 | } |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | QStringcxx . . $ QString# msg_date = |
| 263 | qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(Messages), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(Messages::UseCustomDate)).toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).() |
| 264 | ? message.m_createdcxx . . $ Message#m_created..toLocalTimecxx . . $ QDateTime#toLocalTime(4e062b5c490497ac).() |
| 265 | .toStringcxx . . $ QDateTime#toString(5555d9024dcf93fb).(qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(Messages), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(Messages::CustomDateFormat)).toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).()) |
| 266 | : qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->localizationcxx . . $ Application#localization(c0674a442c333122).()->loadedLocalecxx . . $ Localization#loadedLocale(a49c665025854758).().toStringcxx . . $ QLocale#toString(e323b8959ca14415).(message.m_createdcxx . . $ Message#m_created..toLocalTimecxx . . $ QDateTime#toLocalTime(4e062b5c490497ac).(), |
| 267 | QLocalecxx . . $ QLocale#::FormatTypecxx . . $ QLocale#FormatType#::ShortFormatcxx . . $ QLocale#ShortFormat.); |
| 268 | |
| 269 | QStringcxx . . $ QString# msg_contents = is_plain ? Qtcxx . . $ Qt/::convertFromPlainTextcxx . . $ Qt/convertFromPlainText(6e04cfe71d3709ab).(message.m_contentscxx . . $ Message#m_contents., Qtcxx . . $ Qt/::WhiteSpaceModecxx . . $ Qt/WhiteSpaceMode#::WhiteSpaceNormalcxx . . $ Qt/WhiteSpaceNormal.) |
| 270 | : messagecxx . . $ QString#QString(132dd6869045752b)..m_contentscxx . . $ Message#m_contents.; |
| 271 | |
| 272 | if (!is_plain) { |
| 273 | msg_contents =cxx . . $ QString#`operator=`(4f35bf974e7f8568). qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->webcxx . . $ Application#web(ad68e16c93841931).()->limitSizeOfHtmlImagescxx . . $ WebFactory#limitSizeOfHtmlImages(7a7f5a5f098f90d0).(msg_contents, desired_width, forced_img_height); |
| 274 | } |
| 275 | |
| 276 | messages_layout.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(single_message_layout.argcxx . . $ QString#arg(89b093bd48b6d6c0).(message.m_titlecxx . . $ Message#m_title., |
| 277 | trcxx . . $ SkinFactory#tr(75d9f1c324b4579d).("Written by ") + (message.m_authorcxx . . $ Message#m_author..isEmptycxx . . $ QString#isEmpty(3482b152b9333168).() |
| 278 | ? trcxx . . $ SkinFactory#tr(75d9f1c324b4579d).("unknown author") |
| 279 | : messagecxx . . $ QString#QString(132dd6869045752b)..m_authorcxx . . $ Message#m_author.), |
| 280 | message.m_urlcxx . . $ Message#m_url., |
| 281 | msg_contents, |
| 282 | msg_date, |
| 283 | enclosures, |
| 284 | enclosure_images, |
| 285 | QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(message.m_idcxx . . $ Message#m_id.), |
| 286 | (message.m_rtlBehaviorcxx . . $ Message#m_rtlBehavior. == RtlBehaviorcxx . . $ RtlBehavior#::Everywherecxx . . $ RtlBehavior#Everywhere. || |
| 287 | message.m_rtlBehaviorcxx . . $ Message#m_rtlBehavior. == RtlBehaviorcxx . . $ RtlBehavior#::EverywhereExceptFeedListcxx . . $ RtlBehavior#EverywhereExceptFeedList. || |
| 288 | message.m_rtlBehaviorcxx . . $ Message#m_rtlBehavior. == RtlBehaviorcxx . . $ RtlBehavior#::OnlyViewercxx . . $ RtlBehavior#OnlyViewer.) |
| 289 | ? QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("rtl") |
| 290 | : QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("ltr"))); |
| 291 | } |
| 292 | |
| 293 | QStringcxx . . $ QString# msg_contents = |
| 294 | skin.m_layoutMarkupWrappercxx . . $ Skin#m_layoutMarkupWrapper..argcxx . . $ QString#arg(89b093bd48b6d6c0).(messages.sizecxx . . $ QList#size(6b0412d51016192f).() == 1 ? messagescxx . . $ QString#QString(132dd6869045752b)..atcxx . . $ QList#at(c7965f769b39929).(0).m_titlecxx . . $ Message#m_title. : trcxx . . $ SkinFactory#tr(75d9f1c324b4579d).("Newspaper view"), |
| 295 | messages_layout); |
| 296 | QStringcxx . . $ QString# base_urlcxx . . $ QString#QString(ced63f7c635d850d).; |
| 297 | |
| 298 | if (feed != nullptr) { |
| 299 | QUrlcxx . . $ QUrl# urlcxx . . $ QUrl#QUrl(ea1f3831e370f1cb).(NetworkFactorycxx . . $ NetworkFactory#::sanitizeUrlcxx . . $ NetworkFactory#sanitizeUrl(fd988a2ab94d906b).(feed->sourcecxx . . $ Feed#source(6ef7b6c27b00b43d).())); |
| 300 | |
| 301 | if (url.isValidcxx . . $ QUrl#isValid(50ce9a9e25b4a850).()) { |
| 302 | if (url.isLocalFilecxx . . $ QUrl#isLocalFile(50ce9a9e25b4a850).()) { |
| 303 | base_url =cxx . . $ QString#`operator=`(4f35bf974e7f8568). url.schemecxx . . $ QUrl#scheme(6ef7b6c27b00b43d).() + QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("://") + url.toLocalFilecxx . . $ QUrl#toLocalFile(6ef7b6c27b00b43d).(); |
| 304 | } |
| 305 | else { |
| 306 | base_url =cxx . . $ QString#`operator=`(4f35bf974e7f8568). url.schemecxx . . $ QUrl#scheme(6ef7b6c27b00b43d).() + QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("://") + url.hostcxx . . $ QUrl#host(9d7420bec8bfe6c9).(); |
| 307 | } |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | return {msg_contents, base_url}; |
| 312 | } |
| 313 | |
| 314 | Skincxx . . $ Skin# SkinFactorycxx . . $ SkinFactory#::skinInfocxx . . $ SkinFactory#skinInfo(384eb71cba31a432).(const QStringcxx . . $ QString#& skin_name, bool lite, bool* ok) const { |
| 315 | Skincxx . . $ Skin# skin; |
| 316 | const QStringListcxx . . $ QStringList# skins_root_folders = {cxx . . $ QList#QList(b6da5b9a9f304025).APP_SKIN_PATHcxx . . $ `src/librssguard/definitions/definitions.h:391:9`!, customSkinBaseFoldercxx . . $ SkinFactory#customSkinBaseFolder(6ef7b6c27b00b43d).()}; |
| 317 | |
| 318 | for (const QStringcxx . . $ QString#& skins_root_folder : skins_root_folders) { |
| 319 | const QStringcxx . . $ QString# skin_parent = QStringcxx . . $ QString#QString(132dd6869045752b).(skins_root_folder).replacecxx . . $ QString#replace(8514d9896be75a4a).(QDircxx . . $ QDir#::separatorcxx . . $ QDir#separator(44eb9225326fcbf5).(), QL1Ccxx . . $ `src/librssguard/definitions/definitions.h:455:9`!('/')) + QL1Ccxx . . $ `src/librssguard/definitions/definitions.h:455:9`!('/'); |
| 320 | const QStringcxx . . $ QString# skin_folder_no_sep = skin_parent + skin_name; |
| 321 | const QStringcxx . . $ QString# skin_folder_with_sep = skin_folder_no_sep + QDircxx . . $ QDir#::separatorcxx . . $ QDir#separator(44eb9225326fcbf5).(); |
| 322 | const QStringcxx . . $ QString# metadata_file = skin_folder_with_sep + APP_SKIN_METADATA_FILEcxx . . $ `src/librssguard/definitions/definitions.h:247:9`!; |
| 323 | |
| 324 | if (QFilecxx . . $ QFile#::existscxx . . $ QFile#exists(e1defb592416720d).(metadata_file)) { |
| 325 | QFilecxx . . $ QFile# skin_filecxx . . $ QFile#QFile(3520e46b33348bf6).(metadata_file); |
| 326 | QDomDocumentcxx . . $ QDomDocument# documentcxx . . $ QDomDocument#QDomDocument(49f6e7a06ebc5aa8).; |
| 327 | |
| 328 | if (!skin_file.opencxx . . $ QFile#open(da34f43c1eae080c).(QIODevicecxx . . $ QIODevice#::OpenModeFlagcxx . . $ QIODeviceBase#OpenModeFlag#::Textcxx . . $ QIODeviceBase#Text. |cxx . . $ `operator|`(64b8367948668350). QIODevicecxx . . $ QIODevice#::OpenModeFlagcxx . . $ QIODeviceBase#OpenModeFlag#::ReadOnlycxx . . $ QIODeviceBase#ReadOnly.) || |
| 329 | !document.setContentcxx . . $ QDomDocument#setContent(5370c8178ca58819).(&skin_file, true)) { |
| 330 | if (ok != nullptr) { |
| 331 | *ok = false; |
| 332 | } |
| 333 | |
| 334 | return skin; |
| 335 | } |
| 336 | |
| 337 | const QDomNodecxx . . $ QDomNode# skin_node = document.namedItemcxx . . $ QDomNode#namedItem(e7ddab27ad92952b).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("skin")); |
| 338 | const QStringcxx . . $ QString# base_skin_name = skin_node.toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).().attributecxx . . $ QDomElement#attribute(11b1083083847b8e).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("base")); |
| 339 | QStringcxx . . $ QString# real_base_skin_foldercxx . . $ QString#QString(ced63f7c635d850d).; |
| 340 | |
| 341 | if (!base_skin_name.isEmptycxx . . $ QString#isEmpty(3482b152b9333168).()) { |
| 342 | // We now find folder of "base" skin. |
| 343 | for (const QStringcxx . . $ QString#& parent_for_base : skins_root_folders) { |
| 344 | QStringcxx . . $ QString# full_base = parent_for_base + QDircxx . . $ QDir#::separatorcxx . . $ QDir#separator(44eb9225326fcbf5).() + base_skin_name; |
| 345 | |
| 346 | if (QDircxx . . $ QDir#QDir(3520e46b33348bf6).().existscxx . . $ QDir#exists(f3b39adf77d9c36c).(full_base)) { |
| 347 | real_base_skin_folder =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). full_base; |
| 348 | real_base_skin_folder =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). real_base_skin_folder.replacecxx . . $ QString#replace(8514d9896be75a4a).(QDircxx . . $ QDir#::separatorcxx . . $ QDir#separator(44eb9225326fcbf5).(), QL1Ccxx . . $ `src/librssguard/definitions/definitions.h:455:9`!('/')); |
| 349 | |
| 350 | qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Found path of base skin:" |
| 351 | <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACE_DOTcxx . . $ `src/librssguard/definitions/definitions.h:430:9`!(QDir::toNativeSeparators(real_base_skin_folder)); |
| 352 | break; |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | if (real_base_skin_folder.isEmptycxx . . $ QString#isEmpty(3482b152b9333168).()) { |
| 357 | // Base skin not found. |
| 358 | if (ok != nullptr) { |
| 359 | *ok = false; |
| 360 | } |
| 361 | |
| 362 | qCriticalNNcxx . . $ `src/librssguard/definitions/definitions.h:421:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Base skin" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(base_skin_name) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "not found."; |
| 363 | return skin; |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | // Obtain skin data. |
| 368 | skin.m_visibleNamecxx . . $ Skin#m_visibleName. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). skin_name; |
| 369 | skin.m_authorcxx . . $ Skin#m_author. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). skin_node.namedItemcxx . . $ QDomNode#namedItem(e7ddab27ad92952b).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("author")).namedItemcxx . . $ QDomNode#namedItem(e7ddab27ad92952b).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("name")).toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).().textcxx . . $ QDomElement#text(6ef7b6c27b00b43d).(); |
| 370 | skin.m_versioncxx . . $ Skin#m_version. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). skin_node.attributescxx . . $ QDomNode#attributes(c1d04309e53c4e0).().namedItemcxx . . $ QDomNamedNodeMap#namedItem(e7ddab27ad92952b).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("version")).toAttrcxx . . $ QDomNode#toAttr(e04736526eeb9052).().valuecxx . . $ QDomAttr#value(6ef7b6c27b00b43d).(); |
| 371 | skin.m_descriptioncxx . . $ Skin#m_description. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). skin_node.namedItemcxx . . $ QDomNode#namedItem(e7ddab27ad92952b).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("description")).toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).().textcxx . . $ QDomElement#text(6ef7b6c27b00b43d).(); |
| 372 | skin.m_baseNamecxx . . $ Skin#m_baseName. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). skin_name; |
| 373 | |
| 374 | // Obtain color palette. |
| 375 | QHashcxx . . $ QHash#<SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors#, QColorcxx . . $ QColor#> palettecxx . . $ QHash#QHash(ced63f7c635d850d).; |
| 376 | QDomNodeListcxx . . $ QDomNodeList# colors_of_palette = skin_node.namedItemcxx . . $ QDomNode#namedItem(e7ddab27ad92952b).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("palette")).toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).().elementsByTagNamecxx . . $ QDomElement#elementsByTagName(7405d4a50bfe2c93).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("color")); |
| 377 | const QMetaObjectcxx . . $ QMetaObject#& mo = SkinEnumscxx . . $ SkinEnums#::staticMetaObjectcxx . . $ SkinEnums#staticMetaObject.; |
| 378 | QMetaEnumcxx . . $ QMetaEnum# enumer = mo.enumeratorcxx . . $ QMetaObject#enumerator(a51202743b84b02c).(mo.indexOfEnumeratorcxx . . $ QMetaObject#indexOfEnumerator(78f035161ffa9fe2).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("PaletteColors").toLocal8Bitcxx . . $ QString#toLocal8Bit(7c2073558a834e49).().constDatacxx . . $ QByteArray#constData(ba32b354807b2b81).())); |
| 379 | |
| 380 | for (int i = 0; i < colors_of_palette.sizecxx . . $ QDomNodeList#size(455f465bc33b4cdf).(); i++) { |
| 381 | QDomElementcxx . . $ QDomElement# elem_clr = colors_of_palette.itemcxx . . $ QDomNodeList#item(b6c6c70d5ef857b9).(i).toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).(); |
| 382 | QStringcxx . . $ QString# en_val = elem_clr.attributecxx . . $ QDomElement#attribute(11b1083083847b8e).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("key")); |
| 383 | SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors# key = SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors#(enumer.keyToValuecxx . . $ QMetaEnum#keyToValue(f747eaf02f82dd19).(en_val.toLatin1cxx . . $ QString#toLatin1(ef52b713090bc85a).())); |
| 384 | QColorcxx . . $ QColor# value = elem_clrcxx . . $ QColor#QColor(3520e46b33348bf6)..textcxx . . $ QDomElement#text(6ef7b6c27b00b43d).(); |
| 385 | |
| 386 | if (value.isValidcxx . . $ QColor#isValid(3482b152b9333168).()) { |
| 387 | palette.insertcxx . . $ QHash#insert(d77b19c31d2eb147).(key, value); |
| 388 | } |
| 389 | } |
| 390 | |
| 391 | skin.m_colorPalettecxx . . $ Skin#m_colorPalette. =cxx . . $ QHash#`operator=`(b389532fb067fae5). palette; |
| 392 | |
| 393 | // Obtain alternative style palette. |
| 394 | skin.m_forcedStylescxx . . $ Skin#m_forcedStyles. =cxx . . $ QList#`operator=`(da1cd3e1ddeb0856). skin_node.namedItemcxx . . $ QDomNode#namedItem(e7ddab27ad92952b).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("forced-styles")) |
| 395 | .toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).() |
| 396 | .textcxx . . $ QDomElement#text(6ef7b6c27b00b43d).() |
| 397 | .splitcxx . . $ QString#split(4e27fcb098d1f780).(','cxx . . $ QChar#QChar(93d577a3e9528307)., |
| 398 | #if QT_VERSIONcxx . . $ `<external>/3898848398875472725/qtversionchecks.h:17:9`! >= 0x050F00 // Qt >= 5.15.0 |
| 399 | Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::SplitBehaviorFlagscxx . . $ Qt/SplitBehaviorFlags#::SkipEmptyPartscxx . . $ Qt/SkipEmptyParts.); |
| 400 | #else |
| 401 | QString::SplitBehavior::SkipEmptyParts); |
| 402 | #endif |
| 403 | |
| 404 | skin.m_forcedSkinColorscxx . . $ Skin#m_forcedSkinColors. = |
| 405 | skin_node.namedItemcxx . . $ QDomNode#namedItem(e7ddab27ad92952b).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("forced-skin-colors")).toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).().textcxx . . $ QDomElement#text(6ef7b6c27b00b43d).() ==cxx . . $ `operator==`(5bc2975d2d751687). QVariantcxx . . $ QVariant#QVariant(9f0ba574c1c44ffc).(true).toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 406 | |
| 407 | QDomElementcxx . . $ QDomElement# style_palette_root = skin_node.namedItemcxx . . $ QDomNode#namedItem(e7ddab27ad92952b).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("style-palette")).toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).(); |
| 408 | |
| 409 | if (!style_palette_root.isNullcxx . . $ QDomNode#isNull(50ce9a9e25b4a850).()) { |
| 410 | QMetaEnumcxx . . $ QMetaEnum# enumerp = QMetaEnumcxx . . $ QMetaEnum#::fromTypecxx . . $ QMetaEnum#fromType(4ccfc8a907eb718d).<QPalettecxx . . $ QPalette#::ColorGroupcxx . . $ QPalette#ColorGroup#>(); |
| 411 | QMetaEnumcxx . . $ QMetaEnum# enumerx = QMetaEnumcxx . . $ QMetaEnum#::fromTypecxx . . $ QMetaEnum#fromType(4ccfc8a907eb718d).<QPalettecxx . . $ QPalette#::ColorRolecxx . . $ QPalette#ColorRole#>(); |
| 412 | QMetaEnumcxx . . $ QMetaEnum# enumery = QMetaEnumcxx . . $ QMetaEnum#::fromTypecxx . . $ QMetaEnum#fromType(4ccfc8a907eb718d).<Qtcxx . . $ Qt/::BrushStylecxx . . $ Qt/BrushStyle#>(); |
| 413 | |
| 414 | QMultiHashcxx . . $ QMultiHash#<QPalettecxx . . $ QPalette#::ColorGroupcxx . . $ QPalette#ColorGroup#, QPaircxx . . $ QPair#<QPalettecxx . . $ QPalette#::ColorRolecxx . . $ QPalette#ColorRole#, QPaircxx . . $ QPair#<QColorcxx . . $ QColor#, Qtcxx . . $ Qt/::BrushStylecxx . . $ Qt/BrushStyle#>>> groupscxx . . $ QMultiHash#QMultiHash(ced63f7c635d850d).; |
| 415 | |
| 416 | QDomNodeListcxx . . $ QDomNodeList# groups_of_palette = style_palette_root.elementsByTagNamecxx . . $ QDomElement#elementsByTagName(7405d4a50bfe2c93).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("group")); |
| 417 | |
| 418 | for (int i = 0; i < groups_of_palette.sizecxx . . $ QDomNodeList#size(455f465bc33b4cdf).(); i++) { |
| 419 | const QDomNodecxx . . $ QDomNode#& group_root_nd = groups_of_palette.atcxx . . $ QDomNodeList#at(b6c6c70d5ef857b9).(i); |
| 420 | QPalettecxx . . $ QPalette#::ColorGroupcxx . . $ QPalette#ColorGroup# group = |
| 421 | QPalettecxx . . $ QPalette#::ColorGroupcxx . . $ QPalette#ColorGroup#(enumerp.keyToValuecxx . . $ QMetaEnum#keyToValue(f747eaf02f82dd19).(group_root_nd.toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).().attributecxx . . $ QDomElement#attribute(11b1083083847b8e).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("id")).toLatin1cxx . . $ QString#toLatin1(7c2073558a834e49).())); |
| 422 | |
| 423 | QDomNodeListcxx . . $ QDomNodeList# colors_of_group = group_root_nd.toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).().elementsByTagNamecxx . . $ QDomElement#elementsByTagName(7405d4a50bfe2c93).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("color")); |
| 424 | |
| 425 | for (int j = 0; j < colors_of_group.sizecxx . . $ QDomNodeList#size(455f465bc33b4cdf).(); j++) { |
| 426 | const QDomNodecxx . . $ QDomNode#& color_nd = colors_of_group.atcxx . . $ QDomNodeList#at(b6c6c70d5ef857b9).(j); |
| 427 | |
| 428 | QColorcxx . . $ QColor# colorcxx . . $ QColor#QColor(3520e46b33348bf6).(color_nd.toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).().textcxx . . $ QDomElement#text(6ef7b6c27b00b43d).()); |
| 429 | QPalettecxx . . $ QPalette#::ColorRolecxx . . $ QPalette#ColorRole# role = |
| 430 | QPalettecxx . . $ QPalette#::ColorRolecxx . . $ QPalette#ColorRole#(enumerx.keyToValuecxx . . $ QMetaEnum#keyToValue(f747eaf02f82dd19).(color_nd.toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).().attributecxx . . $ QDomElement#attribute(11b1083083847b8e).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("role")).toLatin1cxx . . $ QString#toLatin1(7c2073558a834e49).())); |
| 431 | Qtcxx . . $ Qt/::BrushStylecxx . . $ Qt/BrushStyle# brush = |
| 432 | Qtcxx . . $ Qt/::BrushStylecxx . . $ Qt/BrushStyle#(enumery.keyToValuecxx . . $ QMetaEnum#keyToValue(f747eaf02f82dd19).(color_nd.toElementcxx . . $ QDomNode#toElement(654df8c29726cab1).().attributecxx . . $ QDomElement#attribute(11b1083083847b8e).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("brush")).toLatin1cxx . . $ QString#toLatin1(7c2073558a834e49).())); |
| 433 | |
| 434 | groups.insertcxx . . $ QMultiHash#insert(eb6bb427bb63fb7b).(group, QPaircxx . . $ std/pair#pair(13c11f7bd0e7e3d2).<QPalettecxx . . $ QPalette#::ColorRolecxx . . $ QPalette#ColorRole#, QPaircxx . . $ QPair#<QColorcxx . . $ QColor#, Qtcxx . . $ Qt/::BrushStylecxx . . $ Qt/BrushStyle#>>(role, {cxx . . $ std/pair#pair(14d64bafa7379ebc).color, brush})); |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | skin.m_stylePalettecxx . . $ Skin#m_stylePalette. =cxx . . $ QMultiHash#`operator=`(bfd235040413e229). groups; |
| 439 | } |
| 440 | |
| 441 | // Free resources. |
| 442 | skin_file.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 443 | skin_file.deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).(); |
| 444 | |
| 445 | // Here we use "/" instead of QDir::separator() because CSS2.1 url field |
| 446 | // accepts '/' as path elements separator. |
| 447 | // |
| 448 | // USER_DATA_PLACEHOLDER is placeholder for the actual path to skin folder. This is needed for using |
| 449 | // images within the QSS file. |
| 450 | // So if one uses "%data%/images/border.png" in QSS then it is |
| 451 | // replaced by fully absolute path and target file can |
| 452 | // be safely loaded. |
| 453 | // |
| 454 | // %style% placeholder is used in main wrapper HTML file to be replaced with custom skin-wide CSS. |
| 455 | skin.m_layoutMarkupWrappercxx . . $ Skin#m_layoutMarkupWrapper. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). |
| 456 | loadSkinFilecxx . . $ SkinFactory#loadSkinFile(70ba761955aa2ec1).(skin_folder_no_sep, lite, QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("html_wrapper.html"), real_base_skin_folder); |
| 457 | |
| 458 | try { |
| 459 | auto custom_css = loadSkinFilecxx . . $ SkinFactory#loadSkinFile(70ba761955aa2ec1).(skin_folder_no_sep, lite, QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("html_style.css"), real_base_skin_folder); |
| 460 | |
| 461 | skin.m_layoutMarkupWrappercxx . . $ Skin#m_layoutMarkupWrapper. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). skin.m_layoutMarkupWrappercxx . . $ Skin#m_layoutMarkupWrapper..replacecxx . . $ QString#replace(192e628656427d1c).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!(SKIN_STYLE_PLACEHOLDERcxx . . $ `src/librssguard/definitions/definitions.h:117:9`!), custom_css); |
| 462 | } |
| 463 | catch (...) { |
| 464 | qWarningNNcxx . . $ `src/librssguard/definitions/definitions.h:417:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Skin" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(skin_name) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "does not support separated custom CSS."; |
| 465 | } |
| 466 | |
| 467 | skin.m_enclosureImageMarkupcxx . . $ Skin#m_enclosureImageMarkup. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). |
| 468 | loadSkinFilecxx . . $ SkinFactory#loadSkinFile(70ba761955aa2ec1).(skin_folder_no_sep, lite, QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("html_enclosure_image.html"), real_base_skin_folder); |
| 469 | skin.m_layoutMarkupcxx . . $ Skin#m_layoutMarkup. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). |
| 470 | loadSkinFilecxx . . $ SkinFactory#loadSkinFile(70ba761955aa2ec1).(skin_folder_no_sep, lite, QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("html_single_message.html"), real_base_skin_folder); |
| 471 | skin.m_enclosureMarkupcxx . . $ Skin#m_enclosureMarkup. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). |
| 472 | loadSkinFilecxx . . $ SkinFactory#loadSkinFile(70ba761955aa2ec1).(skin_folder_no_sep, lite, QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("html_enclosure_every.html"), real_base_skin_folder); |
| 473 | skin.m_rawDatacxx . . $ Skin#m_rawData. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). loadSkinFilecxx . . $ SkinFactory#loadSkinFile(70ba761955aa2ec1).(skin_folder_no_sep, lite, QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("qt_style.qss"), real_base_skin_folder); |
| 474 | |
| 475 | try { |
| 476 | skin.m_rawForcedDatacxx . . $ Skin#m_rawForcedData. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). |
| 477 | loadSkinFilecxx . . $ SkinFactory#loadSkinFile(70ba761955aa2ec1).(skin_folder_no_sep, lite, QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("qt_style_forced.qss"), real_base_skin_folder); |
| 478 | } |
| 479 | catch (...) { |
| 480 | qWarningNNcxx . . $ `src/librssguard/definitions/definitions.h:417:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Skin" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(skin_name) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "does not support forced QSS."; |
| 481 | } |
| 482 | |
| 483 | skin.m_adblockedcxx . . $ Skin#m_adblocked. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). loadSkinFilecxx . . $ SkinFactory#loadSkinFile(70ba761955aa2ec1).(skin_folder_no_sep, lite, QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("html_adblocked.html"), real_base_skin_folder); |
| 484 | skin.m_skinFoldercxx . . $ Skin#m_skinFolder. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). skin_folder_no_sep; |
| 485 | |
| 486 | if (ok != nullptr) { |
| 487 | *ok = !skin.m_authorcxx . . $ Skin#m_author..isEmptycxx . . $ QString#isEmpty(3482b152b9333168).() && !skin.m_versioncxx . . $ Skin#m_version..isEmptycxx . . $ QString#isEmpty(3482b152b9333168).() && !skin.m_baseNamecxx . . $ Skin#m_baseName..isEmptycxx . . $ QString#isEmpty(3482b152b9333168).() && |
| 488 | !skin.m_layoutMarkupcxx . . $ Skin#m_layoutMarkup..isEmptycxx . . $ QString#isEmpty(3482b152b9333168).(); |
| 489 | } |
| 490 | |
| 491 | return skin; |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | if (ok != nullptr) { |
| 496 | *ok = false; |
| 497 | } |
| 498 | |
| 499 | return skin; |
| 500 | } |
| 501 | |
| 502 | QStringcxx . . $ QString# SkinFactorycxx . . $ SkinFactory#::loadSkinFilecxx . . $ SkinFactory#loadSkinFile(70ba761955aa2ec1).(const QStringcxx . . $ QString#& skin_folder, |
| 503 | bool lite, |
| 504 | const QStringcxx . . $ QString#& file_name, |
| 505 | const QStringcxx . . $ QString#& base_folder) const { |
| 506 | QStringListcxx . . $ QStringList# prefixes = {cxx . . $ QList#QList(b6da5b9a9f304025).QStringcxx . . $ QString#QString(ced63f7c635d850d).()}; |
| 507 | |
| 508 | if (lite) { |
| 509 | prefixes.prependcxx . . $ QList#prepend(1262c8661f7a27a7).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("lite_")); |
| 510 | } |
| 511 | |
| 512 | for (const QStringcxx . . $ QString#& prefix : prefixes) { |
| 513 | QStringcxx . . $ QString# local_file = QDircxx . . $ QDir#::toNativeSeparatorscxx . . $ QDir#toNativeSeparators(fd988a2ab94d906b).(skin_folder + QDircxx . . $ QDir#::separatorcxx . . $ QDir#separator(44eb9225326fcbf5).() + prefix + file_name); |
| 514 | QStringcxx . . $ QString# base_file = QDircxx . . $ QDir#::toNativeSeparatorscxx . . $ QDir#toNativeSeparators(fd988a2ab94d906b).(base_folder + QDircxx . . $ QDir#::separatorcxx . . $ QDir#separator(44eb9225326fcbf5).() + prefix + file_name); |
| 515 | QStringcxx . . $ QString# datacxx . . $ QString#QString(ced63f7c635d850d).; |
| 516 | |
| 517 | if (QFilecxx . . $ QFile#::existscxx . . $ QFile#exists(e1defb592416720d).(local_file)) { |
| 518 | qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Local file" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(local_file) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "exists, using it for the skin."; |
| 519 | data =cxx . . $ QString#`operator=`(4f35bf974e7f8568). QStringcxx . . $ QString#::fromUtf8cxx . . $ QString#fromUtf8(4e15edac36d215be).(IOFactorycxx . . $ IOFactory#::readFilecxx . . $ IOFactory#readFile(743b31b35d83e992).(local_file)); |
| 520 | return datacxx . . $ QString#QString(132dd6869045752b)..replacecxx . . $ QString#replace(192e628656427d1c).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!(USER_DATA_PLACEHOLDERcxx . . $ `src/librssguard/definitions/definitions.h:116:9`!), skin_folder); |
| 521 | } |
| 522 | else if (QFilecxx . . $ QFile#::existscxx . . $ QFile#exists(e1defb592416720d).(base_file)) { |
| 523 | qDebugNNcxx . . $ `src/librssguard/definitions/definitions.h:413:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). LOGSEC_GUIcxx . . $ `src/librssguard/definitions/definitions.h:174:9`! <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Base file" <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). QUOTE_W_SPACEcxx . . $ `src/librssguard/definitions/definitions.h:432:9`!(base_file) <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "exists, using it for the skin."; |
| 524 | data =cxx . . $ QString#`operator=`(4f35bf974e7f8568). QStringcxx . . $ QString#::fromUtf8cxx . . $ QString#fromUtf8(4e15edac36d215be).(IOFactorycxx . . $ IOFactory#::readFilecxx . . $ IOFactory#readFile(743b31b35d83e992).(base_file)); |
| 525 | return datacxx . . $ QString#QString(132dd6869045752b)..replacecxx . . $ QString#replace(192e628656427d1c).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!(USER_DATA_PLACEHOLDERcxx . . $ `src/librssguard/definitions/definitions.h:116:9`!), base_folder); |
| 526 | } |
| 527 | } |
| 528 | |
| 529 | throw ApplicationExceptioncxx . . $ ApplicationException#(trcxx . . $ SkinFactory#tr(75d9f1c324b4579d).("file %1 not found").argcxx . . $ QString#arg(ad0bca07273edcc2).(file_name)); |
| 530 | } |
| 531 | |
| 532 | QStringcxx . . $ QString# SkinFactorycxx . . $ SkinFactory#::currentStylecxx . . $ SkinFactory#currentStyle(6ef7b6c27b00b43d).() const { |
| 533 | return m_currentStylecxx . . $ QString#QString(132dd6869045752b).; |
| 534 | } |
| 535 | |
| 536 | bool SkinFactorycxx . . $ SkinFactory#::styleIsFrozencxx . . $ SkinFactory#styleIsFrozen(50ce9a9e25b4a850).() const { |
| 537 | return m_styleIsFrozencxx . . $ SkinFactory#m_styleIsFrozen.; |
| 538 | } |
| 539 | |
| 540 | QListcxx . . $ QList#<Skincxx . . $ Skin#> SkinFactorycxx . . $ SkinFactory#::installedSkinscxx . . $ SkinFactory#installedSkins(6e0bfb6e3ecd787).() const { |
| 541 | QListcxx . . $ QList#<Skincxx . . $ Skin#> skinscxx . . $ QList#QList(ced63f7c635d850d).; |
| 542 | bool skin_load_ok; |
| 543 | QStringListcxx . . $ QStringList# skin_directories = |
| 544 | QDircxx . . $ QDir#QDir(3520e46b33348bf6).(APP_SKIN_PATHcxx . . $ `src/librssguard/definitions/definitions.h:391:9`!).entryListcxx . . $ QDir#entryList(3fe250bba0b6170d).(QDircxx . . $ QDir#::Filtercxx . . $ QDir#Filter#::Dirscxx . . $ QDir#Dirs. |cxx . . $ `operator|`(153b300229e4e3d0). QDircxx . . $ QDir#::Filtercxx . . $ QDir#Filter#::NoDotAndDotDotcxx . . $ QDir#NoDotAndDotDot. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::Filtercxx . . $ QDir#Filter#::Readablecxx . . $ QDir#Readable.); |
| 545 | |
| 546 | skin_directories.appendcxx . . $ QList#append(b1a5d2b9a710f6d1).(QDircxx . . $ QDir#QDir(3520e46b33348bf6).(customSkinBaseFoldercxx . . $ SkinFactory#customSkinBaseFolder(6ef7b6c27b00b43d).()) |
| 547 | .entryListcxx . . $ QDir#entryList(3fe250bba0b6170d).(QDircxx . . $ QDir#::Filtercxx . . $ QDir#Filter#::Dirscxx . . $ QDir#Dirs. |cxx . . $ `operator|`(153b300229e4e3d0). QDircxx . . $ QDir#::Filtercxx . . $ QDir#Filter#::NoDotAndDotDotcxx . . $ QDir#NoDotAndDotDot. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::Filtercxx . . $ QDir#Filter#::Readablecxx . . $ QDir#Readable.)); |
| 548 | |
| 549 | for (const QStringcxx . . $ QString#& base_directory : skin_directories) { |
| 550 | const Skincxx . . $ Skin# skin_info = skinInfocxx . . $ SkinFactory#skinInfo(384eb71cba31a432).(base_directory, false, &skin_load_ok); |
| 551 | |
| 552 | if (skin_load_ok) { |
| 553 | skins.appendcxx . . $ QList#append(200d2dc08238a4ed).(skin_info); |
| 554 | } |
| 555 | } |
| 556 | |
| 557 | return skins; |
| 558 | } |
| 559 | |
| 560 | uintcxx . . $ uint# qHashcxx . . $ qHash(73416132edef71d6).(const SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors#& key) { |
| 561 | return uintcxx . . $ uint#(key); |
| 562 | } |
| 563 | |
| 564 | QVariantcxx . . $ QVariant# Skincxx . . $ Skin#::colorForModelcxx . . $ Skin#colorForModel(b703ae9a1ce5301d).(SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors# type, bool use_skin_colors, bool ignore_custom_colors) const { |
| 565 | if (!ignore_custom_colors) { |
| 566 | bool enabled = qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(CustomSkinColors), SETTINGcxx . . $ `src/librssguard/miscellaneous/settings.h:30:9`!(CustomSkinColors::Enabled)).toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).(); |
| 567 | |
| 568 | if (enabled) { |
| 569 | const QMetaObjectcxx . . $ QMetaObject#& mo = SkinEnumscxx . . $ SkinEnums#::staticMetaObjectcxx . . $ SkinEnums#staticMetaObject.; |
| 570 | QMetaEnumcxx . . $ QMetaEnum# enumer = mo.enumeratorcxx . . $ QMetaObject#enumerator(a51202743b84b02c).(mo.indexOfEnumeratorcxx . . $ QMetaObject#indexOfEnumerator(78f035161ffa9fe2).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("PaletteColors").toLocal8Bitcxx . . $ QString#toLocal8Bit(7c2073558a834e49).().constDatacxx . . $ QByteArray#constData(ba32b354807b2b81).())); |
| 571 | QColorcxx . . $ QColor# custom_clr = qAppcxx . . $ `src/librssguard/miscellaneous/application.h:30:9`!->settingscxx . . $ Application#settings(951936487a2d9252).()->valuecxx . . $ Settings#value(8f1f29a69568d71a).(GROUPcxx . . $ `src/librssguard/miscellaneous/settings.h:32:9`!(CustomSkinColors), enumercxx . . $ QString#QString(85c52e162fed56f9)..valueToKeycxx . . $ QMetaEnum#valueToKey(5afb982068bc4a78).(int(type))).toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 572 | |
| 573 | if (custom_clr.isValidcxx . . $ QColor#isValid(3482b152b9333168).()) { |
| 574 | return custom_clr; |
| 575 | } |
| 576 | } |
| 577 | } |
| 578 | |
| 579 | return (use_skin_colors && m_colorPalettecxx . . $ Skin#m_colorPalette..containscxx . . $ QHash#contains(5247d2cea5ab73ba).(type)) ? m_colorPalettecxx . . $ Skin#m_colorPalette.[cxx . . $ QHash#`operator[]`(854d5543fd532bc7).type] : QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).(); |
| 580 | } |
| 581 | |
| 582 | QPalettecxx . . $ QPalette# Skincxx . . $ Skin#::extractPalettecxx . . $ Skin#extractPalette(e5fe513100f8bd45).() const { |
| 583 | QPalettecxx . . $ QPalette# palcxx . . $ QPalette#QPalette(49f6e7a06ebc5aa8).; |
| 584 | QListcxx . . $ QList#<QPalettecxx . . $ QPalette#::ColorGroupcxx . . $ QPalette#ColorGroup#> groups = m_stylePalettecxx . . $ Skin#m_stylePalette..keyscxx . . $ QMultiHash#keys(bf6c511543d55010).(); |
| 585 | |
| 586 | if (groups.containscxx . . $ QListSpecialMethodsBase#contains(7349e39e0b02d05c).(QPalettecxx . . $ QPalette#::ColorGroupcxx . . $ QPalette#ColorGroup#::Allcxx . . $ QPalette#All.)) { |
| 587 | |
| 588 | groups.removeAllcxx . . $ QList#removeAll(5aa96cff9a2299b8).(QPalettecxx . . $ QPalette#::ColorGroupcxx . . $ QPalette#ColorGroup#::Allcxx . . $ QPalette#All.); |
| 589 | groups.insertcxx . . $ QList#insert(b17e17ae79559c10).(0, QPalettecxx . . $ QPalette#::ColorGroupcxx . . $ QPalette#ColorGroup#::Allcxx . . $ QPalette#All.); |
| 590 | } |
| 591 | |
| 592 | for (QPalettecxx . . $ QPalette#::ColorGroupcxx . . $ QPalette#ColorGroup# grp : groups) { |
| 593 | auto roles = m_stylePalettecxx . . $ Skin#m_stylePalette..valuescxx . . $ QMultiHash#values(8fb875fcb58d4a3b).(grp); |
| 594 | |
| 595 | for (const auto& rl : roles) { |
| 596 | if (rl.secondcxx . . $ std/pair#second..secondcxx . . $ std/pair#second. <= 0) { |
| 597 | pal.setColorcxx . . $ QPalette#setColor(5c3218fcc49a2895).(grp, rl.firstcxx . . $ std/pair#first., rl.secondcxx . . $ std/pair#second..firstcxx . . $ std/pair#first.); |
| 598 | } |
| 599 | else { |
| 600 | pal.setBrushcxx . . $ QPalette#setBrush(4a01bd8406c2d545).(grp, rl.firstcxx . . $ std/pair#first., QBrushcxx . . $ QBrush#QBrush(b50947b0752ea6ac).(rl.secondcxx . . $ std/pair#second..firstcxx . . $ std/pair#first., rl.secondcxx . . $ std/pair#second..secondcxx . . $ std/pair#second.)); |
| 601 | } |
| 602 | } |
| 603 | } |
| 604 | |
| 605 | return palcxx . . $ QPalette#QPalette(30b8f77ffb5f27).; |
| 606 | } |
| 607 | |
| 608 | QStringcxx . . $ QString# SkinEnumscxx . . $ SkinEnums#::palleteColorTextcxx . . $ SkinEnums#palleteColorText(cb6efd9004cff0cb).(PaletteColorscxx . . $ SkinEnums#PaletteColors# col) { |
| 609 | switch (col) { |
| 610 | case SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors#::FgInterestingcxx . . $ SkinEnums#PaletteColors#FgInteresting.: |
| 611 | return QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("interesting stuff"); |
| 612 | |
| 613 | case SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors#::FgSelectedInterestingcxx . . $ SkinEnums#PaletteColors#FgSelectedInteresting.: |
| 614 | return QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("interesting stuff (highlighted)"); |
| 615 | |
| 616 | case SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors#::FgErrorcxx . . $ SkinEnums#PaletteColors#FgError.: |
| 617 | return QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("errored items"); |
| 618 | |
| 619 | case SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors#::FgSelectedErrorcxx . . $ SkinEnums#PaletteColors#FgSelectedError.: |
| 620 | return QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("errored items (highlighted)"); |
| 621 | |
| 622 | case SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors#::FgNewMessagescxx . . $ SkinEnums#PaletteColors#FgNewMessages.: |
| 623 | return QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("items with new articles"); |
| 624 | |
| 625 | case SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors#::FgSelectedNewMessagescxx . . $ SkinEnums#PaletteColors#FgSelectedNewMessages.: |
| 626 | return QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("items with new articles (highlighted)"); |
| 627 | |
| 628 | case SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors#::Allrightcxx . . $ SkinEnums#PaletteColors#Allright.: |
| 629 | return QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("OK-ish color"); |
| 630 | |
| 631 | case SkinEnumscxx . . $ SkinEnums#::PaletteColorscxx . . $ SkinEnums#PaletteColors#::FgDisabledFeedcxx . . $ SkinEnums#PaletteColors#FgDisabledFeed.: |
| 632 | return QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("disabled items"); |
| 633 | |
| 634 | default: |
| 635 | return {cxx . . $ QString#QString(ced63f7c635d850d).}; |
| 636 | } |
| 637 | } |