[vlc-commits] [Git][videolan/vlc][master] 3 commits: qml: fix interface locking with system CSD
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Nov 18 07:33:08 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
a4c0d3a8 by Prince Gupta at 2023-11-18T07:12:54+00:00
qml: fix interface locking with system CSD
- - - - -
a5f4fbca by Prince Gupta at 2023-11-18T07:12:54+00:00
qml: fix invalid property usage
- - - - -
2baa2908 by Prince Gupta at 2023-11-18T07:12:54+00:00
qml: rename variable
- - - - -
3 changed files:
- modules/gui/qt/player/qml/TopBar.qml
- modules/gui/qt/widgets/qml/CSDThemeButtonSet.qml
- modules/gui/qt/widgets/qml/CSDWindowButtonSet.qml
Changes:
=====================================
modules/gui/qt/player/qml/TopBar.qml
=====================================
@@ -392,8 +392,8 @@ FocusScope{
Connections {
target: csdDecorations.item
- enabled: csdDecorations.loaded
- onHoveredChanged: root.requestLockUnlockAutoHide(csdDecorations.item.hovered)
+ enabled: csdDecorations.status === Loader.Ready
+ onButtonHoveredChanged: root.requestLockUnlockAutoHide(csdDecorations.item.buttonHovered)
}
}
=====================================
modules/gui/qt/widgets/qml/CSDThemeButtonSet.qml
=====================================
@@ -26,7 +26,13 @@ import "qrc:///style/"
Rectangle {
id: root
- readonly property bool hovered: minimizeButton.hovered || maximizeButton.hovered || closeButton.hovered
+ readonly property bool buttonHovered: {
+ for (let i = 0; i < loader.count; ++i) {
+ const button = loader.itemAt(i)
+ if (button.hovered) return true
+ }
+ return false
+ }
readonly property int _frameMarginLeft: VLCStyle.palette.csdMetrics ? VLCStyle.palette.csdMetrics.csdFrameMarginLeft : 0
readonly property int _frameMarginRight: VLCStyle.palette.csdMetrics ? VLCStyle.palette.csdMetrics.csdFrameMarginRight : 0
@@ -47,6 +53,8 @@ Rectangle {
spacing: root._interNavButtonSpacing
Repeater {
+ id: loader
+
model: MainCtx.csdButtonModel.windowCSDButtons
CSDThemeButton {
=====================================
modules/gui/qt/widgets/qml/CSDWindowButtonSet.qml
=====================================
@@ -33,7 +33,7 @@ Row {
property color color: theme.fg.primary
property color hoverColor: VLCStyle.setColorAlpha(theme.bg.primary, 0.5)
- readonly property bool hovered: {
+ readonly property bool buttonHovered: {
let h = false
for (let i = 0; i < repeater.count; ++i) {
const button = repeater.itemAt(i)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/33f7d18b54ad8a77b67609921c8fac518c8693ee...2baa2908b695b6db1c25e3596f579f75487c26f6
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/33f7d18b54ad8a77b67609921c8fac518c8693ee...2baa2908b695b6db1c25e3596f579f75487c26f6
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list