Fix path to fallback theme icon.
This commit is contained in:
parent
4dbac33c96
commit
6a114ac94e
|
@ -63,10 +63,9 @@ auto main(int argc, char *argv[]) -> int
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACX)
|
||||||
Q_INIT_RESOURCE(mac_light_theme); // NOLINT
|
Q_INIT_RESOURCE(mac_light_theme); // NOLINT
|
||||||
Q_INIT_RESOURCE(mac_dark_theme); // NOLINT
|
Q_INIT_RESOURCE(mac_dark_theme); // NOLINT
|
||||||
#else
|
#endif
|
||||||
Q_INIT_RESOURCE(win_light_theme); // NOLINT
|
Q_INIT_RESOURCE(win_light_theme); // NOLINT
|
||||||
Q_INIT_RESOURCE(win_dark_theme); // NOLINT
|
Q_INIT_RESOURCE(win_dark_theme); // NOLINT
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
VAbstractApplication::WinAttachConsole();
|
VAbstractApplication::WinAttachConsole();
|
||||||
|
|
|
@ -61,10 +61,9 @@ auto main(int argc, char *argv[]) -> int
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACX)
|
||||||
Q_INIT_RESOURCE(mac_light_theme); // NOLINT
|
Q_INIT_RESOURCE(mac_light_theme); // NOLINT
|
||||||
Q_INIT_RESOURCE(mac_dark_theme); // NOLINT
|
Q_INIT_RESOURCE(mac_dark_theme); // NOLINT
|
||||||
#else
|
#endif
|
||||||
Q_INIT_RESOURCE(win_light_theme); // NOLINT
|
Q_INIT_RESOURCE(win_light_theme); // NOLINT
|
||||||
Q_INIT_RESOURCE(win_dark_theme); // NOLINT
|
Q_INIT_RESOURCE(win_dark_theme); // NOLINT
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
VAbstractApplication::WinAttachConsole();
|
VAbstractApplication::WinAttachConsole();
|
||||||
|
|
|
@ -69,10 +69,9 @@ auto main(int argc, char *argv[]) -> int
|
||||||
#if defined(Q_OS_MACX)
|
#if defined(Q_OS_MACX)
|
||||||
Q_INIT_RESOURCE(mac_light_theme); // NOLINT
|
Q_INIT_RESOURCE(mac_light_theme); // NOLINT
|
||||||
Q_INIT_RESOURCE(mac_dark_theme); // NOLINT
|
Q_INIT_RESOURCE(mac_dark_theme); // NOLINT
|
||||||
#else
|
#endif
|
||||||
Q_INIT_RESOURCE(win_light_theme); // NOLINT
|
Q_INIT_RESOURCE(win_light_theme); // NOLINT
|
||||||
Q_INIT_RESOURCE(win_dark_theme); // NOLINT
|
Q_INIT_RESOURCE(win_dark_theme); // NOLINT
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
VAbstractApplication::WinAttachConsole();
|
VAbstractApplication::WinAttachConsole();
|
||||||
|
|
|
@ -597,7 +597,9 @@ void VTheme::ResetThemeSettings() const
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VTheme::GetFallbackThemeIcon(const QString &iconName, QSize iconSize) -> QIcon
|
auto VTheme::GetFallbackThemeIcon(const QString &iconName, QSize iconSize) -> QIcon
|
||||||
{
|
{
|
||||||
QString filePath = QStringLiteral(":icons/%1/%2.svg").arg(DefaultThemeName(), iconName);
|
const QString themePrefix = (ColorSheme() == VColorSheme::Light ? QStringLiteral("Light") : QStringLiteral("Dark"));
|
||||||
|
const QString themeName = QStringLiteral("Eleven-%1").arg(themePrefix);
|
||||||
|
const QString filePath = QStringLiteral(":icons/%1/%2.svg").arg(themeName, iconName);
|
||||||
|
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
icon.addFile(filePath, iconSize, QIcon::Normal, QIcon::On);
|
icon.addFile(filePath, iconSize, QIcon::Normal, QIcon::On);
|
||||||
|
|
|
@ -205,7 +205,6 @@ VLib {
|
||||||
"win_light_theme.qrc",
|
"win_light_theme.qrc",
|
||||||
"win_dark_theme.qrc"
|
"win_dark_theme.qrc"
|
||||||
]
|
]
|
||||||
condition: !qbs.targetOS.contains("macos")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user