1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-22 09:33:54 +03:00

plasmatheme:define max background opacity to 1%

BUG:443366
This commit is contained in:
Michail Vourlakos 2022-06-27 12:41:22 +03:00
parent 54ccf51cda
commit 899c0155c7
2 changed files with 9 additions and 0 deletions

View File

@ -140,6 +140,12 @@ void PanelBackground::updateMaxOpacity(Plasma::Svg *svg)
m_maxOpacity = alphasum / (float)(2 * CENTERWIDTH);
//! minimum acceptable panel background opacity is 1%. Such is a case is when
//! panel background is fully transparent but it provides a border. In such case
//! previous approach was identifying as background max opacity 0% and in such case
//! all the upcoming calculations where returning a fully transparent plasma svg to the user
m_maxOpacity = qMax(0.01f, m_maxOpacity);
emit maxOpacityChanged();
}

View File

@ -245,6 +245,9 @@ BackgroundProperties{
property int animationTime: 6*animations.speedFactor.current*animations.duration.small
//! Opacity related
readonly property bool isDefaultOpacityEnabled: plasmoid.configuration.panelTransparency===-1
//! Metrics related
readonly property bool isGreaterThanItemThickness: root.useThemePanel && (totals.visualThickness >= (metrics.iconSize + metrics.margin.tailThickness))