|
|
|
@ -67,6 +67,8 @@ void Effects::init()
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
connect(this, &Effects::backgroundAllCornersChanged, this, &Effects::updateEnabledBorders);
|
|
|
|
|
|
|
|
|
|
connect(m_view, &Latte::View::alignmentChanged, this, &Effects::updateEnabledBorders);
|
|
|
|
|
connect(m_view, &Latte::View::maxLengthChanged, this, &Effects::updateEnabledBorders);
|
|
|
|
|
connect(m_view, &Latte::View::offsetChanged, this, &Effects::updateEnabledBorders);
|
|
|
|
@ -108,6 +110,21 @@ void Effects::setAnimationsBlocked(bool blocked)
|
|
|
|
|
emit animationsBlockedChanged();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool Effects::backgroundAllCorners() const
|
|
|
|
|
{
|
|
|
|
|
return m_backgroundAllCorners;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Effects::setBackgroundAllCorners(bool allcorners)
|
|
|
|
|
{
|
|
|
|
|
if (m_backgroundAllCorners == allcorners) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
m_backgroundAllCorners = allcorners;
|
|
|
|
|
emit backgroundAllCornersChanged();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool Effects::drawShadows() const
|
|
|
|
|
{
|
|
|
|
|
return m_drawShadows;
|
|
|
|
@ -514,7 +531,7 @@ void Effects::updateEnabledBorders()
|
|
|
|
|
|
|
|
|
|
Plasma::FrameSvg::EnabledBorders borders = Plasma::FrameSvg::AllBorders;
|
|
|
|
|
|
|
|
|
|
if (!m_view->screenEdgeMarginEnabled()) {
|
|
|
|
|
if (!m_view->screenEdgeMarginEnabled() && !m_backgroundAllCorners) {
|
|
|
|
|
switch (m_view->location()) {
|
|
|
|
|
case Plasma::Types::TopEdge:
|
|
|
|
|
borders &= ~Plasma::FrameSvg::TopBorder;
|
|
|
|
@ -537,6 +554,7 @@ void Effects::updateEnabledBorders()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!m_backgroundAllCorners) {
|
|
|
|
|
if ((m_view->location() == Plasma::Types::LeftEdge || m_view->location() == Plasma::Types::RightEdge)) {
|
|
|
|
|
if (m_view->maxLength() == 1 && m_view->alignment() == Latte::Types::Justify) {
|
|
|
|
|
if (!m_forceTopBorder) {
|
|
|
|
@ -571,6 +589,7 @@ void Effects::updateEnabledBorders()
|
|
|
|
|
borders &= ~Plasma::FrameSvg::RightBorder;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m_enabledBorders != borders) {
|
|
|
|
|
m_enabledBorders = borders;
|
|
|
|
|