mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-23 13:33:50 +03:00
fix normalThickness value
This commit is contained in:
parent
919b0cbf8c
commit
f8cce7acfa
@ -605,7 +605,7 @@ QRect Positioner::maximumNormalGeometry()
|
||||
int xPos = 0;
|
||||
int yPos = m_view->screen()->geometry().y();;
|
||||
int maxHeight = m_view->screen()->geometry().height();
|
||||
int maxWidth = m_view->normalThickness();
|
||||
int maxWidth = m_view->maxNormalThickness();
|
||||
QRect maxGeometry;
|
||||
maxGeometry.setRect(0, 0, maxWidth, maxHeight);
|
||||
|
||||
|
@ -716,15 +716,6 @@ bool View::contextMenuIsShown() const
|
||||
return m_contextMenu->menu();
|
||||
}
|
||||
|
||||
int View::currentThickness() const
|
||||
{
|
||||
if (formFactor() == Plasma::Types::Vertical) {
|
||||
return m_effects->mask().isNull() ? width() : m_effects->mask().width() - m_effects->innerShadow();
|
||||
} else {
|
||||
return m_effects->mask().isNull() ? height() : m_effects->mask().height() - m_effects->innerShadow();
|
||||
}
|
||||
}
|
||||
|
||||
int View::normalThickness() const
|
||||
{
|
||||
return m_normalThickness;
|
||||
|
@ -153,8 +153,6 @@ public:
|
||||
bool onPrimary() const;
|
||||
void setOnPrimary(bool flag);
|
||||
|
||||
int currentThickness() const;
|
||||
|
||||
bool behaveAsPlasmaPanel() const;
|
||||
void setBehaveAsPlasmaPanel(bool behavior);
|
||||
|
||||
|
@ -101,7 +101,7 @@ Item{
|
||||
target: latteView
|
||||
property:"normalThickness"
|
||||
when: latteView && inPublishingState
|
||||
value: root.behaveAsPlasmaPanel ? thicknessAsPanel : metrics.mask.screenEdge + metrics.mask.maxNormalForItemsWithoutScreenEdge
|
||||
value: root.behaveAsPlasmaPanel ? thicknessAsPanel : metrics.mask.screenEdge + metrics.mask.thickness.maxNormalForItemsWithoutScreenEdge
|
||||
}
|
||||
|
||||
Binding{
|
||||
|
@ -55,7 +55,7 @@ FocusScope {
|
||||
//! we use 100px. or 50px. in order to give space for othe views to be shown and to have also
|
||||
//! some space around the settings window
|
||||
property int maxHeight: plasmoid.formFactor === PlasmaCore.Types.Horizontal ?
|
||||
viewConfig.availableScreenGeometry.height - latteView.editThickness - units.largeSpacing :
|
||||
viewConfig.availableScreenGeometry.height - (latteView.editThickness - latteView.maxNormalThickness) - units.largeSpacing :
|
||||
viewConfig.availableScreenGeometry.height - 2 * units.largeSpacing
|
||||
|
||||
property int maxWidth: 0.6 * latteView.screenGeometry.width
|
||||
|
Loading…
Reference in New Issue
Block a user