mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-28 18:50:40 +03:00
dont draw panel shadows when theme doesnot provide
when the plasma theme was not supporting shadows then Latte was double drawing the panel background when the user has chosen that wanted shadows BUG: 397980 FIXED-IN: 0.8.1 (cherry picked from commit 87094a6fe7c23de7cb14be1237ccaf1fba28d25e)
This commit is contained in:
parent
472041db38
commit
60f488f3a1
@ -221,6 +221,7 @@ void DockView::init()
|
||||
connect(this, &DockView::effectsAreaChanged, this, &DockView::updateEffects);
|
||||
|
||||
connect(&m_theme, &Plasma::Theme::themeChanged, this, &DockView::themeChanged);
|
||||
connect(&m_theme, &Plasma::Theme::themeChanged, this, &DockView::themeHasShadowChanged);
|
||||
|
||||
connect(this, &DockView::normalThicknessChanged, this, [&]() {
|
||||
if (m_behaveAsPlasmaPanel) {
|
||||
@ -1288,6 +1289,10 @@ void DockView::setMaskArea(QRect area)
|
||||
emit maskAreaChanged();
|
||||
}
|
||||
|
||||
bool DockView::themeHasShadow() const
|
||||
{
|
||||
return PanelShadows::self()->enabled();
|
||||
}
|
||||
|
||||
QRect DockView::effectsArea() const
|
||||
{
|
||||
|
@ -71,6 +71,7 @@ class DockView : public PlasmaQuick::ContainmentView
|
||||
//! Because Latte uses animations, changing to edit mode it may be different than
|
||||
//! when the isUserConfiguring changes value
|
||||
Q_PROPERTY(bool inEditMode READ inEditMode WRITE setInEditMode NOTIFY inEditModeChanged)
|
||||
Q_PROPERTY(bool themeHasShadow READ themeHasShadow NOTIFY themeHasShadowChanged)
|
||||
Q_PROPERTY(bool onPrimary READ onPrimary WRITE setOnPrimary NOTIFY onPrimaryChanged)
|
||||
|
||||
Q_PROPERTY(int alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged)
|
||||
@ -148,6 +149,8 @@ public:
|
||||
bool inEditMode() const;
|
||||
void setInEditMode(bool edit);
|
||||
|
||||
bool themeHasShadow() const;
|
||||
|
||||
float maxLength() const;
|
||||
void setMaxLength(float length);
|
||||
|
||||
@ -293,6 +296,7 @@ signals:
|
||||
void screenGeometryChanged();
|
||||
void shadowChanged();
|
||||
void themeChanged();
|
||||
void themeHasShadowChanged();
|
||||
void totalDocksCountChanged();
|
||||
void xChanged();
|
||||
void yChanged();
|
||||
|
@ -138,9 +138,9 @@ Item{
|
||||
panelSize + marginsHeight - (solidBackground.topIncreaser + solidBackground.bottomIncreaser)
|
||||
|
||||
imagePath: root.behaveAsPlasmaPanel || !Latte.WindowSystem.compositingActive
|
||||
|| !root.panelShadowsActive ? "" : "widgets/panel-background"
|
||||
|| !root.panelShadowsActive || !themeHasShadow ? "" : "widgets/panel-background"
|
||||
prefix: root.behaveAsPlasmaPanel || !Latte.WindowSystem.compositingActive
|
||||
|| !root.panelShadowsActive ? "" : "shadow"
|
||||
|| !root.panelShadowsActive || !themeHasShadow ? "" : "shadow"
|
||||
|
||||
visible: (opacity == 0) ? false : true
|
||||
|
||||
@ -153,6 +153,8 @@ Item{
|
||||
|
||||
enabledBorders: dock ? dock.enabledBorders : PlasmaCore.FrameSvg.NoBorder
|
||||
|
||||
property bool themeHasShadow: dock ? dock.themeHasShadow : false
|
||||
|
||||
Behavior on opacity {
|
||||
enabled: Latte.WindowSystem.compositingActive
|
||||
NumberAnimation { duration: barLine.animationTime }
|
||||
|
Loading…
x
Reference in New Issue
Block a user