Skip to content
Snippets Groups Projects
Commit a8b7e3bb authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Pierre Lamot
Browse files

qml: force disable all buttons in toolbareditor


D&D does not work when a button is enabled. This patch ensures that all buttons are forcefully disabled.

Signed-off-by: default avatarPierre Lamot <pierre@videolabs.io>
parent bc9d61aa
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,10 @@ MouseArea {
verticalCenter: parent.verticalCenter
}
sourceComponent: controlButtons.returnbuttondelegate(model.id)
onLoaded: buttonloader.item.paintOnly = true
onLoaded: {
buttonloader.item.paintOnly = true
buttonloader.item.enabled = false
}
}
......
......@@ -162,7 +162,6 @@ Item{
property bool acceptFocus: true
property bool paintOnly: false
enabled: !paintOnly
property bool realHovered: false
......@@ -369,7 +368,7 @@ Item{
size: VLCStyle.icon_medium
iconText: VLCIcons.dvd_prev
onClicked: player.chapterPrev()
enabled: !paintOnly && player.hasChapters
enabled: player.hasChapters
property bool acceptFocus: visible
text: i18n.qtr("Previous chapter")
}
......@@ -383,7 +382,7 @@ Item{
size: VLCStyle.icon_medium
iconText: VLCIcons.dvd_next
onClicked: player.chapterNext()
enabled: !paintOnly && player.hasChapters
enabled: player.hasChapters
property bool acceptFocus: visible
text: i18n.qtr("Next chapter")
}
......@@ -535,7 +534,7 @@ Item{
Widgets.IconToolButton{
id: fullScreenBtn
size: VLCStyle.icon_medium
enabled: !paintOnly && player.hasVideoOutput
enabled: player.hasVideoOutput
iconText: player.fullscreen ? VLCIcons.defullscreen :VLCIcons.fullscreen
onClicked: player.fullscreen = !player.fullscreen
property bool acceptFocus: true
......@@ -549,7 +548,7 @@ Item{
id: recordBtn
size: VLCStyle.icon_medium
iconText: VLCIcons.record
enabled: !paintOnly && player.isPlaying
enabled: player.isPlaying
checked: player.isRecording
onClicked: player.toggleRecord()
property bool acceptFocus: true
......@@ -586,7 +585,7 @@ Item{
Widgets.IconToolButton{
id: snapshotBtn
size: VLCStyle.icon_medium
enabled: !paintOnly && player.isPlaying
enabled: player.isPlaying
iconText: VLCIcons.snapshot
onClicked: player.snapshot()
property bool acceptFocus: true
......@@ -600,7 +599,7 @@ Item{
Widgets.IconToolButton{
id: stopBtn
size: VLCStyle.icon_medium
enabled: !paintOnly && player.isPlaying
enabled: player.isPlaying
iconText: VLCIcons.stop
onClicked: mainPlaylistController.stop()
property bool acceptFocus: true
......@@ -613,7 +612,7 @@ Item{
Widgets.IconToolButton{
id: infoBtn
size: VLCStyle.icon_medium
enabled: !paintOnly && player.isPlaying
enabled: player.isPlaying
iconText: VLCIcons.info
onClicked: dialogProvider.mediaInfoDialog()
property bool acceptFocus: true
......@@ -627,7 +626,7 @@ Item{
Widgets.IconToolButton{
id: frameBtn
size: VLCStyle.icon_medium
enabled: !paintOnly && player.isPlaying
enabled: player.isPlaying
iconText: VLCIcons.frame_by_frame
onClicked: player.frameNext()
property bool acceptFocus: true
......@@ -725,7 +724,6 @@ Item{
id: aspectRatioDelegate
Widgets.ComboBoxExt {
property bool paintOnly: false
enabled: !paintOnly
Layout.alignment: Qt.AlignVCenter
width: VLCStyle.combobox_width_normal
height: VLCStyle.combobox_height_normal
......@@ -753,7 +751,6 @@ Item{
Widgets.IconToolButton{
size: VLCStyle.icon_medium
enabled: !paintOnly
iconText: VLCIcons.fullscreen
onClicked: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment