Skip to content

Commit 6bf39e4

Browse files
committed
Fix search not grabbing focus
1 parent ac702e9 commit 6bf39e4

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

contents/ui/ItemMultiGridView.qml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,10 @@ PlasmaExtras.ScrollArea {
4242

4343
property bool grabFocus: false
4444
property bool showDescriptions: false
45-
property bool square: false
4645
property int iconSize: units.iconSizes.medium
4746

4847
property alias model: repeater.model
4948
property alias count: repeater.count
50-
property int cellWidth: parent.width
51-
property int cellHeight: iconSize + (2 * highlightItemSvg.margins.top)
5249

5350
//clip: true
5451
verticalScrollBarPolicy: Qt.ScrollBarAsNeeded
@@ -112,7 +109,7 @@ PlasmaExtras.ScrollArea {
112109
PlasmaExtras.Heading {
113110
id: gridViewLabel
114111
anchors.top: parent.top
115-
anchors.topMargin: 10
112+
//anchors.topMargin: 8
116113
x: units.smallSpacing
117114
width: parent.width - x
118115
height: dummyHeading.height
@@ -138,19 +135,18 @@ PlasmaExtras.ScrollArea {
138135
top: gridViewLabel.bottom
139136
topMargin: units.smallSpacing
140137
}
141-
square: itemMultiGrid.square
142-
showDescriptions: itemMultiGrid.showDescriptions
143-
increaseLeftSpacings: true
138+
144139
//TODO >
145140
dragEnabled: false
146141
dropEnabled: false
142+
showDescriptions: itemMultiGrid.showDescriptions
147143
// <
148144

149145
width: parent.width
150146
height: Math.ceil(count * cellHeight)
151-
cellWidth: itemMultiGrid.cellWidth
152-
cellHeight: itemMultiGrid.cellHeight
153-
iconSize: itemMultiGrid.iconSize
147+
cellWidth: parent.width
148+
cellHeight: root.iconSize + (2 * highlightItemSvg.margins.top)//<>cellSize
149+
iconSize: root.iconSize
154150
model: repeater.model.modelForRow(index)
155151

156152
onFocusChanged: {

contents/ui/MainColumnItem.qml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ Item {
354354
width: parent.width
355355
model: runnerModel
356356
showDescriptions: plasmoid.configuration.showDescription
357+
grabFocus: true
357358
opacity: searching ? 1.0 : 0.0
358359
onOpacityChanged: {
359360
if (opacity == 1.0) {
@@ -363,11 +364,7 @@ Item {
363364
}
364365

365366
Keys.onPressed: {
366-
367-
if (event.key == Qt.Key_Tab) {
368-
event.accepted = true;
369-
documentsFavoritesGrid.tryActivate(0, 0)
370-
} else if (event.key == Qt.Key_Backspace) {
367+
if (event.key == Qt.Key_Backspace) {
371368
event.accepted = true;
372369
if (searching)
373370
searchField.backspace();

0 commit comments

Comments
 (0)