mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
better icon sizing
This commit is contained in:
parent
f3e1ba0abe
commit
56dc2ad23f
3 changed files with 13 additions and 14 deletions
|
|
@ -237,6 +237,7 @@ MouseArea {
|
|||
model: plasmoid.nativeInterface.applicationListModel
|
||||
delegate: HomeLauncher {
|
||||
maximumLineCount: 1
|
||||
iconSize: root.iconSize
|
||||
}
|
||||
|
||||
move: Transition {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue