diff --git a/muse b/muse index 85cb301795f5c..e0c49b9ea5c60 160000 --- a/muse +++ b/muse @@ -1 +1 @@ -Subproject commit 85cb301795f5cf729e0c4d93082e9a7ef0d94936 +Subproject commit e0c49b9ea5c605b6ca8dc08dc3611474d70097c2 diff --git a/sandbox/web_sandbox/configs/dark.cfg b/sandbox/web_sandbox/configs/dark.cfg index 79daf9bfa7de5..d164f9a9dcb99 100644 --- a/sandbox/web_sandbox/configs/dark.cfg +++ b/sandbox/web_sandbox/configs/dark.cfg @@ -3,7 +3,7 @@ "background_secondary_color": "#363638", "popup_background_color": "#39393C", "text_field_color": "#242427", - "accent_color": "#2093FE", + "accent_color": "#2082DD", "stroke_color": "#1E1E1E", "button_color": "#595959", "font_primary_color": "#EBEBEB", diff --git a/sandbox/web_sandbox/configs/light.cfg b/sandbox/web_sandbox/configs/light.cfg index 490417bc57b15..355e581c7aa5e 100644 --- a/sandbox/web_sandbox/configs/light.cfg +++ b/sandbox/web_sandbox/configs/light.cfg @@ -3,7 +3,7 @@ "background_secondary_color": "#E6E9ED", "popup_background_color": "#F5F5F6", "text_field_color": "#FFFFFF", - "accent_color": "#70AFEA", + "accent_color": "#62B1FA", "stroke_color": "#CED1D4", "button_color": "#CFD5DD", "font_primary_color": "#111132", diff --git a/src/app/configs/dark.cfg b/src/app/configs/dark.cfg index 79daf9bfa7de5..d164f9a9dcb99 100644 --- a/src/app/configs/dark.cfg +++ b/src/app/configs/dark.cfg @@ -3,7 +3,7 @@ "background_secondary_color": "#363638", "popup_background_color": "#39393C", "text_field_color": "#242427", - "accent_color": "#2093FE", + "accent_color": "#2082DD", "stroke_color": "#1E1E1E", "button_color": "#595959", "font_primary_color": "#EBEBEB", diff --git a/src/app/configs/light.cfg b/src/app/configs/light.cfg index 490417bc57b15..355e581c7aa5e 100644 --- a/src/app/configs/light.cfg +++ b/src/app/configs/light.cfg @@ -3,7 +3,7 @@ "background_secondary_color": "#E6E9ED", "popup_background_color": "#F5F5F6", "text_field_color": "#FFFFFF", - "accent_color": "#70AFEA", + "accent_color": "#62B1FA", "stroke_color": "#CED1D4", "button_color": "#CFD5DD", "font_primary_color": "#111132", diff --git a/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/FirstLaunchSetupDialog.qml b/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/FirstLaunchSetupDialog.qml index 6dff426609f28..247897e839797 100644 --- a/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/FirstLaunchSetupDialog.qml +++ b/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/FirstLaunchSetupDialog.qml @@ -32,7 +32,7 @@ StyledDialogView { title: qsTrc("appshell/gettingstarted", "Getting started") contentWidth: 576 - contentHeight: 384 + contentHeight: 416 margins: 20 diff --git a/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/ThemesPage.qml b/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/ThemesPage.qml index 32306137f3b90..e31d6c9a3ea20 100644 --- a/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/ThemesPage.qml +++ b/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/ThemesPage.qml @@ -78,7 +78,9 @@ Page { Layout.alignment: Qt.AlignCenter themes: model.highContrastEnabled ? model.highContrastThemes : model.generalThemes + themeCodes: model.highContrastEnabled ? model.highContrastThemeCodes : model.generalThemeCodes currentThemeCode: model.currentThemeCode + highContrast: model.highContrastEnabled spacing: 48 @@ -99,9 +101,6 @@ Page { colors: model.accentColors currentColorIndex: model.currentAccentColorIndex - sampleSize: 20 - spacing: 4 - navigationPanel.section: root.navigationSection navigationPanel.order: root.navigationStartRow + 3 diff --git a/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/TutorialsPage.qml b/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/TutorialsPage.qml index 7f39bed115a72..a0fe9a601d40e 100644 --- a/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/TutorialsPage.qml +++ b/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/TutorialsPage.qml @@ -32,7 +32,7 @@ Page { title: qsTrc("appshell/gettingstarted", "Video tutorials") explanation: qsTrc("appshell/gettingstarted", "Behind this dialog is the ‘Learn’ section, where you’ll find tutorials to get you started\n(Video tutorials require an internet connection)") - titleContentSpacing: 24 + titleContentSpacing: 32 TutorialsPageModel { id: tutorialsModel @@ -42,7 +42,7 @@ Page { id: content anchors.fill: parent - spacing: 20 + spacing: 40 Item { id: imageArea @@ -55,8 +55,8 @@ Page { anchors.centerIn: parent - height: parent.height - width: implicitWidth + height: 172 + width: 277 fillMode: Image.PreserveAspectFit source: "resources/VideoTutorials.png" diff --git a/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/resources/MuseSounds.png b/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/resources/MuseSounds.png index dcb3d37f67bb3..80ab419f776c3 100644 Binary files a/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/resources/MuseSounds.png and b/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/resources/MuseSounds.png differ diff --git a/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/themespagemodel.cpp b/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/themespagemodel.cpp index 9ce9047a17c1b..4860b1fc0295c 100644 --- a/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/themespagemodel.cpp +++ b/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/themespagemodel.cpp @@ -66,6 +66,22 @@ ThemeList ThemesPageModel::allThemes() const return uiConfiguration()->themes(); } +QStringList ThemesPageModel::generalThemeCodes() const +{ + return { + QString::fromStdString(LIGHT_THEME_CODE), + QString::fromStdString(DARK_THEME_CODE) + }; +} + +QStringList ThemesPageModel::highContrastThemeCodes() const +{ + return { + QString::fromStdString(HIGH_CONTRAST_WHITE_THEME_CODE), + QString::fromStdString(HIGH_CONTRAST_BLACK_THEME_CODE) + }; +} + QVariantList ThemesPageModel::generalThemes() const { QVariantList result; diff --git a/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/themespagemodel.h b/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/themespagemodel.h index 2838dd0df971b..3fd162ad64b31 100644 --- a/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/themespagemodel.h +++ b/src/appshell/qml/MuseScore/AppShell/FirstLaunchSetup/themespagemodel.h @@ -38,6 +38,9 @@ class ThemesPageModel : public QObject, public muse::Contextable, public muse::a Q_PROPERTY(bool isFollowSystemThemeAvailable READ isFollowSystemThemeAvailable CONSTANT) Q_PROPERTY(bool isFollowSystemTheme READ isFollowSystemTheme WRITE setFollowSystemTheme NOTIFY isFollowSystemThemeChanged) + Q_PROPERTY(QStringList generalThemeCodes READ generalThemeCodes CONSTANT) + Q_PROPERTY(QStringList highContrastThemeCodes READ highContrastThemeCodes CONSTANT) + Q_PROPERTY(bool highContrastEnabled READ highContrastEnabled WRITE setHighContrastEnabled NOTIFY highContrastEnabledChanged) Q_PROPERTY(QVariantList generalThemes READ generalThemes NOTIFY themesChanged) Q_PROPERTY(QVariantList highContrastThemes READ highContrastThemes NOTIFY themesChanged) @@ -58,6 +61,8 @@ class ThemesPageModel : public QObject, public muse::Contextable, public muse::a bool isFollowSystemThemeAvailable() const; bool isFollowSystemTheme() const; + QStringList generalThemeCodes() const; + QStringList highContrastThemeCodes() const; QVariantList generalThemes() const; QVariantList highContrastThemes() const; bool highContrastEnabled() const; diff --git a/src/preferences/qml/MuseScore/Preferences/AccentColorsList.qml b/src/preferences/qml/MuseScore/Preferences/AccentColorsList.qml index 64057e346f8a6..b055991295f74 100644 --- a/src/preferences/qml/MuseScore/Preferences/AccentColorsList.qml +++ b/src/preferences/qml/MuseScore/Preferences/AccentColorsList.qml @@ -26,83 +26,109 @@ import QtQuick import Muse.Ui import Muse.UiComponents -RadioButtonGroup { +Grid { id: root - property alias colors: root.model - property alias currentColorIndex: root.currentIndex + property var colors: [] + property int currentColorIndex: -1 property NavigationPanel navigationPanel: NavigationPanel { name: "AccentColorsList" enabled: root.enabled && root.visible - direction: NavigationPanel.Horizontal + direction: NavigationPanel.Both onNavigationEvent: function(event) { - if (event.type === NavigationEvent.AboutActive) { - event.setData("controlIndex", [root.navigationRow, root.navigationColumnStart + root.currentIndex]) + if (event.type === NavigationEvent.AboutActive && root.currentColorIndex >= 0) { + event.setData("controlIndex", [root.navigationRowOf(root.currentColorIndex), + root.navigationColumnOf(root.currentColorIndex)]) } } } - property int navigationRow: -1 + property int navigationRow: 0 property int navigationColumnStart: 0 - property int navigationColumnEnd: navigationColumnStart + count - property real sampleSize: 30 + property real sampleSize: 24 readonly property real totalSampleSize: sampleSize + 6 signal accentColorChangeRequested(var newColorIndex) - implicitWidth: count * totalSampleSize + (count - 1) * spacing - implicitHeight: totalSampleSize - spacing: 10 + columns: Math.floor(root.colors.length / 2) + spacing: 6 - delegate: RoundedRadioButton { - id: button + // Visual order of the color indices (first row is left-to-right, second row is right-to-left): + readonly property var orderedColorIndices: { + let indices = [] - required property int index - required property var modelData - readonly property color accentColor: modelData + for (let i = 0; i < root.columns && i < root.colors.length; ++i) { + indices.push(i) + } + for (let j = root.colors.length - 1; j >= root.columns; --j) { + indices.push(j) + } + return indices + } - width: root.totalSampleSize - height: width + function navigationRowOf(colorIndex) { + return root.navigationRow + (colorIndex < root.columns ? 0 : 1) + } - checked: root.currentIndex === index + function navigationColumnOf(colorIndex) { + return root.navigationColumnStart + (colorIndex < root.columns + ? colorIndex + : root.colors.length - 1 - colorIndex) + } - navigation.name: "AccentColourButton" - navigation.panel: root.navigationPanel - navigation.row: root.navigationRow - navigation.column: root.navigationColumnStart + index - navigation.accessible.name: Utils.accessibleColorDescription(accentColor) + Repeater { + model: root.orderedColorIndices - onToggled: { - root.accentColorChangeRequested(index) - } + delegate: RoundedRadioButton { + id: button + + required property var modelData + readonly property int colorIndex: modelData + readonly property color accentColor: root.colors[colorIndex] - indicator: Rectangle { - anchors.fill: parent + width: root.totalSampleSize + height: width - color: "transparent" - border.color: ui.theme.fontPrimaryColor - border.width: parent.checked ? 1 : 0 - radius: width / 2 + checked: root.currentColorIndex === colorIndex - NavigationFocusBorder { navigationCtrl: button.navigation } + navigation.name: "AccentColourButton" + navigation.panel: root.navigationPanel + navigation.row: root.navigationRowOf(colorIndex) + navigation.column: root.navigationColumnOf(colorIndex) + navigation.accessible.name: Utils.accessibleColorDescription(accentColor) - Rectangle { - anchors.centerIn: parent + onToggled: { + root.accentColorChangeRequested(colorIndex) + } + + indicator: Rectangle { + anchors.fill: parent - width: root.sampleSize - height: width + color: "transparent" + border.color: ui.theme.fontPrimaryColor + border.width: parent.checked ? 1 : 0 radius: width / 2 - border.color: ui.theme.strokeColor - border.width: 1 + NavigationFocusBorder { navigationCtrl: button.navigation } + + Rectangle { + anchors.centerIn: parent + + width: root.sampleSize + height: width + radius: width / 2 - color: button.accentColor + border.color: ui.theme.strokeColor + border.width: 1 + + color: button.accentColor + } } - } - background: null + background: null + } } } diff --git a/src/preferences/qml/MuseScore/Preferences/AppearancePreferencesPage.qml b/src/preferences/qml/MuseScore/Preferences/AppearancePreferencesPage.qml index ddd68e2b3a6b9..6e49aa987487a 100644 --- a/src/preferences/qml/MuseScore/Preferences/AppearancePreferencesPage.qml +++ b/src/preferences/qml/MuseScore/Preferences/AppearancePreferencesPage.qml @@ -46,6 +46,7 @@ PreferencesPage { width: parent.width themes: appearanceModel.highContrastEnabled ? appearanceModel.highContrastThemes : appearanceModel.generalThemes + themeCodes: appearanceModel.highContrastEnabled ? appearanceModel.highContrastThemeCodes : appearanceModel.generalThemeCodes currentThemeCode: appearanceModel.currentThemeCode highContrastEnabled: appearanceModel.highContrastEnabled isFollowSystemThemeAvailable: appearanceModel.isFollowSystemThemeAvailable diff --git a/src/preferences/qml/MuseScore/Preferences/ThemeSamplesList.qml b/src/preferences/qml/MuseScore/Preferences/ThemeSamplesList.qml index aa19555d13a96..4aeda60c6883b 100644 --- a/src/preferences/qml/MuseScore/Preferences/ThemeSamplesList.qml +++ b/src/preferences/qml/MuseScore/Preferences/ThemeSamplesList.qml @@ -29,10 +29,12 @@ import "internal" ListView { id: root - property alias themes: root.model + required property var themes // re-read on every color edit, used to paint the samples + property alias themeCodes: root.model // does not change on color edits, so that the delegates aren't destroyed & re-created property string currentThemeCode + property bool highContrast: false - currentIndex: model.findIndex((theme) => theme.codeKey === currentThemeCode) + currentIndex: themeCodes.indexOf(currentThemeCode) property NavigationPanel navigationPanel: NavigationPanel { name: "ThemeSamplesList" @@ -70,26 +72,29 @@ ListView { spacing: 16 + readonly property var themeData: root.themes.find((theme) => theme.codeKey === modelData) + ThemeSample { - theme: modelData + theme: parent.themeData ?? ui.theme + highContrast: root.highContrast onClicked: { - root.themeChangeRequested(modelData.codeKey) + root.themeChangeRequested(modelData) } } RoundedRadioButton { width: parent.width - checked: root.currentThemeCode === modelData.codeKey - text: modelData.title + checked: root.currentThemeCode === modelData + text: parent.themeData ? parent.themeData.title : "" navigation.name: text navigation.panel: root.navigationPanel navigation.row: root.navigationRow - navigation.column: root.navigationColumnStart + model.index + navigation.column: root.navigationColumnStart + index onToggled: { - root.themeChangeRequested(modelData.codeKey) + root.themeChangeRequested(modelData) } } } diff --git a/src/preferences/qml/MuseScore/Preferences/appearancepreferencesmodel.cpp b/src/preferences/qml/MuseScore/Preferences/appearancepreferencesmodel.cpp index 3a2ebb84edf9c..98b8ddf5532f2 100644 --- a/src/preferences/qml/MuseScore/Preferences/appearancepreferencesmodel.cpp +++ b/src/preferences/qml/MuseScore/Preferences/appearancepreferencesmodel.cpp @@ -46,9 +46,17 @@ void AppearancePreferencesModel::init() emit isFollowSystemThemeChanged(); }); + m_lastHighContrast = highContrastEnabled(); + uiConfiguration()->currentThemeChanged().onNotify(this, [this]() { emit themesChanged(); emit foregroundColorChanged(); + + bool hc = highContrastEnabled(); + if (hc != m_lastHighContrast) { + m_lastHighContrast = hc; + emit highContrastEnabledChanged(); + } }); uiConfiguration()->fontChanged().onNotify(this, [this]() { @@ -103,6 +111,22 @@ bool AppearancePreferencesModel::highContrastEnabled() const return uiConfiguration()->isHighContrast(); } +QStringList AppearancePreferencesModel::generalThemeCodes() const +{ + return { + QString::fromStdString(LIGHT_THEME_CODE), + QString::fromStdString(DARK_THEME_CODE) + }; +} + +QStringList AppearancePreferencesModel::highContrastThemeCodes() const +{ + return { + QString::fromStdString(HIGH_CONTRAST_WHITE_THEME_CODE), + QString::fromStdString(HIGH_CONTRAST_BLACK_THEME_CODE) + }; +} + QVariantList AppearancePreferencesModel::generalThemes() const { QVariantList result; diff --git a/src/preferences/qml/MuseScore/Preferences/appearancepreferencesmodel.h b/src/preferences/qml/MuseScore/Preferences/appearancepreferencesmodel.h index ee3a15393ee17..556d4928407da 100644 --- a/src/preferences/qml/MuseScore/Preferences/appearancepreferencesmodel.h +++ b/src/preferences/qml/MuseScore/Preferences/appearancepreferencesmodel.h @@ -40,7 +40,11 @@ class AppearancePreferencesModel : public QObject, public muse::Contextable, pub Q_PROPERTY(bool isFollowSystemThemeAvailable READ isFollowSystemThemeAvailable CONSTANT) Q_PROPERTY(bool isFollowSystemTheme READ isFollowSystemTheme WRITE setFollowSystemTheme NOTIFY isFollowSystemThemeChanged) - Q_PROPERTY(bool highContrastEnabled READ highContrastEnabled WRITE setHighContrastEnabled NOTIFY themesChanged) + Q_PROPERTY(QStringList generalThemeCodes READ generalThemeCodes CONSTANT) + Q_PROPERTY(QStringList highContrastThemeCodes READ highContrastThemeCodes CONSTANT) + + Q_PROPERTY(bool highContrastEnabled READ highContrastEnabled WRITE setHighContrastEnabled NOTIFY highContrastEnabledChanged) + Q_PROPERTY(QVariantList generalThemes READ generalThemes NOTIFY themesChanged) Q_PROPERTY(QVariantList highContrastThemes READ highContrastThemes NOTIFY themesChanged) Q_PROPERTY(QStringList accentColors READ accentColors NOTIFY themesChanged) @@ -86,6 +90,8 @@ class AppearancePreferencesModel : public QObject, public muse::Contextable, pub bool isFollowSystemTheme() const; bool highContrastEnabled() const; + QStringList generalThemeCodes() const; + QStringList highContrastThemeCodes() const; QVariantList generalThemes() const; QVariantList highContrastThemes() const; @@ -133,6 +139,7 @@ public slots: signals: void isFollowSystemThemeChanged(); + void highContrastEnabledChanged(); void themesChanged(); void currentFontIndexChanged(); void bodyTextSizeChanged(); @@ -148,5 +155,7 @@ public slots: private: muse::ui::ThemeInfo currentTheme() const; muse::ui::ThemeList allThemes() const; + + bool m_lastHighContrast = false; }; } diff --git a/src/preferences/qml/MuseScore/Preferences/internal/AccentColorsSection.qml b/src/preferences/qml/MuseScore/Preferences/internal/AccentColorsSection.qml index 8e56803bb57cf..9f8801c79f644 100644 --- a/src/preferences/qml/MuseScore/Preferences/internal/AccentColorsSection.qml +++ b/src/preferences/qml/MuseScore/Preferences/internal/AccentColorsSection.qml @@ -25,7 +25,7 @@ import QtQuick.Controls import Muse.Ui import Muse.UiComponents -Row { +Column { id: root property alias colors: colorsList.colors @@ -34,7 +34,7 @@ Row { property NavigationPanel navigation: NavigationPanel { name: titleLabel.text enabled: root.enabled && root.visible - direction: NavigationPanel.Horizontal + direction: NavigationPanel.Both accessible.name: titleLabel.text onActiveChanged: function(active) { @@ -48,14 +48,12 @@ Row { signal accentColorChangeRequested(var newColorIndex) - height: colorsList.height spacing: 12 StyledTextLabel { id: titleLabel width: root.columnWidth - anchors.verticalCenter: parent.verticalCenter horizontalAlignment: Qt.AlignLeft text: qsTrc("preferences", "Accent color") @@ -66,8 +64,6 @@ Row { navigationPanel: root.navigation - sampleSize: 30 - onAccentColorChangeRequested: function(newColorIndex) { root.accentColorChangeRequested(newColorIndex) } diff --git a/src/preferences/qml/MuseScore/Preferences/internal/ThemeSample.qml b/src/preferences/qml/MuseScore/Preferences/internal/ThemeSample.qml index 44a4a65857a2b..fe01fb868a7ed 100644 --- a/src/preferences/qml/MuseScore/Preferences/internal/ThemeSample.qml +++ b/src/preferences/qml/MuseScore/Preferences/internal/ThemeSample.qml @@ -25,7 +25,8 @@ import Muse.UiComponents Rectangle { id: root - property var theme + required property var theme + property bool highContrast: false signal clicked @@ -110,6 +111,7 @@ Rectangle { radius: 3 color: Utils.colorWithAlpha(root.theme.accentColor, root.theme.buttonOpacityNormal) + border.color: root.highContrast ? root.theme.strokeColor : "transparent" } Rectangle { @@ -118,6 +120,7 @@ Rectangle { radius: 3 color: Utils.colorWithAlpha(root.theme.buttonColor, root.theme.buttonOpacityNormal) + border.color: root.highContrast ? root.theme.strokeColor : "transparent" } } } @@ -129,7 +132,7 @@ Rectangle { color: "transparent" radius: 4 border.width: 1 - border.color: mouseArea.containsMouse ? root.theme.accentColor : root.theme.strokeColor + border.color: mouseArea.containsMouse ? ui.theme.accentColor : ui.theme.strokeColor } MouseArea { diff --git a/src/preferences/qml/MuseScore/Preferences/internal/ThemesSection.qml b/src/preferences/qml/MuseScore/Preferences/internal/ThemesSection.qml index e1c82e0db1bc3..e98792ae0b1cb 100644 --- a/src/preferences/qml/MuseScore/Preferences/internal/ThemesSection.qml +++ b/src/preferences/qml/MuseScore/Preferences/internal/ThemesSection.qml @@ -36,6 +36,7 @@ BaseSection { property alias isFollowSystemTheme: followSystemThemeCheckBox.checked property alias themes: themeSamplesList.themes + property alias themeCodes: themeSamplesList.themeCodes property alias currentThemeCode: themeSamplesList.currentThemeCode property alias accentColors: accentColorsSection.colors @@ -56,6 +57,7 @@ BaseSection { id: themeSamplesList width: parent.width spacing: root.columnWidth + root.columnSpacing - sampleWidth + highContrast: root.highContrastEnabled navigationPanel: root.navigation navigationRow: 0 @@ -102,26 +104,26 @@ BaseSection { } } } - } - AccentColorsSection { - id: accentColorsSection + AccentColorsSection { + id: accentColorsSection - columnWidth: root.columnWidth - spacing: root.columnSpacing + columnWidth: root.columnWidth + spacing: root.columnSpacing - visible: !root.highContrastEnabled + visible: !root.highContrastEnabled - navigation.section: root.navigation.section - navigation.order: root.navigation.order + 1 + navigation.section: root.navigation.section + navigation.order: root.navigation.order + 1 - onAccentColorChangeRequested: function(newColorIndex) { - root.accentColorChangeRequested(newColorIndex) - } + onAccentColorChangeRequested: function(newColorIndex) { + root.accentColorChangeRequested(newColorIndex) + } - onFocusChanged: { - if (activeFocus) { - root.ensureContentVisibleRequested(Qt.rect(x, y, width, height)) + onFocusChanged: { + if (activeFocus) { + root.ensureContentVisibleRequested(Qt.rect(x, y, width, height)) + } } } }