maximizing the panel actually works

This commit is contained in:
Marco Martin 2014-02-12 17:36:46 +01:00
parent 6bccf2d1af
commit 664fd4167c
2 changed files with 15 additions and 0 deletions

View File

@ -126,6 +126,19 @@ KConfigGroup PanelView::config() const
}
}
void PanelView::maximize()
{
int length;
if (containment()->formFactor() == Plasma::Types::Vertical) {
length = screen()->size().height();
} else {
length = screen()->size().width();
}
setOffset(0);
setMinimumLength(length);
setMaximumLength(length);
}
Qt::Alignment PanelView::alignment() const
{
return m_alignment;

View File

@ -54,6 +54,8 @@ public:
virtual KConfigGroup config() const;
Q_INVOKABLE void maximize();
Qt::Alignment alignment() const;
void setAlignment(Qt::Alignment alignment);