diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am index 9b31026ada845840b7b7b9e84ee6d69f69dd1cb1..f8b104b0ad322fa47d9fc053e9128872066800f7 100644 --- a/modules/gui/qt/Makefile.am +++ b/modules/gui/qt/Makefile.am @@ -740,7 +740,7 @@ libqt_plugin_la_QML = \ gui/qt/network/qml/ServicesHomeDisplay.qml \ gui/qt/player/qml/qmldir \ gui/qt/player/qml/ControlBar.qml \ - gui/qt/player/qml/ControlButtons.qml \ + gui/qt/player/qml/ControlbarControls.qml \ gui/qt/player/qml/LanguageMenu.qml \ gui/qt/player/qml/PlaybackSpeed.qml \ gui/qt/player/qml/MiniPlayer.qml \ diff --git a/modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml b/modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml index 5245a5465bf63e9f3fa39bb3cfd26234e2c122e5..05bf8a4633e4ce9df9a2cfc05675b5f8140beec4 100644 --- a/modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml +++ b/modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml @@ -117,7 +117,7 @@ MouseArea { horizontalCenter: parent.horizontalCenter verticalCenter: parent.verticalCenter } - source: PlayerControlButtons.button(model.id).source + source: PlayerControlbarControls.control(model.id).source onLoaded: { buttonloader.item.paintOnly = true buttonloader.item.enabled = false diff --git a/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorButtonList.qml b/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorButtonList.qml index 3c0833af5a2d75c69a38276557ed042cf983e146..fe19700e3dc69f8e8f09861e7ab9255dfec58218 100644 --- a/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorButtonList.qml +++ b/modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorButtonList.qml @@ -31,7 +31,7 @@ GridView{ clip: true ScrollBar.vertical: ScrollBar { policy: ScrollBar.AlwaysOn } - model: PlayerControlButtons.buttonList.length + model: PlayerControlbarControls.controlList.length highlightFollowsCurrentItem: false @@ -111,13 +111,13 @@ GridView{ height: cellHeight property bool held: false - property int mIndex: PlayerControlButtons.buttonList[model.index].id + property int mIndex: PlayerControlbarControls.controlList[model.index].id drag.target: held ? buttonDragItem : undefined cursorShape: Qt.OpenHandCursor onPressed: { buttonDragItem.visible = true - buttonDragItem.text = PlayerControlButtons.buttonList[model.index].label + buttonDragItem.text = PlayerControlbarControls.controlList[model.index].label buttonDragItem.Drag.source = dragArea held = true root._held = true @@ -155,7 +155,7 @@ GridView{ Layout.preferredWidth: VLCStyle.icon_medium Layout.preferredHeight: VLCStyle.icon_medium Layout.alignment: Qt.AlignHCenter - text: PlayerControlButtons.buttonList[model.index].label + text: PlayerControlbarControls.controlList[model.index].label } Widgets.ListSubtitleLabel { @@ -164,7 +164,7 @@ GridView{ Layout.fillHeight: true elide: Text.ElideNone - text: PlayerControlButtons.buttonList[model.index].text + text: PlayerControlbarControls.controlList[model.index].text wrapMode: Text.WordWrap horizontalAlignment: Text.AlignHCenter } diff --git a/modules/gui/qt/player/qml/ButtonsLayout.qml b/modules/gui/qt/player/qml/ButtonsLayout.qml index 2ff09bb8cdf49bb761cb3c5ebb9c576932cdf629..4ddacf8225950aa338597066fb919dde8e0c7c42 100644 --- a/modules/gui/qt/player/qml/ButtonsLayout.qml +++ b/modules/gui/qt/player/qml/ButtonsLayout.qml @@ -97,7 +97,7 @@ FocusScope { delegate: Loader { id: buttonloader - source: PlayerControlButtons.button(model.id).source + source: PlayerControlbarControls.control(model.id).source focus: (index === 0) diff --git a/modules/gui/qt/player/qml/ControlButtons.qml b/modules/gui/qt/player/qml/ControlbarControls.qml similarity index 93% rename from modules/gui/qt/player/qml/ControlButtons.qml rename to modules/gui/qt/player/qml/ControlbarControls.qml index 791edcc79cfe70eff37871f427e05ab7ff1178f7..58674f2b9f17d088c9928c24747e8fb68f137b14 100644 --- a/modules/gui/qt/player/qml/ControlButtons.qml +++ b/modules/gui/qt/player/qml/ControlbarControls.qml @@ -27,11 +27,9 @@ import "qrc:///widgets/" as Widgets import "qrc:///style/" QtObject { - id: controlButtons - readonly property string controlPath : "qrc:///player/controlbarcontrols/" - readonly property var buttonList: [ + readonly property var controlList: [ { id: ControlListModel.PLAY_BUTTON, file: "PlayButton.qml", label: VLCIcons.play, text: i18n.qtr("Play") }, { id: ControlListModel.STOP_BUTTON, file: "StopButton.qml", label: VLCIcons.stop, text: i18n.qtr("Stop") }, { id: ControlListModel.OPEN_BUTTON, file: "OpenButton.qml", label: VLCIcons.eject, text: i18n.qtr("Open") }, @@ -67,16 +65,16 @@ QtObject { { id: ControlListModel.PLAYBACK_SPEED_BUTTON, file: "PlaybackSpeedButton.qml", label: "1x", text: i18n.qtr("Playback Speed") } ] - function button(id) { - var button = buttonList.find( function(button) { return ( button.id === id ) } ) + function control(id) { + var control = controlList.find( function(control) { return ( control.id === id ) } ) - if (button === undefined) { - console.log("button delegate id " + id + " doesn't exist") + if (control === undefined) { + console.log("control delegate id " + id + " doesn't exist") return { source: controlPath + "Fallback.qml" } } - button.source = controlPath + button.file + control.source = controlPath + control.file - return button + return control } } diff --git a/modules/gui/qt/player/qml/qmldir b/modules/gui/qt/player/qml/qmldir index 63ef3e4325efed97ae7d6c619998a06b90822c8c..b367e66d0457f0a1ef1d5e2eded6d6e9e3f391af 100644 --- a/modules/gui/qt/player/qml/qmldir +++ b/modules/gui/qt/player/qml/qmldir @@ -1 +1 @@ -singleton PlayerControlButtons 1.0 ControlButtons.qml +singleton PlayerControlbarControls 1.0 ControlbarControls.qml diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc index 8f763a81fd64174720b4e9d84d396f42cb404b80..166393246b517d5d85f470855cd287f401e46e62 100644 --- a/modules/gui/qt/vlc.qrc +++ b/modules/gui/qt/vlc.qrc @@ -334,7 +334,7 @@ <file alias="ResumeDialog.qml">player/qml/ResumeDialog.qml</file> <file alias="SliderBar.qml">player/qml/SliderBar.qml</file> <file alias="TrackInfo.qml">player/qml/TrackInfo.qml</file> - <file alias="ControlButtons.qml">player/qml/ControlButtons.qml</file> + <file alias="ControlbarControls.qml">player/qml/ControlbarControls.qml</file> <file alias="MiniPlayer.qml">player/qml/MiniPlayer.qml</file> <file alias="TopBar.qml">player/qml/TopBar.qml</file> <file alias="PIPPlayer.qml">player/qml/PIPPlayer.qml</file> diff --git a/po/POTFILES.in b/po/POTFILES.in index 696eb4832f8d818f6ee8534ad2e8171d2e9b7636..5b31464ddd56e5a1a80210325eea1af39bd87bf1 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -860,7 +860,7 @@ modules/gui/qt/network/qml/NetworkGridItem.qml modules/gui/qt/network/qml/NetworkHomeDisplay.qml modules/gui/qt/network/qml/NetworkListItem.qml modules/gui/qt/network/qml/ServicesHomeDisplay.qml -modules/gui/qt/player/qml/ControlButtons.qml +modules/gui/qt/player/qml/ControlbarControls.qml modules/gui/qt/player/qml/LanguageMenu.qml modules/gui/qt/player/qml/Player.qml modules/gui/qt/player/qml/ResumeDialog.qml