Skip to content

Commit 6074f9f

Browse files
committed
Add Always show Search bar property, remove unwanted properties
1 parent bbee3e4 commit 6074f9f

File tree

5 files changed

+12
-53
lines changed

5 files changed

+12
-53
lines changed

contents/config/main.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@
2323
<label>The format used in the display of application names: 0 = NameOnly, 1 = GenericNameOnly, 2 = NameAndGenericName, 3 = GenericNameAndName</label>
2424
<default>0</default>
2525
</entry>
26-
<entry name="limitDepth" type="Bool">
27-
<label>Whether to flatten top-level menu categories to a single level instead of displaying sub-categories.</label>
28-
<default>false</default>
29-
</entry>
30-
<entry name="alphaSort" type="Bool">
31-
<label>Whether to sort menu contents alphabetically or use manual/system sort order.</label>
32-
<default>false</default>
33-
</entry>
3426

3527
<entry name="recentOrdering" type="Int">
3628
<label>How should the previously used apps/docs/contacts be ordered: 0 = RecentFirst, 1 = PopularFirst</label>
@@ -134,10 +126,6 @@
134126
<label>Shows or hides the Power Options button on the bottom bar.</label>
135127
<default>true</default>
136128
</entry>
137-
<entry name="showIconsRootLevel" type="Bool">
138-
<label>Whether to show icons on the root level of the menu.</label>
139-
<default>false</default>
140-
</entry>
141129
<entry name="defaultAllApps" type="Bool">
142130
<label>Whether to show All Apps screen by default or not.</label>
143131
<default>false</default>

contents/ui/ConfigGeneral.qml

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ Kirigami.FormLayout {
4141
property string cfg_customButtonImage: plasmoid.configuration.customButtonImage
4242

4343
property alias cfg_appNameFormat: appNameFormat.currentIndex
44-
property alias cfg_limitDepth: limitDepth.checked
45-
property alias cfg_alphaSort: alphaSort.checked
46-
property alias cfg_showIconsRootLevel: showIconsRootLevel.checked
47-
4844
property alias cfg_recentOrdering: recentOrdering.currentIndex
4945
property alias cfg_showRecentApps: showRecentApps.checked
5046
property alias cfg_showRecentDocs: showRecentDocs.checked
@@ -58,6 +54,7 @@ Kirigami.FormLayout {
5854
property alias cfg_gridAllowTwoLines: gridAllowTwoLines.checked
5955
property alias cfg_defaultAllApps: defaultAllApps.checked
6056
property alias cfg_showDescription: showDescription.checked
57+
property alias cfg_alwaysShowSearchBar: alwaysShowSearchBar.checked
6158

6259
property alias cfg_downIconsDocuments: downIconsDocuments.checked
6360
property alias cfg_downIconsDownloads: downIconsDownloads.checked
@@ -229,6 +226,11 @@ Kirigami.FormLayout {
229226
text: i18n("Show Description for all apps and search items")
230227
}
231228

229+
CheckBox {
230+
id: alwaysShowSearchBar
231+
text: i18n("Always Show Search Bar")
232+
}
233+
232234
Item {
233235
Kirigami.FormData.isSection: true
234236
}
@@ -240,34 +242,6 @@ Kirigami.FormLayout {
240242

241243
model: [i18n("Name only"), i18n("Description only"), i18n("Name (Description)"), i18n("Description (Name)")]
242244
}
243-
244-
Item {
245-
Kirigami.FormData.isSection: true
246-
}
247-
248-
CheckBox {
249-
id: alphaSort
250-
251-
Kirigami.FormData.label: i18n("Behavior:")
252-
253-
text: i18n("Sort applications alphabetically")
254-
}
255-
256-
CheckBox {
257-
id: limitDepth
258-
259-
visible: !isDash
260-
261-
text: i18n("Flatten sub-menus to a single level")
262-
}
263-
264-
CheckBox {
265-
id: showIconsRootLevel
266-
267-
visible: !isDash
268-
269-
text: i18n("Show icons on the root level of the menu")
270-
}
271245

272246
Item {
273247
Kirigami.FormData.isSection: true

contents/ui/MainColumnItem.qml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Item {
170170
id: searchField
171171
focus: true
172172
placeholderText: i18n("Search...")
173-
opacity: searching
173+
opacity: searching || plasmoid.configuration.alwaysShowSearchBar
174174
height: units.iconSizes.medium
175175
width: parent.width - 2 * x
176176
x: 1.5 * units.largeSpacing
@@ -216,8 +216,9 @@ Item {
216216

217217
PlasmaExtras.Heading {
218218
id: mainLabelGrid
219-
anchors.top: parent.top
219+
anchors.top: plasmoid.configuration.alwaysShowSearchBar ? searchField.bottom : parent.top
220220
anchors.leftMargin: units.largeSpacing * 3
221+
anchors.topMargin: plasmoid.configuration.alwaysShowSearchBar ? 0.4 * units.largeSpacing : 0
221222
anchors.left: parent.left
222223
x: units.smallSpacing
223224
elide: Text.ElideRight
@@ -476,7 +477,7 @@ Item {
476477
left: parent.left
477478
}
478479
x: -units.smallSpacing
479-
visible: documentsFavoritesGrid.model.count > 6 && !searching && !showAllApps && !showRecents
480+
visible: documentsFavoritesGrid.model != null && documentsFavoritesGrid.model.count > 6 && !searching && !showAllApps && !showRecents
480481
}
481482

482483
ItemGridView {

contents/ui/MenuRepresentation.qml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ PlasmaCore.Dialog {
3838
property int cellWidthSide: units.gridUnit * 13
3939
property int cellHeight: iconSize + (Math.max(highlightItemSvg.margins.top + highlightItemSvg.margins.bottom,
4040
highlightItemSvg.margins.left + highlightItemSvg.margins.right))
41-
signal appendSearchText(string text)
4241

4342
onVisibleChanged: {
4443
if (!visible) {
@@ -125,7 +124,7 @@ PlasmaCore.Dialog {
125124
FocusScope {
126125
Layout.minimumWidth: mainColumnItem.width //+ tilesColumnItem.width
127126
Layout.maximumWidth: mainColumnItem.width //+ tilesColumnItem.width
128-
Layout.minimumHeight: mainColumnItem.tileSide * 6 + 85
127+
Layout.minimumHeight: mainColumnItem.tileSide * 6 + 85 + (plasmoid.configuration.alwaysShowSearchBar ? 15 : 0)
129128
Layout.maximumHeight: mainColumnItem.tileSide * 6 + 85
130129

131130
focus: true
@@ -136,9 +135,6 @@ PlasmaCore.Dialog {
136135

137136
MainColumnItem{
138137
id: mainColumnItem
139-
onNewTextQuery: {
140-
appendSearchText(text)
141-
}
142138
}
143139
}
144140

contents/ui/main.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Item {
6767

6868
appNameFormat: plasmoid.configuration.appNameFormat
6969
flat: true
70-
sorted: plasmoid.configuration.alphaSort
70+
sorted: true
7171
showSeparators: false
7272
appletInterface: plasmoid
7373

0 commit comments

Comments
 (0)