launcher: fixed gridview keyboard navigation to properly account for the provider defined number of columns.

This commit is contained in:
Lemmy
2026-01-28 20:35:44 -05:00
parent 9951d3fb23
commit 02fb1da333
+2 -17
View File
@@ -179,9 +179,8 @@ SmartPanel {
readonly property int gridContentWidth: listPanelWidth - (2 * Style.marginXS)
readonly property int gridCellSize: Math.floor((gridContentWidth - ((targetGridColumns - 1) * Style.marginS)) / targetGridColumns)
// Actual columns that fit in the GridView
// This gets updated dynamically by the GridView when its actual width is known
property int gridColumns: 5
// Actual columns in the GridView - tracks targetGridColumns
readonly property int gridColumns: targetGridColumns
// Listen for plugin provider registry changes
Connections {
@@ -1375,20 +1374,6 @@ SmartPanel {
focus: false
interactive: !Settings.data.appLauncher.ignoreMouseInput
Component.onCompleted: {
// Initialize gridColumns when grid view is created
updateGridColumns();
}
function updateGridColumns() {
// Since cellWidth = width / targetGridColumns, the number of columns is always targetGridColumns
root.gridColumns = root.targetGridColumns;
}
onWidthChanged: {
updateGridColumns();
}
// Completely disable GridView key handling
Keys.enabled: false