Fixed some minor GUI issues

* resizing for floating widgets
* vertical policies
* menus for views
* margins for keypad
* using property mainwindowframeless in style sheet
This commit is contained in:
Klaus Basan
2014-11-21 02:04:55 +01:00
committed by Roland Winklmeier
parent cd2c7c12a7
commit facbefeeea
13 changed files with 451 additions and 402 deletions

View File

@@ -142,6 +142,7 @@ namespace BlackGui
// for the first time resize
if (!this->m_preferredSizeWhenFloating.isNull())
{
this->m_initialDockedMinimumSize = this->minimumSize();
this->resize(this->m_preferredSizeWhenFloating);
}
@@ -165,23 +166,22 @@ namespace BlackGui
}
this->setNullTitleBar();
this->setContentsMargins(this->m_marginsWhenFloating);
if (!this->m_wasAlreadyFloating)
{
this->initialFloating();
}
if (!this->m_wasAlreadyFloating) { this->initialFloating(); }
this->m_statusBar.show();
this->m_wasAlreadyFloating = true;
}
else
{
if (!this->m_windowTitleWhenDocked)
{
QDockWidget::setWindowTitle("");
}
if (!this->m_windowTitleWhenDocked) { QDockWidget::setWindowTitle(""); }
this->m_statusBar.hide();
this->setEmptyTitleBar();
this->setContentsMargins(this->m_marginsWhenDocked);
// sometimes floating sets a new minimum size, here we reset it
if (this->minimumHeight() > this->m_initialDockedMinimumSize.height())
{
this->setMinimumSize(this->m_initialDockedMinimumSize);
}
}
emit this->widgetTopLevelChanged(this, topLevel);
}