[vlc-commits] [Git][videolan/vlc][master] qml: improve view resize with expand index
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Dec 2 07:02:00 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
38a9fa73 by Prince Gupta at 2024-12-02T06:16:32+00:00
qml: improve view resize with expand index
anchor the view to expand index, other items are not in focus (have lower opacity), this improves better main content focus
- - - - -
1 changed file:
- modules/gui/qt/widgets/qml/ExpandGridView.qml
Changes:
=====================================
modules/gui/qt/widgets/qml/ExpandGridView.qml
=====================================
@@ -375,7 +375,13 @@ FocusScope {
const dirty = (Date.now() - _anchoredIdxUpdate) > VLCStyle.duration_veryLong
if (dirty || (_anchoredIdx < 0) || (_anchoredIdx >= _count)) {
- _anchoredIdx = _currentRange?.[0] ?? 0
+ const range = _currentRange || [0, 0]
+
+ if (expandIndex >= range[0] && expandIndex < range[1])
+ _anchoredIdx = expandIndex
+ else
+ _anchoredIdx = range[0]
+
const item = _getItem(_anchoredIdx)
_anchoredIdxFraction = (item.y - flickable.contentY) / cellHeight
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/38a9fa739a21e7370ef9d7b0efeda2330c3f68b5
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/38a9fa739a21e7370ef9d7b0efeda2330c3f68b5
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