[vlc-commits] [Git][videolan/vlc][master] 3 commits: qml: fix binding loop in `EmptyLabel.qml`
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Apr 19 09:17:28 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
8f1192bc by Fatih Uzunoglu at 2025-04-19T08:58:10+00:00
qml: fix binding loop in `EmptyLabel.qml`
Padding is considered in implicit size, it should not
depend on the explicit size.
- - - - -
4fe0e24a by Fatih Uzunoglu at 2025-04-19T08:58:10+00:00
qml: disable word wrap in `EmptyLabelHint.qml`
As the implicit size can not be determined with
word wrap. We currently depend on the implicit
size starting with 452a2171.
- - - - -
4e83b48d by Fatih Uzunoglu at 2025-04-19T08:58:10+00:00
qml: use anchoring in `EmptyLabel.qml` labels
This is because in some cases (such as changing
the interface scale) the `Column` does not
re-position them.
- - - - -
3 changed files:
- modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
- modules/gui/qt/widgets/qml/EmptyLabel.qml
- modules/gui/qt/widgets/qml/EmptyLabelHint.qml
Changes:
=====================================
modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
=====================================
@@ -485,7 +485,7 @@ MainViewLoader {
focus: true
text: qsTr("No playlists found")
- hint: qsTr("Right click on a media to add it to a playlist")
+ hint: qsTr("Right click on a media\nto add it to a playlist")
cover: VLCStyle.noArtAlbumCover
}
=====================================
modules/gui/qt/widgets/qml/EmptyLabel.qml
=====================================
@@ -26,13 +26,7 @@ T.Control {
id: root
// Properties
- readonly property int extraMargin: VLCStyle.dynamicAppMargins(width)
-
- readonly property int contentLeftMargin: extraMargin + VLCStyle.layout_left_margin
- readonly property int contentRightMargin: extraMargin + VLCStyle.layout_right_margin
-
- leftPadding: contentLeftMargin
- rightPadding: contentRightMargin
+ padding: VLCStyle.margin_normal
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
@@ -94,6 +88,8 @@ T.Control {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+
focus: false
color: theme.fg.primary
=====================================
modules/gui/qt/widgets/qml/EmptyLabelHint.qml
=====================================
@@ -40,13 +40,11 @@ EmptyLabel {
Widgets.CaptionLabel {
id: labelHint
- width: parent.width
+ anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
- wrapMode: Text.WordWrap
-
color: root.colorContext.fg.secondary
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6c6b68d8c8637f2d181ab2b4da8b527dce979181...4e83b48dea1498a9f297203f9f50e1583a103272
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6c6b68d8c8637f2d181ab2b4da8b527dce979181...4e83b48dea1498a9f297203f9f50e1583a103272
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