mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Some dock widget formatting and ESC key can dock ("unfloat") widget
This commit is contained in:
@@ -48,24 +48,24 @@ namespace BlackGui
|
||||
m_allowStatusBar(allowStatusBar)
|
||||
{
|
||||
// init settings
|
||||
this->ps_onStyleSheetsChanged();
|
||||
this->onStyleSheetsChanged();
|
||||
this->initTitleBarWidgets();
|
||||
|
||||
// context menu
|
||||
this->m_input = new CMarginsInput(this);
|
||||
this->m_input->setMaximumWidth(150);
|
||||
this->m_marginMenuAction = new QWidgetAction(this);
|
||||
this->m_marginMenuAction->setDefaultWidget(this->m_input);
|
||||
this->m_fontMenu = new CFontMenu(this, true, Qt::WidgetWithChildrenShortcut);
|
||||
m_input = new CMarginsInput(this);
|
||||
m_input->setMaximumWidth(150);
|
||||
m_marginMenuAction = new QWidgetAction(this);
|
||||
m_marginMenuAction->setDefaultWidget(m_input);
|
||||
m_fontMenu = new CFontMenu(this, true, Qt::WidgetWithChildrenShortcut);
|
||||
|
||||
this->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(this, &CDockWidget::customContextMenuRequested, this, &CDockWidget::ps_showContextMenu);
|
||||
connect(this->m_input, &CMarginsInput::changedMargins, this, &CDockWidget::ps_menuChangeMargins);
|
||||
connect(this, &CDockWidget::customContextMenuRequested, this, &CDockWidget::showContextMenu);
|
||||
connect(m_input, &CMarginsInput::changedMargins, this, &CDockWidget::menuChangeMargins);
|
||||
|
||||
// connect
|
||||
connect(this, &QDockWidget::topLevelChanged, this, &CDockWidget::ps_onTopLevelChanged);
|
||||
connect(sGui, &CGuiApplication::styleSheetsChanged, this, &CDockWidget::ps_onStyleSheetsChanged);
|
||||
connect(this, &QDockWidget::visibilityChanged, this, &CDockWidget::ps_onVisibilityChanged);
|
||||
connect(this, &QDockWidget::topLevelChanged, this, &CDockWidget::onTopLevelChanged);
|
||||
connect(sGui, &CGuiApplication::styleSheetsChanged, this, &CDockWidget::onStyleSheetsChanged);
|
||||
connect(this, &QDockWidget::visibilityChanged, this, &CDockWidget::onVisibilityChanged);
|
||||
}
|
||||
|
||||
void CDockWidget::setMargins()
|
||||
@@ -85,16 +85,16 @@ namespace BlackGui
|
||||
|
||||
void CDockWidget::setOriginalTitleBar()
|
||||
{
|
||||
if (!this->m_titleBarWidgetOriginal) { this->initTitleBarWidgets(); }
|
||||
if (this->titleBarWidget() == this->m_titleBarWidgetOriginal) return; // on purpose, as I do not know what happens when I call setTitleBar
|
||||
this->setTitleBarWidget(this->m_titleBarWidgetOriginal);
|
||||
if (!m_titleBarWidgetOriginal) { this->initTitleBarWidgets(); }
|
||||
if (this->titleBarWidget() == m_titleBarWidgetOriginal) return; // on purpose, as I do not know what happens when I call setTitleBar
|
||||
this->setTitleBarWidget(m_titleBarWidgetOriginal);
|
||||
}
|
||||
|
||||
void CDockWidget::setEmptyTitleBar()
|
||||
{
|
||||
if (!this->m_titleBarWidgetOriginal) { this->initTitleBarWidgets(); }
|
||||
if (this->titleBarWidget() == this->m_titleBarWidgetEmpty) { return; } // on purpose, as I do not know what happens when I call setTitleBar
|
||||
this->setTitleBarWidget(this->m_titleBarWidgetEmpty);
|
||||
if (!m_titleBarWidgetOriginal) { this->initTitleBarWidgets(); }
|
||||
if (this->titleBarWidget() == m_titleBarWidgetEmpty) { return; } // on purpose, as I do not know what happens when I call setTitleBar
|
||||
this->setTitleBarWidget(m_titleBarWidgetEmpty);
|
||||
}
|
||||
|
||||
void CDockWidget::setNullTitleBarWidget()
|
||||
@@ -155,33 +155,33 @@ namespace BlackGui
|
||||
|
||||
bool CDockWidget::isWidgetVisible() const
|
||||
{
|
||||
return this->m_dockWidgetVisible && this->isVisible();
|
||||
return m_dockWidgetVisible && this->isVisible();
|
||||
}
|
||||
|
||||
void CDockWidget::setWindowTitle(const QString &title)
|
||||
{
|
||||
this->m_windowTitleBackup = title;
|
||||
m_windowTitleBackup = title;
|
||||
QDockWidget::setWindowTitle(title);
|
||||
}
|
||||
|
||||
void CDockWidget::displayStatusMessage(const BlackMisc::CStatusMessage &statusMessage)
|
||||
{
|
||||
if (!this->m_allowStatusBar || !this->isFloating()) { return; }
|
||||
this->m_statusBar.displayStatusMessage(statusMessage);
|
||||
if (!m_allowStatusBar || !this->isFloating()) { return; }
|
||||
m_statusBar.displayStatusMessage(statusMessage);
|
||||
}
|
||||
|
||||
void CDockWidget::displayStatusMessages(const BlackMisc::CStatusMessageList &statusMessages)
|
||||
{
|
||||
if (!this->m_allowStatusBar || !this->isFloating()) { return; }
|
||||
this->m_statusBar.displayStatusMessages(statusMessages);
|
||||
if (!m_allowStatusBar || !this->isFloating()) { return; }
|
||||
m_statusBar.displayStatusMessages(statusMessages);
|
||||
}
|
||||
|
||||
void CDockWidget::showTitleWhenDocked(bool show)
|
||||
{
|
||||
this->m_windowTitleWhenDocked = show;
|
||||
m_windowTitleWhenDocked = show;
|
||||
if (show)
|
||||
{
|
||||
QDockWidget::setWindowTitle(this->m_windowTitleBackup);
|
||||
QDockWidget::setWindowTitle(m_windowTitleBackup);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -191,12 +191,12 @@ namespace BlackGui
|
||||
|
||||
void CDockWidget::resetWasAlreadyFloating()
|
||||
{
|
||||
this->m_wasAlreadyFloating = false;
|
||||
m_wasAlreadyFloating = false;
|
||||
}
|
||||
|
||||
void CDockWidget::setPreferredSizeWhenFloating(const QSize &size)
|
||||
{
|
||||
this->m_preferredSizeWhenFloating = size;
|
||||
m_preferredSizeWhenFloating = size;
|
||||
}
|
||||
|
||||
void CDockWidget::setFrameless(bool frameless)
|
||||
@@ -204,12 +204,12 @@ namespace BlackGui
|
||||
CEnableForFramelessWindow::setFrameless(frameless);
|
||||
|
||||
// grip
|
||||
bool hasStatusBar = this->m_statusBar.getStatusBar();
|
||||
bool hasStatusBar = m_statusBar.getStatusBar();
|
||||
if (frameless)
|
||||
{
|
||||
if (hasStatusBar)
|
||||
{
|
||||
this->addFramelessSizeGripToStatusBar(this->m_statusBar.getStatusBar());
|
||||
this->addFramelessSizeGripToStatusBar(m_statusBar.getStatusBar());
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -319,6 +319,18 @@ namespace BlackGui
|
||||
if (!handleMouseMoveEvent(event)) { QDockWidget::mouseMoveEvent(event); } ;
|
||||
}
|
||||
|
||||
void CDockWidget::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
if (event->key() == Qt::Key_Escape)
|
||||
{
|
||||
if (this->isFloating())
|
||||
{
|
||||
this->toggleFloating();
|
||||
}
|
||||
}
|
||||
QDockWidget::keyPressEvent(event);
|
||||
}
|
||||
|
||||
void CDockWidget::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if (!handleMousePressEvent(event)) { QDockWidget::mousePressEvent(event); }
|
||||
@@ -357,9 +369,9 @@ namespace BlackGui
|
||||
contextMenu->addAction(BlackMisc::CIcons::refresh16(), "Reset to defaults", this, &CDockWidget::resetSettings);
|
||||
contextMenu->addAction(BlackMisc::CIcons::refresh16(), "Reset position", this, &CDockWidget::resetPosition);
|
||||
|
||||
this->m_input->setMargins(this->contentsMargins());
|
||||
contextMenu->addAction(BlackMisc::CIcons::tableSheet16(), "Margins", this, &CDockWidget::ps_dummy);
|
||||
contextMenu->addAction(this->m_marginMenuAction);
|
||||
m_input->setMargins(this->contentsMargins());
|
||||
contextMenu->addAction(BlackMisc::CIcons::tableSheet16(), "Margins", this, &CDockWidget::dummy);
|
||||
contextMenu->addAction(m_marginMenuAction);
|
||||
}
|
||||
|
||||
void CDockWidget::initialFloating()
|
||||
@@ -368,18 +380,18 @@ namespace BlackGui
|
||||
this->initStatusBarAndProperties();
|
||||
|
||||
// for the first time resize
|
||||
if (!this->m_preferredSizeWhenFloating.isNull())
|
||||
if (!m_preferredSizeWhenFloating.isNull())
|
||||
{
|
||||
this->m_initialDockedMinimumSize = this->minimumSize();
|
||||
this->resize(this->m_preferredSizeWhenFloating);
|
||||
m_initialDockedMinimumSize = this->minimumSize();
|
||||
this->resize(m_preferredSizeWhenFloating);
|
||||
}
|
||||
|
||||
// and move
|
||||
QPoint mainWindowPos = BlackGui::CGuiUtility::mainWindowPosition();
|
||||
if (!mainWindowPos.isNull())
|
||||
{
|
||||
int x = mainWindowPos.x() + this->m_offsetWhenFloating.x();
|
||||
int y = mainWindowPos.y() + this->m_offsetWhenFloating.y();
|
||||
int x = mainWindowPos.x() + m_offsetWhenFloating.x();
|
||||
int y = mainWindowPos.y() + m_offsetWhenFloating.y();
|
||||
this->move(x, y);
|
||||
}
|
||||
}
|
||||
@@ -391,7 +403,7 @@ namespace BlackGui
|
||||
return t;
|
||||
}
|
||||
|
||||
void CDockWidget::ps_onTopLevelChanged(bool topLevel)
|
||||
void CDockWidget::onTopLevelChanged(bool topLevel)
|
||||
{
|
||||
# ifdef Q_OS_LINUX
|
||||
// Give XCB platforms enough time to handle window events before adjusting it.
|
||||
@@ -401,12 +413,12 @@ namespace BlackGui
|
||||
this->setMargins();
|
||||
if (topLevel)
|
||||
{
|
||||
if (this->m_windowTitleBackup != QDockWidget::windowTitle())
|
||||
if (m_windowTitleBackup != QDockWidget::windowTitle())
|
||||
{
|
||||
QDockWidget::setWindowTitle(this->m_windowTitleBackup);
|
||||
QDockWidget::setWindowTitle(m_windowTitleBackup);
|
||||
}
|
||||
this->setNullTitleBarWidget();
|
||||
if (!this->m_wasAlreadyFloating)
|
||||
if (!m_wasAlreadyFloating)
|
||||
{
|
||||
this->initialFloating();
|
||||
}
|
||||
@@ -414,22 +426,22 @@ namespace BlackGui
|
||||
{
|
||||
if (m_wasFrameless) { setFrameless(true); }
|
||||
}
|
||||
this->m_statusBar.show();
|
||||
this->m_wasAlreadyFloating = true;
|
||||
m_statusBar.show();
|
||||
m_wasAlreadyFloating = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// frameless
|
||||
this->setFrameless(false);
|
||||
|
||||
if (!this->m_windowTitleWhenDocked) { QDockWidget::setWindowTitle(""); }
|
||||
this->m_statusBar.hide();
|
||||
if (!m_windowTitleWhenDocked) { QDockWidget::setWindowTitle(""); }
|
||||
m_statusBar.hide();
|
||||
this->setEmptyTitleBar();
|
||||
|
||||
// sometimes floating sets a new minimum size, here we reset it
|
||||
if (this->minimumHeight() > this->m_initialDockedMinimumSize.height())
|
||||
if (this->minimumHeight() > m_initialDockedMinimumSize.height())
|
||||
{
|
||||
this->setMinimumSize(this->m_initialDockedMinimumSize);
|
||||
this->setMinimumSize(m_initialDockedMinimumSize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -439,14 +451,14 @@ namespace BlackGui
|
||||
|
||||
void CDockWidget::initTitleBarWidgets()
|
||||
{
|
||||
this->m_titleBarWidgetOriginal = this->titleBarWidget();
|
||||
this->m_titleBarWidgetEmpty = new QWidget(this);
|
||||
this->setTitleBarWidget(this->m_titleBarWidgetEmpty);
|
||||
m_titleBarWidgetOriginal = this->titleBarWidget();
|
||||
m_titleBarWidgetEmpty = new QWidget(this);
|
||||
this->setTitleBarWidget(m_titleBarWidgetEmpty);
|
||||
}
|
||||
|
||||
void CDockWidget::initStatusBarAndProperties()
|
||||
{
|
||||
if (this->m_statusBar.getStatusBar()) { return; }
|
||||
if (m_statusBar.getStatusBar()) { return; }
|
||||
|
||||
// Typical reasons for asserts here
|
||||
// 1) Check the structure, we expect the following hierarchy:
|
||||
@@ -462,23 +474,23 @@ namespace BlackGui
|
||||
Q_ASSERT_X(outerWidget->layout(), "CDockWidget::initStatusBar", "No outer widget layout");
|
||||
if (!outerWidget->layout()) { return; }
|
||||
Q_ASSERT_X(outerWidget->layout()->itemAt(0) && outerWidget->layout()->itemAt(0)->widget(), "CDockWidget::initStatusBar", "No outer widget layout item");
|
||||
if (!outerWidget->layout()->itemAt(0) || !outerWidget->layout()->itemAt(0)->widget()) { this->m_allowStatusBar = false; return; }
|
||||
if (!outerWidget->layout()->itemAt(0) || !outerWidget->layout()->itemAt(0)->widget()) { m_allowStatusBar = false; return; }
|
||||
|
||||
// Inner widget is supposed to be a QFrame / promoted QFrame
|
||||
QFrame *innerWidget = qobject_cast<QFrame *>(outerWidget->layout()->itemAt(0)->widget()); // the inner widget containing the layout
|
||||
Q_ASSERT_X(innerWidget, "CDockWidget::initStatusBar", "No inner widget");
|
||||
if (!innerWidget) { this->m_allowStatusBar = false; return; }
|
||||
if (!innerWidget) { m_allowStatusBar = false; return; }
|
||||
innerWidget->setProperty("dockwidget", propertyInnerWidget());
|
||||
|
||||
// status bar
|
||||
if (!this->m_allowStatusBar) { return; }
|
||||
this->m_statusBar.initStatusBar();
|
||||
if (!m_allowStatusBar) { return; }
|
||||
m_statusBar.initStatusBar();
|
||||
|
||||
// layout
|
||||
QVBoxLayout *vLayout = qobject_cast<QVBoxLayout *>(innerWidget->layout());
|
||||
Q_ASSERT_X(vLayout, "CDockWidget::initStatusBar", "No outer widget layout");
|
||||
if (!vLayout) { this->m_allowStatusBar = false; return; }
|
||||
vLayout->addWidget(this->m_statusBar.getStatusBar(), 0, Qt::AlignBottom); // 0->vertical stretch minimum
|
||||
if (!vLayout) { m_allowStatusBar = false; return; }
|
||||
vLayout->addWidget(m_statusBar.getStatusBar(), 0, Qt::AlignBottom); // 0->vertical stretch minimum
|
||||
|
||||
// adjust stretching of the original widget. It was the only widget so far
|
||||
// and should occupy maximum space
|
||||
@@ -490,7 +502,7 @@ namespace BlackGui
|
||||
compWidget->setSizePolicy(sizePolicy);
|
||||
}
|
||||
|
||||
void CDockWidget::ps_showContextMenu(const QPoint &pos)
|
||||
void CDockWidget::showContextMenu(const QPoint &pos)
|
||||
{
|
||||
QPoint globalPos = this->mapToGlobal(pos);
|
||||
QScopedPointer<QMenu> contextMenu(new QMenu(this));
|
||||
@@ -499,12 +511,12 @@ namespace BlackGui
|
||||
Q_UNUSED(selectedItem);
|
||||
}
|
||||
|
||||
void CDockWidget::ps_onVisibilityChanged(bool visible)
|
||||
void CDockWidget::onVisibilityChanged(bool visible)
|
||||
{
|
||||
this->m_dockWidgetVisible = visible;
|
||||
m_dockWidgetVisible = visible;
|
||||
}
|
||||
|
||||
void CDockWidget::ps_menuChangeMargins(const QMargins &margins)
|
||||
void CDockWidget::menuChangeMargins(const QMargins &margins)
|
||||
{
|
||||
const bool frameless = this->isFrameless();
|
||||
const bool floating = this->isFloating();
|
||||
@@ -527,17 +539,17 @@ namespace BlackGui
|
||||
this->repaint();
|
||||
}
|
||||
|
||||
void CDockWidget::ps_settingsChanged()
|
||||
void CDockWidget::settingsChanged()
|
||||
{
|
||||
// void, normally not used
|
||||
}
|
||||
|
||||
void CDockWidget::ps_dummy()
|
||||
void CDockWidget::dummy()
|
||||
{
|
||||
// void
|
||||
}
|
||||
|
||||
void CDockWidget::ps_onStyleSheetsChanged()
|
||||
void CDockWidget::onStyleSheetsChanged()
|
||||
{
|
||||
// style sheet changes go here
|
||||
}
|
||||
@@ -552,14 +564,14 @@ namespace BlackGui
|
||||
CDockWidgetSettings CDockWidget::getSettings() const
|
||||
{
|
||||
Q_ASSERT_X(!this->objectName().isEmpty(), Q_FUNC_INFO, "Need object name for settings %OwnerName%");
|
||||
const CDockWidgetSettings s = this->m_settings.get();
|
||||
const CDockWidgetSettings s = m_settings.get();
|
||||
return s;
|
||||
}
|
||||
|
||||
void CDockWidget::saveSettings(const CDockWidgetSettings &settings)
|
||||
{
|
||||
Q_ASSERT_X(!this->objectName().isEmpty(), Q_FUNC_INFO, "Need object name for settings %OwnerName%");
|
||||
const CStatusMessage m = this->m_settings.setAndSave(settings);
|
||||
const CStatusMessage m = m_settings.setAndSave(settings);
|
||||
if (m.isFailure())
|
||||
{
|
||||
CLogMessage::preformatted(m);
|
||||
|
||||
@@ -63,23 +63,23 @@ namespace BlackGui
|
||||
void setNullTitleBarWidget();
|
||||
|
||||
//! Window title backup
|
||||
const QString &windowTitleBackup() const { return this->m_windowTitleBackup; }
|
||||
const QString &windowTitleBackup() const { return m_windowTitleBackup; }
|
||||
|
||||
//! If current window title is empty, use backup
|
||||
QString windowTitleOrBackup() const;
|
||||
|
||||
//! Window title when window is docked
|
||||
bool showTitleWhenDocked() const { return this->m_windowTitleWhenDocked; }
|
||||
bool showTitleWhenDocked() const { return m_windowTitleWhenDocked; }
|
||||
|
||||
//! Selected when tabbed
|
||||
bool isSelected() const { return this->m_selected; }
|
||||
bool isSelected() const { return m_selected; }
|
||||
|
||||
//! Is widget visible? Not to be confused with \sa QWidget::isVisbible
|
||||
//! \remarks Logical vsibility as in \sa QDockWidget::visibilityChanged
|
||||
bool isWidgetVisible() const;
|
||||
|
||||
//! Allow a status bar to be displayed
|
||||
void allowStatusBar(bool allow) { this->m_allowStatusBar = allow; }
|
||||
void allowStatusBar(bool allow) { m_allowStatusBar = allow; }
|
||||
|
||||
//! Show the window title when docked
|
||||
void showTitleWhenDocked(bool show);
|
||||
@@ -88,13 +88,13 @@ namespace BlackGui
|
||||
void resetWasAlreadyFloating();
|
||||
|
||||
//! Was widget already floating?
|
||||
bool wasAlreadyFloating() const { return this->m_wasAlreadyFloating; }
|
||||
bool wasAlreadyFloating() const { return m_wasAlreadyFloating; }
|
||||
|
||||
//! Size when floating first time
|
||||
void setPreferredSizeWhenFloating(const QSize &size);
|
||||
|
||||
//! Position offset when floating first time
|
||||
void setOffsetWhenFloating(const QPoint &point) { this->m_offsetWhenFloating = point; }
|
||||
void setOffsetWhenFloating(const QPoint &point) { m_offsetWhenFloating = point; }
|
||||
|
||||
//! \copydoc CEnableForFramelessWindow::setFrameless
|
||||
virtual void setFrameless(bool frameless) override;
|
||||
@@ -183,10 +183,13 @@ namespace BlackGui
|
||||
//! \copydoc QWidget::paintEvent
|
||||
virtual void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
//! \copydoc QMainWindow::mouseMoveEvent
|
||||
//! \copydoc QWidget::mouseMoveEvent
|
||||
virtual void mouseMoveEvent(QMouseEvent *event) override;
|
||||
|
||||
//! \copydoc QMainWindow::mousePressEvent
|
||||
//! \copydoc QWidget::mouseMoveEvent
|
||||
virtual void keyPressEvent(QKeyEvent *event) override;
|
||||
|
||||
//! \copydoc QWidget::mousePressEvent
|
||||
virtual void mousePressEvent(QMouseEvent *event) override;
|
||||
|
||||
//! Contribute to menu
|
||||
@@ -197,28 +200,8 @@ namespace BlackGui
|
||||
//! The GUI is already initialized, so all widget data are available.
|
||||
virtual void initialFloating();
|
||||
|
||||
protected slots:
|
||||
//! Style sheet has changed
|
||||
virtual void ps_onStyleSheetsChanged();
|
||||
|
||||
private slots:
|
||||
//! Top level has been chaged
|
||||
void ps_onTopLevelChanged(bool topLevel);
|
||||
|
||||
//! Context menu
|
||||
void ps_showContextMenu(const QPoint &pos);
|
||||
|
||||
//! Visibility has changed
|
||||
void ps_onVisibilityChanged(bool visible);
|
||||
|
||||
//! Change margins
|
||||
void ps_menuChangeMargins(const QMargins &margins);
|
||||
|
||||
//! Changed settings
|
||||
void ps_settingsChanged();
|
||||
|
||||
//! Dummy slot for QAction
|
||||
void ps_dummy();
|
||||
virtual void onStyleSheetsChanged();
|
||||
|
||||
private:
|
||||
QWidget *m_titleBarWidgetEmpty = nullptr; //!< replacing default title bar
|
||||
@@ -237,7 +220,25 @@ namespace BlackGui
|
||||
bool m_selected = false; //!< selected when tabbed
|
||||
bool m_dockWidgetVisible = false; //!< logical visible, not to be confused with QDockWidget::isVisible()
|
||||
bool m_wasFrameless = false; //!< frameless when last floating
|
||||
BlackMisc::CSetting<BlackGui::Settings::TDockWidget> m_settings { this, &CDockWidget::ps_settingsChanged };
|
||||
BlackMisc::CSetting<BlackGui::Settings::TDockWidget> m_settings { this, &CDockWidget::settingsChanged };
|
||||
|
||||
//! Top level has been chaged
|
||||
void onTopLevelChanged(bool topLevel);
|
||||
|
||||
//! Context menu
|
||||
void showContextMenu(const QPoint &pos);
|
||||
|
||||
//! Visibility has changed
|
||||
void onVisibilityChanged(bool visible);
|
||||
|
||||
//! Change margins
|
||||
void menuChangeMargins(const QMargins &margins);
|
||||
|
||||
//! Changed settings
|
||||
void settingsChanged();
|
||||
|
||||
//! Dummy slot for QAction
|
||||
void dummy();
|
||||
|
||||
//! Empty widget with no size
|
||||
void initTitleBarWidgets();
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace BlackGui
|
||||
{
|
||||
this->setWindowTitle("Info status bar");
|
||||
this->setWindowIcon(CIcons::swift24());
|
||||
this->ps_onStyleSheetsChanged(); // margins from infobar
|
||||
this->onStyleSheetsChanged(); // margins from infobar
|
||||
}
|
||||
|
||||
void CDockWidgetInfoBar::addToContextMenu(QMenu *contextMenu) const
|
||||
@@ -33,7 +33,7 @@ namespace BlackGui
|
||||
CDockWidget::addToContextMenu(contextMenu);
|
||||
}
|
||||
|
||||
void CDockWidgetInfoBar::ps_onStyleSheetsChanged()
|
||||
void CDockWidgetInfoBar::onStyleSheetsChanged()
|
||||
{
|
||||
const QString st = sGui->getStyleSheetUtility().style(CStyleSheetUtility::fileNameInfoBar());
|
||||
this->setStyleSheet(st);
|
||||
|
||||
@@ -22,7 +22,6 @@ class QWidget;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
|
||||
//! Class for dock widgets in the info area, containing some specialized functionality
|
||||
//! \sa CDockWidgetInfoArea
|
||||
//! \sa CInfoArea
|
||||
@@ -38,12 +37,10 @@ namespace BlackGui
|
||||
//! Contribute to menu
|
||||
virtual void addToContextMenu(QMenu *contextMenu) const override;
|
||||
|
||||
protected slots:
|
||||
//! \copydoc CDockWidget::ps_onStyleSheetsChanged
|
||||
virtual void ps_onStyleSheetsChanged() override;
|
||||
|
||||
protected:
|
||||
//! \copydoc CDockWidget::onStyleSheetsChanged
|
||||
virtual void onStyleSheetsChanged() override;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user