improve AddItem visual

--make it Square with small roundness in order to
fit better at all cases
work/spdx
Michail Vourlakos
parent b0cfb738bb
commit ac8a88d700

@ -1033,8 +1033,10 @@ Item {
LatteComponents.AddItem{
id: dndSpacerAddItem
width: root.isHorizontal ? parent.width : parent.width - metrics.margin.screenEdge
height: root.isHorizontal ? parent.height - metrics.margin.screenEdge: parent.height
width: metrics.iconSize
height: metrics.iconSize
property int thickMargin: metrics.margin.screenEdge + metrics.margin.thickness
states:[
State{
@ -1048,7 +1050,7 @@ Item {
}
PropertyChanges{
target: dndSpacerAddItem;
anchors.leftMargin: 0; anchors.rightMargin: 0; anchors.topMargin:0; anchors.bottomMargin: metrics.margin.screenEdge;
anchors.leftMargin: 0; anchors.rightMargin: 0; anchors.topMargin:0; anchors.bottomMargin: thickMargin;
anchors.horizontalCenterOffset: 0; anchors.verticalCenterOffset: 0;
}
},
@ -1063,7 +1065,7 @@ Item {
}
PropertyChanges{
target: dndSpacerAddItem;
anchors.leftMargin: 0; anchors.rightMargin: 0; anchors.topMargin: metrics.margin.screenEdge; anchors.bottomMargin: 0;
anchors.leftMargin: 0; anchors.rightMargin: 0; anchors.topMargin: thickMargin; anchors.bottomMargin: 0;
anchors.horizontalCenterOffset: 0; anchors.verticalCenterOffset: 0;
}
},
@ -1078,7 +1080,7 @@ Item {
}
PropertyChanges{
target: dndSpacerAddItem;
anchors.leftMargin: metrics.margin.screenEdge; anchors.rightMargin: 0; anchors.topMargin:0; anchors.bottomMargin: 0;
anchors.leftMargin: thickMargin; anchors.rightMargin: 0; anchors.topMargin:0; anchors.bottomMargin: 0;
anchors.horizontalCenterOffset: 0; anchors.verticalCenterOffset: 0;
}
},

@ -33,7 +33,7 @@ Item{
height: width
anchors.centerIn: parent
radius: Math.max(width,height)/2
radius: 0.05 * Math.max(width,height)
color: Qt.rgba(theme.backgroundColor.r, theme.backgroundColor.g, theme.backgroundColor.b, backgroundOpacity)
border.width: 1

@ -33,6 +33,8 @@ Rectangle{
property bool drawAddCross: true
property int iconSize: 64
readonly property color outlineColorBase: theme.backgroundColor
readonly property real outlineColorBaseBrightness: ColorizerTools.colorBrightness(outlineColorBase)
readonly property color outlineColor: {
@ -157,7 +159,8 @@ Rectangle{
width: thickness
height: thickness
readonly property int thickness: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? (parent.height - freeSpace):(parent.width - freeSpace)
readonly property int thickness: Math.min(addingArea.iconSize,
plasmoid.formFactor === PlasmaCore.Types.Horizontal ? (parent.height - freeSpace):(parent.width - freeSpace))
readonly property int freeSpace: Math.max(16, (heading.implicitHeight + units.smallSpacing*2))
}

@ -1050,6 +1050,7 @@ Item {
radius: appletAbilities.metrics.iconSize/10
backgroundOpacity: mouseHandler.isDroppingOnlyLaunchers || appletAbilities.launchers.isShowingAddLaunchersMessage ? 0.75 : 0
duration: appletAbilities.animations.speedFactor.current
iconSize: appletAbilities.metrics.iconSize
z: 99
title: i18n("Tasks Area")

Loading…
Cancel
Save