fix normalThickness value

work/spdx
Michail Vourlakos 4 years ago
parent 919b0cbf8c
commit f8cce7acfa

@ -605,7 +605,7 @@ QRect Positioner::maximumNormalGeometry()
int xPos = 0; int xPos = 0;
int yPos = m_view->screen()->geometry().y();; int yPos = m_view->screen()->geometry().y();;
int maxHeight = m_view->screen()->geometry().height(); int maxHeight = m_view->screen()->geometry().height();
int maxWidth = m_view->normalThickness(); int maxWidth = m_view->maxNormalThickness();
QRect maxGeometry; QRect maxGeometry;
maxGeometry.setRect(0, 0, maxWidth, maxHeight); maxGeometry.setRect(0, 0, maxWidth, maxHeight);

@ -716,15 +716,6 @@ bool View::contextMenuIsShown() const
return m_contextMenu->menu(); 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 int View::normalThickness() const
{ {
return m_normalThickness; return m_normalThickness;

@ -153,8 +153,6 @@ public:
bool onPrimary() const; bool onPrimary() const;
void setOnPrimary(bool flag); void setOnPrimary(bool flag);
int currentThickness() const;
bool behaveAsPlasmaPanel() const; bool behaveAsPlasmaPanel() const;
void setBehaveAsPlasmaPanel(bool behavior); void setBehaveAsPlasmaPanel(bool behavior);

@ -101,7 +101,7 @@ Item{
target: latteView target: latteView
property:"normalThickness" property:"normalThickness"
when: latteView && inPublishingState 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{ 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 //! 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 //! some space around the settings window
property int maxHeight: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? 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 viewConfig.availableScreenGeometry.height - 2 * units.largeSpacing
property int maxWidth: 0.6 * latteView.screenGeometry.width property int maxWidth: 0.6 * latteView.screenGeometry.width

Loading…
Cancel
Save