[vlc-commits] [Git][videolan/vlc][master] 4 commits: qml: round size in GridItem

Steve Lhomme (@robUx4) gitlab at videolan.org
Sun Dec 15 09:06:18 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
9937dae4 by Fatih Uzunoglu at 2024-12-15T08:46:09+00:00
qml: round size in GridItem

Qt docs state that "It is recommended that the delegate's
size be a whole number to avoid sub-pixel alignment of items."

- - - - -
5634ab6a by Fatih Uzunoglu at 2024-12-15T08:46:09+00:00
qml: round width of playlist in MainDisplay

Qt docs state that "It is recommended that the delegate's
size be a whole number to avoid sub-pixel alignment of items."

- - - - -
e1784e3e by Fatih Uzunoglu at 2024-12-15T08:46:09+00:00
qml: round height in PlaylistDelegate

Qt docs state that "It is recommended that the delegate's
size be a whole number to avoid sub-pixel alignment of items."

- - - - -
4d1b0653 by Fatih Uzunoglu at 2024-12-15T08:46:09+00:00
qml: round height of TableViewDelegate in TableViewExt

Qt docs state that "It is recommended that the delegate's
size be a whole number to avoid sub-pixel alignment of items."

- - - - -


4 changed files:

- modules/gui/qt/maininterface/qml/MainDisplay.qml
- modules/gui/qt/playlist/qml/PlaylistDelegate.qml
- modules/gui/qt/widgets/qml/GridItem.qml
- modules/gui/qt/widgets/qml/TableViewExt.qml


Changes:

=====================================
modules/gui/qt/maininterface/qml/MainDisplay.qml
=====================================
@@ -330,7 +330,7 @@ FocusScope {
                     name: "expanded"
                     PropertyChanges {
                         target: playlistLoader
-                        width: Math.round(playlistLoader.implicitWidth)
+                        width: playlistLoader.implicitWidth
                         visible: true
                     }
                 }
@@ -356,11 +356,11 @@ FocusScope {
                 sourceComponent: PlaylistListView {
                     id: playlist
 
-                    implicitWidth: VLCStyle.isScreenSmall
+                    implicitWidth: Math.round(VLCStyle.isScreenSmall
                                    ? g_mainDisplay.width * 0.8
                                    : Helpers.clamp(g_mainDisplay.width / resizeHandle.widthFactor,
                                                    minimumWidth,
-                                                   g_mainDisplay.width / 2 + playlistLeftBorder.width / 2)
+                                                   g_mainDisplay.width / 2 + playlistLeftBorder.width / 2))
 
                     focus: true
 


=====================================
modules/gui/qt/playlist/qml/PlaylistDelegate.qml
=====================================
@@ -75,6 +75,8 @@ T.Control {
     implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
                              implicitContentHeight + topPadding + bottomPadding)
 
+    height: Math.round(implicitHeight)
+
     ListView.delayRemove: dragHandler.active
 
     T.ToolTip.visible: ( visible && (visualFocus || hovered) &&


=====================================
modules/gui/qt/widgets/qml/GridItem.qml
=====================================
@@ -76,6 +76,9 @@ T.ItemDelegate {
     implicitWidth: layout.implicitWidth
     implicitHeight: layout.implicitHeight
 
+    width: Math.round(implicitWidth)
+    height: Math.round(implicitHeight)
+
     highlighted: (hovered || visualFocus)
 
     Accessible.role: Accessible.Cell


=====================================
modules/gui/qt/widgets/qml/TableViewExt.qml
=====================================
@@ -390,7 +390,7 @@ FocusScope {
             required property var model
 
             width: view.width
-            height: root.rowHeight
+            height: Math.round(root.rowHeight)
 
             fixedColumnWidth: root.baseColumnWidth
             weightedColumnWidth: root._weightedColumnsSize



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0e2d7848bb772a9c4983917556ea07a1cd7598ef...4d1b065375a2c53c10be12198230e76d59642cdd

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0e2d7848bb772a9c4983917556ea07a1cd7598ef...4d1b065375a2c53c10be12198230e76d59642cdd
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