mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-21 10:50:30 +03:00
fix grow/shrink of behaveAsPlasmaPanel dock behave
This commit is contained in:
parent
d1cb29b716
commit
721001ecc4
@ -179,6 +179,13 @@ void DockView::init()
|
||||
connect(this, &DockView::effectsAreaChanged, this, &DockView::updateEffects);
|
||||
|
||||
connect(&m_theme, &Plasma::Theme::themeChanged, this, &DockView::updateEffects);
|
||||
|
||||
connect(this, &DockView::normalThicknessChanged, this, [&]() {
|
||||
if (m_behaveAsPlasmaPanel) {
|
||||
syncGeometry();
|
||||
}
|
||||
});
|
||||
|
||||
connect(this, SIGNAL(normalThicknessChanged()), corona(), SIGNAL(availableScreenRectChanged()));
|
||||
connect(this, SIGNAL(shadowChanged()), corona(), SIGNAL(availableScreenRectChanged()));
|
||||
rootContext()->setContextProperty(QStringLiteral("dock"), this);
|
||||
|
@ -158,7 +158,7 @@ Item{
|
||||
property int panelSize: automaticPanelSize
|
||||
property int automaticPanelSize: {
|
||||
if (root.behaveAsPlasmaPanel) {
|
||||
return root.isVertical ? root.width : root.height;
|
||||
return root.statesLineSize + root.iconSize + root.thickMargin;
|
||||
} else {
|
||||
var icons = root.statesLineSize + root.iconSize + root.thickMargin + 1;
|
||||
var panels = root.themePanelSize + root.panelMargin;
|
||||
@ -173,7 +173,7 @@ Item{
|
||||
}
|
||||
|
||||
property int shadowsSize: {
|
||||
if (shadowsSvgItem && root.useThemePanel && root.panelShadowsActive){
|
||||
if (shadowsSvgItem && !root.behaveAsPlasmaPanel && root.useThemePanel && root.panelShadowsActive){
|
||||
if (root.isVertical){
|
||||
if (plasmoid.location === PlasmaCore.Types.LeftEdge)
|
||||
return shadowsSvgItem.margins.right;
|
||||
|
@ -56,7 +56,10 @@ Item{
|
||||
property int thicknessZoom: root.statesLineSize + ((root.iconSize+root.thickMargin) * root.zoomFactor) + 2
|
||||
//it is used to keep thickness solid e.g. when iconSize changes from auto functions
|
||||
property int thicknessMidOriginal: Math.max(thicknessNormalOriginal, statesLineSizeOriginal + (1 + (0.65 * (root.zoomFactor-1)))*(root.maxIconSize+root.thickMarginOriginal)) //needed in some animations
|
||||
property int thicknessNormalOriginal: Math.max(thicknessNormalOriginalValue, root.realPanelSize + root.panelShadow)
|
||||
property int thicknessNormalOriginal: !root.behaveAsPlasmaPanel ?
|
||||
Math.max(thicknessNormalOriginalValue, root.realPanelSize + root.panelShadow) :
|
||||
root.realPanelSize + root.panelShadow
|
||||
|
||||
property int thicknessNormalOriginalValue: statesLineSizeOriginal + root.maxIconSize + root.thickMarginOriginal + 1
|
||||
property int thicknessZoomOriginal: Math.max(statesLineSizeOriginal + ((root.maxIconSize+root.thickMarginOriginal) * root.zoomFactor) + 2,
|
||||
root.realPanelSize + root.panelShadow)
|
||||
|
Loading…
x
Reference in New Issue
Block a user