forked from qt-creator/qt-creator
Re-introduce option to toggle FancyMainWindow auto-hiding
This reverts commit 1541fbd2ba
in parts. The title bars can now always be shown (the same
state as the old "Unlocked" state) or not always be shown
(the previously "new" behavior).
The default is now "Always shown". Hopefully that makes hiding
the titlebars a conscious (usually one-time) activity
that's not forgotten.
Change-Id: Id31fb193b2eb6376000c845d4a61194e2ed33129
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -40,7 +40,7 @@ QT_END_NAMESPACE
|
||||
|
||||
namespace Utils {
|
||||
|
||||
class FancyMainWindowPrivate;
|
||||
struct FancyMainWindowPrivate;
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT FancyMainWindow : public QMainWindow
|
||||
{
|
||||
@@ -63,27 +63,33 @@ public:
|
||||
void restoreSettings(const QHash<QString, QVariant> &settings);
|
||||
|
||||
// Additional context menu actions
|
||||
QAction *menuSeparator() const;
|
||||
QAction *menuSeparator1() const;
|
||||
QAction *autoHideTitleBarsAction() const;
|
||||
QAction *menuSeparator2() const;
|
||||
QAction *resetLayoutAction() const;
|
||||
|
||||
// Overwritten to add locked/reset.
|
||||
void addDockActionsToMenu(QMenu *menu);
|
||||
|
||||
QDockWidget *toolBarDockWidget() const;
|
||||
void setToolBarDockWidget(QDockWidget *dock);
|
||||
|
||||
void setDockActionsVisible(bool v);
|
||||
bool titleBarsAlwaysVisible() const;
|
||||
|
||||
signals:
|
||||
// Emitted by resetLayoutAction(). Connect to a slot
|
||||
// restoring the default layout.
|
||||
void resetLayout();
|
||||
|
||||
public slots:
|
||||
void setDockActionsVisible(bool v);
|
||||
|
||||
protected:
|
||||
void hideEvent(QHideEvent *event);
|
||||
void showEvent(QShowEvent *event);
|
||||
void contextMenuEvent(QContextMenuEvent *event);
|
||||
|
||||
private slots:
|
||||
void onDockActionTriggered();
|
||||
|
||||
private:
|
||||
void handleVisibilityChanged(bool visible);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user