mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
launcher: fixed gridview keyboard navigation to properly account for the provider defined number of columns.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user