protect floating views appearance

--floating views is a strange situation for which
plasma theme do not have any way to be protected for
their drawing (there is a chance that shadows and content
overlap). Latte in order to protect from that situation
now uses the auto-discovered plasma theme roundness to be used
in order to calculate the minimum thicknes for panel
background.
pull/11/head
Michail Vourlakos 5 years ago
parent a9aeb81d62
commit 5288aa6e38

@ -458,22 +458,54 @@ Item{
}
}
Binding {
target: root
property: "panelThickMarginBase"
value: {
var minimum = root.screenEdgeMarginEnabled && themeExtended ? themeExtended.topEdgeRoundness : 0;
if (root.useThemePanel){
if (root.isVertical){
if (plasmoid.location === PlasmaCore.Types.LeftEdge) {
return Math.max(minimum, solidBackground.margins.left);
} else if (plasmoid.location === PlasmaCore.Types.RightEdge) {
return Math.max(minimum, solidBackground.margins.right);
}
} else {
if (plasmoid.location === PlasmaCore.Types.BottomEdge) {
return Math.max(minimum, solidBackground.margins.bottom);
} else if (plasmoid.location === PlasmaCore.Types.TopEdge) {
return Math.max(minimum, solidBackground.margins.top);
}
}
} else {
return 0;
}
}
}
Binding {
target: root
property: "panelThickMarginHigh"
value: {
var minimum = root.screenEdgeMarginEnabled && themeExtended ? themeExtended.topEdgeRoundness : 0;
if (root.useThemePanel){
if (root.isVertical){
if (plasmoid.location === PlasmaCore.Types.LeftEdge)
return solidBackground.margins.right;
else if (plasmoid.location === PlasmaCore.Types.RightEdge)
return solidBackground.margins.left;
if (plasmoid.location === PlasmaCore.Types.LeftEdge) {
return Math.max(minimum, solidBackground.margins.right);
} else if (plasmoid.location === PlasmaCore.Types.RightEdge) {
return Math.max(minimum, solidBackground.margins.left);
}
} else {
if (plasmoid.location === PlasmaCore.Types.BottomEdge)
return solidBackground.margins.top;
else if (plasmoid.location === PlasmaCore.Types.TopEdge)
return solidBackground.margins.bottom;
if (plasmoid.location === PlasmaCore.Types.BottomEdge) {
return Math.max(minimum, solidBackground.margins.top);
} else if (plasmoid.location === PlasmaCore.Types.TopEdge) {
return Math.max(minimum, solidBackground.margins.bottom);
}
}
} else {
return 0;
}
}
}

@ -384,7 +384,7 @@ Item {
}
property int themePanelThickness: {
var panelBase = root.panelThickMarginHigh;
var panelBase = root.panelThickMarginHigh + root.panelThickMarginBase;
var margin = shrinkThickMargins ? 0 : thickMargins + localScreenEdgeMargin;
var maxPanelSize = (iconSize + margin) - panelBase;
var percentage = Latte.WindowSystem.compositingActive ? plasmoid.configuration.panelSize/100 : 1;

Loading…
Cancel
Save