1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-11 13:18:13 +03:00

add custom radius length paddings for background

This commit is contained in:
Michail Vourlakos 2020-08-22 22:06:54 +03:00
parent 8298bf0e2c
commit 305b0b9519

View File

@ -68,7 +68,8 @@ BackgroundProperties{
paddings.top: {
if (hasTopBorder) {
var minimum = themeExtendedBackground ? themeExtendedBackground.paddingTop : 0;
return Math.max(minimum, solidBackground.margins.top);
var customAppliedRadius = customRadiusIsEnabled && root.isVertical ? customRadius / 2 : 0;
return Math.max(minimum, customAppliedRadius, solidBackground.margins.top);
}
return 0;
@ -76,7 +77,8 @@ BackgroundProperties{
paddings.bottom: {
if (hasBottomBorder) {
var minimum = themeExtendedBackground ? themeExtendedBackground.paddingBottom : 0;
return Math.max(minimum, solidBackground.margins.bottom);
var customAppliedRadius = customRadiusIsEnabled && root.isVertical ? customRadius / 2 : 0;
return Math.max(minimum, customAppliedRadius, solidBackground.margins.bottom);
}
return 0;
@ -85,7 +87,8 @@ BackgroundProperties{
paddings.left: {
if (hasLeftBorder) {
var minimum = themeExtendedBackground ? themeExtendedBackground.paddingLeft : 0;
return Math.max(minimum, solidBackground.margins.left);
var customAppliedRadius = customRadiusIsEnabled && root.isHorizontal ? customRadius / 2 : 0;
return Math.max(minimum, customAppliedRadius, solidBackground.margins.left);
}
return 0;
@ -94,7 +97,8 @@ BackgroundProperties{
paddings.right: {
if (hasRightBorder) {
var minimum = themeExtendedBackground ? themeExtendedBackground.paddingRight : 0;
return Math.max(minimum, solidBackground.margins.right);
var customAppliedRadius = customRadiusIsEnabled && root.isHorizontal ? customRadius / 2 : 0;
return Math.max(minimum, customAppliedRadius, solidBackground.margins.right);
}
return 0;