AvengeMedia / AvengeMedia/DankMaterialShell
Control center: VPN detail list cannot scroll to its last entries when the detail host is shorter than the fixed list height
- Dominant language
- QML
- Stars
- 8.1k
- Forks
- 515
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 102
Description
### Compositor
Hyprland
### Distribution
CachyOS
### Select your Installation Method
Source (running the `quickshell/` tree of a fork of `master` via `DMS_SHELL_DIR`; the file in question is unchanged on upstream `master` at 65fb97d2 / v1.7-beta)
### Was this your original Installation method?
No (Distro Packaging, then Source)
### dms doctor -vC
```
System Health Check
──────────────────────────────────────
System
● Operating System ····· CachyOS
└─ ID: cachyos, Version: rolling, Arch: amd64
● Architecture ········· amd64
● Display Server ······· Wayland
└─ WAYLAND_DISPLAY=wayland-1
Versions
● DMS CLI ·············· dms (git) v1.6.0-4666
└─ /home/dakr/.local/bin/dms
● Quickshell ··········· Quickshell 0.3.1 (revision , distributed by Arch Linux)
└─ /usr/bin/qs
● DMS Shell ············ v1.6.0
└─ /home/dakr/workdir/dms_dk/quickshell
Installation
● DMS Configuration ···· Found
└─ /home/dakr/workdir/dms_dk/quickshell
● shell.qml ············ Present
└─ /home/dakr/workdir/dms_dk/quickshell/shell.qml
○ Install Type ········· Unknown
└─ /home/dakr/workdir/dms_dk/quickshell
Compositor
● Hyprland ············· 0.56.2
└─ /usr/bin/hyprland
○ Active ··············· Hyprland
● Background Blur ······ Supported
└─ Compositor supports ext-background-effect-v1
Quickshell Features
● Polkit ··············· Available
└─ Authentication prompts
● IdleMonitor ·········· Available
└─ Idle detection
● IdleInhibitor ········ Available
└─ Prevent idle/sleep
● ShortcutInhibitor ···· Available
└─ Allow shortcut management (niri)
● BackgroundBlur ······· Available
└─ Background blur API support in Quickshell
Optional Features
● accountsservice ······ Available
└─ User accounts
● power-profiles-daemon Available
└─ Power profile management
● logind ··············· Available
└─ Session management
● cups-pk-helper ······· Not available (install cups-pk-helper)
└─ Printer management
→ https://danklinux.com/docs/dankmaterialshell/cli-doctor#optional-features
○ I2C/DDC ·············· No monitors detected
└─ External monitor brightness control
● qt6-imageformats ····· Installed (5 formats)
└─ Formats: WebP, TIFF, GIF, JP2, ICNS (/usr/lib/qt6/plugins/imageformats:/usr/lib/qt/plugins/imageformats:/usr/lib64/qt6/plugins/imageformats)
● kimageformats ········ Not installed
└─ AVIF, HEIF, JXL support
→ https://danklinux.com/docs/dankmaterialshell/cli-doctor#optional-features
● Terminal ············· kitty, alacritty, wezterm
● Network ·············· NetworkManager
└─ NetworkManager present. Using NM API.
● matugen ·············· Installed
└─ Dynamic theming
● cava ················· Missing
└─ Audio visualizer
→ https://danklinux.com/docs/dankmaterialshell/cli-doctor#optional-features
○ khal ················· Not installed
└─ Calendar events
○ danksearch ··········· Not installed
└─ File search
○ dankcalendar ········· Not installed
└─ Calendar app
○ fprintd ·············· Not installed
└─ Fingerprint auth
● adw-gtk3 ············· Installed
└─ GTK3 dynamic theming (system copy, applied on next theme apply)
Config Files
● settings.json ········ Present
└─ /home/dakr/.config/DankMaterialShell/settings.json
○ clsettings.json ······ Not yet created
└─ /home/dakr/.config/DankMaterialShell/clsettings.json
● plugin_settings.json · Present
└─ /home/dakr/.config/DankMaterialShell/plugin_settings.json
● session.json ········· Present
└─ /home/dakr/.local/state/DankMaterialShell/session.json
● dms-colors.json ······ Present
└─ /home/dakr/.cache/DankMaterialShell/dms-colors.json
Services
● dms.service ·········· enabled, active
● greetd ··············· enabled
Environment
○ QT_QPA_PLATFORMTHEME · qt6ct
● qt6ct plugin (Qt6) ··· Installed
└─ /usr/lib/qt6/plugins/platformthemes/libqt6ct.so
○ QT_QPA_PLATFORMTHEME… Not set
○ QS_ICON_THEME ········ Not set
● XDG_MENU_PREFIX ······ hyprland- (menu file not found)
└─ Dolphin 'Open with…' dialog may be empty. Ensure /etc/xdg/menus/hyprland-applications.menu exists.
→ https://danklinux.com/docs/dankmaterialshell/cli-doctor#xdg-menu-prefix
Fonts
● Normal Font ·········· Inter Variable
└─ /home/dakr/workdir/dms_dk/quickshell/DankCommon/assets/fonts/inter/InterVariable.ttf
● Monospace Font ······· Fira Code
└─ /home/dakr/workdir/dms_dk/quickshell/DankCommon/assets/fonts/nerd-fonts/FiraCodeNerdFont-Regular.ttf
──────────────────────────────────────
4 warning(s), 32 ok
```
### Description
The VPN detail panel in the control center cannot scroll to its last entries. With 14 VPN/WireGuard profiles the list stops at profile #12 when scrolled all the way down; #13 and #14 are never reachable. The scrollbar reaches its end position, but the bottom of the list viewport lies below the clipped edge of the detail host.
Cause, from reading the code and instrumenting it at runtime:
- `Modules/ControlCenter/Details/VpnDetailContent.qml` sizes the list container with a fixed height: `property int listHeight: 180` (line 18), `VpnWidget.qml:35` passes `listHeight: 260`, and the `Item` around the `DankListView` uses `height: root.listHeight` (line 164). `implicitHeight` is derived from the same fixed value (line 20), i.e. 349 px with `listHeight: 260`.
- The detail host only grants `Math.min(350, _maxDetailHeight)` (`utils/detailHeight.js`), and `_maxDetailHeight` is the popout height minus all widget rows (`DragDropGrid.qml:41`). `DetailHost` has `clip: true`.
- On a 1920x1080 panel at scale 1.5 (1280x720 logical) with 12 widgets in the control center, the host ends up at **218 px**, while the list container stays at **260 px**. The lower ~2 rows of the list viewport are permanently behind the clip edge, so scrolling to `contentHeight` still leaves the last two delegates hidden.
Runtime values (temporary `console.warn` in `VpnDetailContent.qml`, VPN detail opened):
```
count 14 ListView.contentHeight 696 root.height 218 contentColumn.height 194 headerRow.height 28
list Item height (unpatched): 260
```
The backend is fine: `network.vpn.profiles` over the DMS socket returns all 14 profiles, sorted. This is purely the QML sizing.
### Expected Behavior
The list viewport should never be taller than the space the detail host actually provides, so that scrolling reaches the last profile. With enough room it can keep its designed 260 px.
### Steps to Reproduce
1. Have at least 13 VPN/WireGuard profiles in NetworkManager.
2. Use a screen with 720 px logical height (e.g. 1080p at 1.5x), or add enough control center widgets that `_maxDetailHeight` drops below 349 px.
3. Open the control center and expand the VPN widget.
4. Scroll the profile list to the end.
5. The last one or two profiles are not shown; the list ends early although the scrollbar is at its end.
### Error Messages/Logs
No errors; the values above come from temporary `console.warn` instrumentation.
Fix that resolves it here (fork commit 0c604d87), capping the list at the remaining column height:
```diff
RowLayout {
+ id: headerRow
spacing: Theme.spacingS
width: parent.width
@@
Item {
width: parent.width
- height: root.listHeight
+ height: Math.max(0, Math.min(root.listHeight, contentColumn.height - headerRow.height - 1 - Theme.spacingS * 4))
```
(4 x `spacingS` = the three `Column` gaps plus the trailing spacer `Item`.) With this the list `Item` becomes 133 px on the setup above, equal to the visible area, and the `ListView` scrolls to profile #14. Happy to open a PR if wanted.
### Screenshots/Recordings
Can add a screenshot of the cut-off list on request.
Contributor guide
Research direction
Start in Modules/ControlCenter/Details/VpnDetailContent.qml, especially the list container around line 164 and its header row. Compare its sizing with utils/detailHeight.js and DragDropGrid.qml, then reproduce with a short detail host and multiple VPN profiles. Done means the list fits the available host space and scrolling reaches the final profile without clipping.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 90/100