Commit 56dc2ad2 authored by Marco Martin's avatar Marco Martin

better icon sizing

parent f3e1ba0a
......@@ -237,6 +237,7 @@ MouseArea {
model: plasmoid.nativeInterface.applicationListModel
delegate: HomeLauncher {
maximumLineCount: 1
iconSize: root.iconSize
}
move: Transition {
......
import QtQuick 2.0
import QtQuick 2.5
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kio 1.0 as Kio
import org.kde.plasma.components 2.0 as PlasmaComponents
Item {
Column {
id: delegateRoot
width: applicationsView.cellWidth
height: applicationsView.cellHeight
property int iconSize
property var modelData: model
property bool isDropTarget: delegateRoot != dragDelegate && root.reorderingApps && applicationsView.dragData && applicationsView.dragData.ApplicationStorageIdRole == modelData.ApplicationStorageIdRole
property alias maximumLineCount: label.maximumLineCount
......@@ -16,12 +17,9 @@ Item {
PlasmaCore.IconItem {
id: icon
anchors {
centerIn: parent
verticalCenterOffset: -theme.mSize(theme.defaultFont).height
}
width: parent.height - label.height
height: width
anchors.horizontalCenter: parent.horizontalCenter
width: delegateRoot.iconSize
height: delegateRoot.iconSize
source: modelData.ApplicationIconRole
scale: root.reorderingApps && applicationsView.dragData && applicationsView.dragData.ApplicationStorageIdRole != modelData.ApplicationStorageIdRole ? 0.6 : 1
Behavior on scale {
......@@ -36,11 +34,8 @@ Item {
id: label
visible: text.length > 0
anchors {
top: icon.bottom
left: icon.left
right: icon.right
}
anchors.horizontalCenter: parent.horizontalCenter
width: icon.width
wrapMode: Text.WordWrap
horizontalAlignment: Qt.AlignHCenter
......
......@@ -34,7 +34,8 @@ Item {
//BEGIN properties
property Item toolBox
property alias appletsSpace: applicationsView.headerItem
property int buttonHeight: units.iconSizes.large + units.gridUnit * 2
readonly property int iconSize: units.iconSizes.large
property int buttonHeight: dragDelegate.height
property bool reorderingApps: false
property var layoutManager: LayoutManager
//END properties
......@@ -431,6 +432,7 @@ Item {
z: 999
property int xTarget
property int yTarget
iconSize: root.iconSize
Behavior on opacity {
ParallelAnimation {
......@@ -496,6 +498,7 @@ Item {
//clip: true
delegate: HomeLauncher {
visible: index > 3
iconSize: root.iconSize
}
header: AppletsArea {}
footer: Item {
......
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