diff --git a/src/qml/ControlsBar.qml b/src/qml/ControlsBar.qml index cd50b1e..69156c3 100644 --- a/src/qml/ControlsBar.qml +++ b/src/qml/ControlsBar.qml @@ -22,6 +22,11 @@ Item { setControlsTheme(appearance.themeName) } + Connections { + target: appearance + onThemeNameChanged: setControlsTheme(appearance.themeName) + } + function setControlsTheme(themeName) { for (var i = 0; i < controlsBar.children.length; ++i) { if (controlsBar.children[i].objectName == "buttonLayout") { @@ -103,7 +108,9 @@ Item { Rectangle { id: controlsBackground - height: controlsBar.visible ? controlsBar.height + (appearance.themeName == "RoosterTeeth" ? 0 : progressBar.topPadding + (fun.nyanCat ? 0 : 1)) : 0 + height: controlsBar.visible ? controlsBar.height + + (appearance.themeName + == "RoosterTeeth" ? 0 : progressBar.topPadding) : 0 anchors.bottom: parent.bottom anchors.left: parent.left anchors.right: parent.right diff --git a/src/qml/MainMenu.qml b/src/qml/MainMenu.qml index 992380a..f400d00 100644 --- a/src/qml/MainMenu.qml +++ b/src/qml/MainMenu.qml @@ -459,6 +459,29 @@ MenuBar { id: viewMenuBarItem title: translate.getTranslation("VIEW", i18n.language) + CustomMenu { + title: translate.getTranslation("THEME", i18n.language) + id: themeMenu + Action { + text: "YouTube" + onTriggered: appearance.themeName = text + checkable: true + checked: appearance.themeName == text + } + Action { + text: "Niconico" + onTriggered: appearance.themeName = text + checkable: true + checked: appearance.themeName == text + } + Action { + text: "RoosterTeeth" + onTriggered: appearance.themeName = text + checkable: true + checked: appearance.themeName == text + } + } + Action { text: translate.getTranslation("FULLSCREEN", i18n.language) onTriggered: { diff --git a/src/qml/UIComponents/SettingsButton.qml b/src/qml/UIComponents/SettingsButton.qml index ec3fc01..983feb2 100644 --- a/src/qml/UIComponents/SettingsButton.qml +++ b/src/qml/UIComponents/SettingsButton.qml @@ -18,12 +18,12 @@ Button { appearance.themeName, "buttonColor") Layout.alignment: Qt.AlignVCenter | Qt.AlignRight display: AbstractButton.IconOnly + + onClicked: { var aptn = appearance.themeName appearance.themeName = aptn == "YouTube" ? "RoosterTeeth" : aptn == "RoosterTeeth" ? "Niconico" : "YouTube" - controlsBarItem.setControlsTheme(appearance.themeName) - console.log("Settings Menu Not Yet Implemented.") } background: Item { } diff --git a/src/qml/Utils/translations.js b/src/qml/Utils/translations.js index d1a8bc2..8f11f68 100644 --- a/src/qml/Utils/translations.js +++ b/src/qml/Utils/translations.js @@ -43,7 +43,8 @@ var translations = { DISABLE_TRACK: "Disable Track", AUDIO_DEVICES: "Audio Devices", UPDATE: "Update", - PLAYLIST_MENU: "Playlist Menu" + PLAYLIST_MENU: "Playlist Menu", + THEME: "Theme" }, spanish: { SAVE_SCREENSHOT: "Guardar captura en", diff --git a/src/qml/main.qml b/src/qml/main.qml index dafa4b6..23b2edd 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -54,14 +54,14 @@ Window { Settings { id: youTubeAppearance category: "YouTubeAppearance" - property string mainBackground: "#9C000000" - property string progressBackgroundColor: "#3CFFFFFF" - property string progressCachedColor: "white" - property string buttonColor: "white" - property string buttonHoverColor: "white" - property string progressSliderColor: "red" - property string chapterMarkerColor: "#fc0" - property string volumeSliderBackground: "white" + property color mainBackground: "#9C000000" + property color progressBackgroundColor: "#33FFFFFF" + property color progressCachedColor: "#66FFFFFF" + property color buttonColor: "white" + property color buttonHoverColor: "white" + property color progressSliderColor: "red" + property color chapterMarkerColor: "#fc0" + property color volumeSliderBackground: "white" } Settings { @@ -69,7 +69,7 @@ Window { category: "NicoNicoAppearance" property string mainBackground: "#9C000000" property string progressBackgroundColor: "#444" - property string progressCachedColor: "white" + property string progressCachedColor: "#66FFFFFF" property string buttonColor: "white" property string buttonHoverColor: "white" property string progressSliderColor: "#007cff"