Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
fcdbd602 by Fatih Uzunoglu at 2025-09-18T10:06:45+00:00
qml: use `MainCtx::intfDevicePixelRatioChanged()` for dpr changes in 
`PartialEffect`

`TextureProviderItem` does not emit `dprChanged()` signal because Qt apparently
does not forward that to items that do not have `ItemHasContents` flag set.

This fixes the frosted glass effect looking broken at start on Wayland with
fractional scale behind the scan progress bar (when it is immediately shown
upon start) if the progress bar is shown before the fractional scale is
retrieved (where the ceiled value is used in that case, but never updated).

- - - - -
02ae7921 by Fatih Uzunoglu at 2025-09-18T10:06:45+00:00
qt: remove signal `dprChanged()` from `TextureProviderItem`

This signal is never emitted because this item does not
have the flag `ItemHasContents` flag (it is merely a
texture provider) set, which makes Qt not provide the
dpr change to the item.

- - - - -


3 changed files:

- modules/gui/qt/widgets/native/textureprovideritem.cpp
- modules/gui/qt/widgets/native/textureprovideritem.hpp
- modules/gui/qt/widgets/qml/PartialEffect.qml


Changes:

=====================================
modules/gui/qt/widgets/native/textureprovideritem.cpp
=====================================
@@ -158,16 +158,6 @@ void TextureProviderItem::releaseResources()
     QQuickItem::releaseResources();
 }
 
-void TextureProviderItem::itemChange(ItemChange change, const ItemChangeData 
&value)
-{
-    if (change == ItemDevicePixelRatioHasChanged)
-    {
-        emit dprChanged();
-    }
-
-    QQuickItem::itemChange(change, value);
-}
-
 void QSGTextureViewProvider::adjustTexture()
 {
     if (m_textureProvider)


=====================================
modules/gui/qt/widgets/native/textureprovideritem.hpp
=====================================
@@ -115,7 +115,6 @@ public slots:
 signals:
     void sourceChanged(const QQuickItem *source);
     void rectChanged(const QRect& rect);
-    void dprChanged();
 
     void anisotropyLevelChanged(QSGTexture::AnisotropyLevel);
     void filteringChanged(QSGTexture::Filtering);
@@ -125,7 +124,6 @@ signals:
 
 protected:
     void releaseResources() override;
-    void itemChange(QQuickItem::ItemChange change, const 
QQuickItem::ItemChangeData &value) override;
 
 private:
     QPointer<const QQuickItem> m_source;


=====================================
modules/gui/qt/widgets/qml/PartialEffect.qml
=====================================
@@ -103,8 +103,12 @@ Item {
                                 effectRect.width * textureProviderItem.eDPR,
                                 effectRect.height * textureProviderItem.eDPR)
 
-        onDprChanged: {
-            eDPR = MainCtx.effectiveDevicePixelRatio(Window.window)
+        Connections {
+            target: MainCtx
+
+            function onIntfDevicePixelRatioChanged() {
+                textureProviderItem.eDPR = 
MainCtx.effectiveDevicePixelRatio(textureProviderItem.Window.window)
+            }
         }
 
         onChildrenChanged: {



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/e5b8d2ac959693ff140d3665ec81043f0caa3fa9...02ae7921d64dab4325a455b4fe98ba808c6b3bd2

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/e5b8d2ac959693ff140d3665ec81043f0caa3fa9...02ae7921d64dab4325a455b4fe98ba808c6b3bd2
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to