Skip to content

Commit

Permalink
Add square property to itemMultiGrid and Bump version to 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekmedia committed Jul 6, 2021
1 parent 690d7b6 commit 361a5e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions contents/ui/ItemMultiGridView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ PlasmaExtras.ScrollArea {

property bool grabFocus: false
property bool showDescriptions: false
property bool square: false
property int iconSize: units.iconSizes.medium

property alias model: repeater.model
property alias count: repeater.count
property int cellWidth: parent.width
property int cellHeight: iconSize + (2 * highlightItemSvg.margins.top)

//clip: true
verticalScrollBarPolicy: Qt.ScrollBarAsNeeded
Expand Down Expand Up @@ -135,6 +138,7 @@ PlasmaExtras.ScrollArea {
top: gridViewLabel.bottom
topMargin: units.smallSpacing
}
square: itemMultiGrid.square
showDescriptions: itemMultiGrid.showDescriptions
increaseLeftSpacings: true
//TODO >
Expand All @@ -144,8 +148,8 @@ PlasmaExtras.ScrollArea {

width: parent.width
height: Math.ceil(count * cellHeight)
cellWidth: parent.width
cellHeight: itemMultiGrid.iconSize + (2 * highlightItemSvg.margins.top)//<>cellSize
cellWidth: itemMultiGrid.cellWidth
cellHeight: itemMultiGrid.cellHeight
iconSize: itemMultiGrid.iconSize
model: repeater.model.modelForRow(index)

Expand Down
2 changes: 1 addition & 1 deletion metadata.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ X-Plasma-Provides=org.kde.plasma.launchermenu
X-KDE-PluginInfo-Author=Prateek SU
X-KDE-PluginInfo-Email=pankajsunal123@gmail.com
X-KDE-PluginInfo-Name=menu11
X-KDE-PluginInfo-Version=4.0
X-KDE-PluginInfo-Version=5.0
X-KDE-PluginInfo-Category=Application Launchers
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL-2.0+
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"ServiceTypes": [
"Plasma/Applet"
],
"Version": "4.0"
"Version": "5.0"
},
"X-Plasma-API": "declarativeappletscript",
"X-Plasma-MainScript": "ui/main.qml",
Expand Down

0 comments on commit 361a5e7

Please sign in to comment.