Allow auto ajdust for floating widgets (via menu)

refs #299
This commit is contained in:
Klaus Basan
2014-08-03 14:40:32 +02:00
parent 34c9c5b7df
commit a78422bf3e
6 changed files with 44 additions and 6 deletions

View File

@@ -50,6 +50,9 @@ namespace BlackGui
//! Margins when widget is floating
void setMarginsWhenDocked(int left, int top, int right, int bottom) { this->m_marginsWhenDocked = QMargins(left, top, right, bottom); }
//! Auto adjust size when floating
void setAutoAdjustWhenFloating(bool autoAdjust) { this->m_autoAdjustWhenFloating = autoAdjust; }
//! Window title backup
const QString &windowTitleBackup() const { return this->m_windowTitleBackup; }
@@ -59,8 +62,6 @@ namespace BlackGui
//! Show the window title when docked
void showTitleWhenDocked(bool show);
public slots:
//! Toggle floating
void toggleFloating();
@@ -100,6 +101,7 @@ namespace BlackGui
QMargins m_marginsWhenDocked; //!< Offsets when window is floating
QString m_windowTitleBackup; //!< original title, even if the widget title is deleted for layout purposes
bool m_windowTitleWhenDocked = true;
bool m_autoAdjustWhenFloating = true;
//! Empty widget with no size
void initTitleBarWidgets();