mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 19:55:07 +02:00
move imagePaths into .h so simplify matching enum values to image files
This commit is contained in:
parent
744da710a3
commit
576ae227a8
2 changed files with 7 additions and 6 deletions
|
@ -17,12 +17,6 @@ QImage DesktopPreviewProvider::getPreviewDisabledImage(bool vsyncEnabled) const
|
|||
auto imageIndex = vsyncEnabled ? VSYNC : m_previewDisabledReason;
|
||||
assert(imageIndex >= 0 && imageIndex <= VSYNC);
|
||||
|
||||
static const QString imagePaths[] = {
|
||||
"images/preview-disabled.png", // USER
|
||||
"images/preview-privacy.png", // WALLET
|
||||
"images/preview.png", // VSYNC
|
||||
};
|
||||
|
||||
return !m_previewDisabled[imageIndex].isNull() ? m_previewDisabled[imageIndex] : loadPreviewImage(m_previewDisabled[imageIndex], PathUtils::resourcesPath() + imagePaths[imageIndex]);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,13 @@ class DesktopPreviewProvider : public QObject, public Dependency {
|
|||
|
||||
DesktopPreviewProvider();
|
||||
DesktopPreviewProvider(const DesktopPreviewProvider& other) = delete;
|
||||
|
||||
constexpr static char* imagePaths[] = {
|
||||
"images/preview-disabled.png", // USER
|
||||
"images/preview-privacy.png", // SECURE_SCREEN
|
||||
"images/preview.png", // VSYNC
|
||||
};
|
||||
|
||||
public:
|
||||
enum PreviewDisabledReasons {
|
||||
USER = 0,
|
||||
|
|
Loading…
Reference in a new issue