[vlc-commits] [Git][videolan/vlc][master] 4 commits: qml: rename `defaultCompensationFactor` into `implicitCompensationFactor` in...
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Apr 2 16:08:26 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
cc15290f by Fatih Uzunoglu at 2026-04-02T15:45:14+00:00
qml: rename `defaultCompensationFactor` into `implicitCompensationFactor` in `RoundedRectangleShadow`
- - - - -
a3d5b9f8 by Fatih Uzunoglu at 2026-04-02T15:45:14+00:00
qml: make `implicitCompensationFactor` writable in `RoundedRectangleShadow`
- - - - -
95f9fa0b by Fatih Uzunoglu at 2026-04-02T15:45:14+00:00
qml: increase window extended margin by 50%
This is because to prevent csd shadow clipping in
the subsequent commit we increase compensation
factor from (2.0) to (3.0). If we do not increase
the window margin, with the increased compensation
factor shadows would take less space.
- - - - -
50e8b93f by Fatih Uzunoglu at 2026-04-02T15:45:14+00:00
qml: increase csd window shadow compensation factor
This fixes csd shadows being clipped. Note that we
chose (2.0) as the default compensation factor
because over compensation can make delegate shadows
more easier overlap and prevent batch rendering.
Batch rendering is not relevant with the CSD shadow.
Although (2.0) causes clipping, it is not as obvious
as (1.0), and seemed to be a good compromise but in
hindsight it was too conservative for non-delegate
cases.
- - - - -
2 changed files:
- modules/gui/qt/maininterface/qml/MainInterface.qml
- modules/gui/qt/widgets/qml/RoundedRectangleShadow.qml
Changes:
=====================================
modules/gui/qt/maininterface/qml/MainInterface.qml
=====================================
@@ -105,7 +105,7 @@ Item {
Binding {
target: MainCtx
property: "windowExtendedMargin"
- value: _extendedFrameVisible ? (Qt.platform.pluginName.startsWith("wayland") ? 40 : 20) : 0
+ value: _extendedFrameVisible ? (Qt.platform.pluginName.startsWith("wayland") ? 60 : 30) : 0
}
Window.onWindowChanged: {
@@ -347,8 +347,11 @@ Item {
// factor which can lead to visible clipping, or increase the window extended margin:
blurRadius: (MainCtx.windowExtendedMargin / effect.compensationFactor)
- compensationFactor: MainCtx.intfMainWindow.active ? (defaultCompensationFactor)
- : (defaultCompensationFactor * 2)
+ // 2.0 (default) compensation factor makes clipping obvious, especially with white background
+ implicitCompensationFactor: 3.0
+
+ compensationFactor: MainCtx.intfMainWindow.active ? (implicitCompensationFactor)
+ : (implicitCompensationFactor * 2)
Behavior on compensationFactor {
// FIXME: Use UniformAnimator instead
=====================================
modules/gui/qt/widgets/qml/RoundedRectangleShadow.qml
=====================================
@@ -59,9 +59,8 @@ ShaderEffect {
// Increase the compensation factor if clipping occurs, but make it as small as possible
// to prevent overlapping shadows (breaks batching) and to decrease the shader coverage:
- property real compensationFactor: defaultCompensationFactor
-
- readonly property real defaultCompensationFactor: 2.0
+ property real compensationFactor: implicitCompensationFactor
+ property real implicitCompensationFactor: 2.0
// Do not paint in the non-compensated inner area - only makes sense if there is compensation:
property bool hollow: false
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/abe84d61907f9aa9b59c05c945c54e562e7c55f1...50e8b93f6426eb3c9baf173123969a172c2a3a0b
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/abe84d61907f9aa9b59c05c945c54e562e7c55f1...50e8b93f6426eb3c9baf173123969a172c2a3a0b
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list