Commit af75d2ac authored by Marco Martin's avatar Marco Martin
Browse files

eckbox to disable icon resize

parent 4d165bd1
......@@ -23,4 +23,5 @@ pragma Singleton
QtObject {
property bool coloredTiles: false
property bool compactTiles: true
}
......@@ -76,7 +76,7 @@ AbstractDelegate {
visible: text.length > 0
Layout.fillWidth: true
wrapMode: Text.WordWrap
horizontalAlignment: delegate.isCurrent ? Text.AlignLeft : Text.AlignHCenter
horizontalAlignment: delegate.isCurrent || !Hack.compactTiles ? Text.AlignLeft : Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
maximumLineCount: 2
elide: Text.ElideRight
......@@ -102,10 +102,10 @@ AbstractDelegate {
states: [
State {
name: "selected"
when: delegate.isCurrent
when: delegate.isCurrent || !Hack.compactTiles
PropertyChanges {
target: delegate
implicitWidth: listView.cellWidth * 2
implicitWidth: Hack.compactTiles ? listView.cellWidth * 2 : listView.cellWidth
}
PropertyChanges {
target: iconItem
......@@ -124,7 +124,7 @@ AbstractDelegate {
},
State {
name: "normal"
when: !delegate.isCurrent
when: !delegate.isCurrent || !Hack.compactTiles
PropertyChanges {
target: delegate
implicitWidth: listView.cellWidth
......
......@@ -84,8 +84,8 @@ FocusScope {
topMargin: Kirigami.Units.largeSpacing*2
leftMargin: -Kirigami.Units.largeSpacing
}
readonly property int cellWidth: (Kirigami.Units.iconSizes.huge + Kirigami.Units.largeSpacing*4)
property int cellHeight: cellWidth + units.gridUnit * 3
readonly property int cellWidth: (Kirigami.Units.iconSizes.huge + Kirigami.Units.largeSpacing*4) * (BigScreen.Hack.compactTiles ? 1 : 2)
property int cellHeight: (BigScreen.Hack.compactTiles ? cellWidth : cellWidth/2) + units.gridUnit * 3
property int currentIndex: 0
property alias count: repeater.count
property alias model: repeater.model
......
......@@ -38,15 +38,23 @@ Item {
Layout.minimumHeight: Screen.desktopAvailableHeight * 0.6
property Item wallpaper
Controls.CheckBox {
z: 999
Column {
anchors {
top: topBar.bottom
right: parent.right
}
text: "Use Colored Tiles"
checked: BigScreen.Hack.coloredTiles
onCheckedChanged: BigScreen.Hack.coloredTiles = checked
Controls.CheckBox {
z: 999
text: "Use Colored Tiles"
checked: BigScreen.Hack.coloredTiles
onCheckedChanged: BigScreen.Hack.coloredTiles = checked
}
Controls.CheckBox {
z: 999
text: "Use Compact Tiles"
checked: BigScreen.Hack.compactTiles
onCheckedChanged: BigScreen.Hack.compactTiles = checked
}
}
Containment.onAppletAdded: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment