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

@@ -27,6 +27,8 @@ namespace BlackGui
{
Q_ASSERT(this->m_model);
this->m_model->setStationMode(stationMode);
this->m_withMenuItemClear = true;
this->m_withMenuItemRefresh = true;
switch (stationMode)
{

View File

@@ -23,6 +23,7 @@ namespace BlackGui
*/
CStatusMessageView::CStatusMessageView(QWidget *parent) : CViewBase(parent)
{
m_withMenuItemClear = true;
this->standardInit(new CStatusMessageListModel(this));
}

View File

@@ -49,9 +49,9 @@ namespace BlackGui
void CViewBaseNonTemplate::customMenu(QMenu &menu) const
{
menu.addAction(BlackMisc::CIcons::refresh16(), "Update", this, SIGNAL(requestUpdate()));
menu.addAction(BlackMisc::CIcons::delete16(), "Clear", this, SLOT(ps_clear()));
menu.addSeparator();
if (this->m_withMenuItemRefresh) { menu.addAction(BlackMisc::CIcons::refresh16(), "Update", this, SIGNAL(requestUpdate())); }
if (this->m_withMenuItemClear) { menu.addAction(BlackMisc::CIcons::delete16(), "Clear", this, SLOT(ps_clear())); }
if (!menu.isEmpty()) { menu.addSeparator(); }
menu.addAction(BlackMisc::CIcons::resize16(), "Full resize", this, SLOT(fullResizeToContents()));
// resize to content might decrease performance,

View File

@@ -117,6 +117,8 @@ namespace BlackGui
int m_skipResizeThreshold = 40; //!< when to skip resize (rows count)
int m_resizeAutoNthTime = 1; //!< with ResizeAuto, resize every n-th time
bool m_forceStretchLastColumnWhenResized = false; //!< a small table might (few columns) might to fail stretching, force again
bool m_withMenuItemClear = false;
bool m_withMenuItemRefresh = false;
protected slots:
//! Helper method with template free signature serving as callback from threaded worker