diff --git a/Changelog b/Changelog index d780fe73..da2a56e1 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,7 @@ - Added Config::Flag_AlwaysTitleBarWhenFloating, which complements Flag_HideTitleBarWhenTabsVisible - Added Config::Flag_DontUseUtilityWindowsForFloating - Added Config::Flag_TitleBarHasMinimizeButton + - Added Config::Flag_TitleBarNoFloatButton - Bugfixes: - Windows: Fixed windows not having proper minimum size. - Windows: Fixed moving windows across screens with different DPI (#72) diff --git a/src/Config.h b/src/Config.h index 5f103936..05bcf805 100644 --- a/src/Config.h +++ b/src/Config.h @@ -71,9 +71,11 @@ public: Flag_internal_DontUseParentForFloatingWindows = 0x1000, ///> FloatingWindows won't have a parent top-level. Internal, use Flag_DontUseUtilityFloatingWindows instead. Flag_DontUseUtilityFloatingWindows = Flag_internal_DontUseQtToolWindowsForFloatingWindows | Flag_internal_DontUseParentForFloatingWindows, - Flag_TitleBarHasMinimizeButton = 0x2000 | Flag_DontUseUtilityFloatingWindows, ///> The title bar will have a minimize button when floating. This implies Flag_DontUseUtilityFloatingWindows too, otherwise they wouldn't appear in the task bar. - - Flag_internal_AutoHideSupport = 0x4000, ///> Supports minimizing dock widgets to the side-bar. Internal for now. Will be public once the feature is finished. + Flag_TitleBarHasMinimizeButton = 0x2000 | Flag_DontUseUtilityFloatingWindows, ///> The title bar will have a minimize button when floating. This implies Flag_DontUseUtilityFloatingWindows too, otherwise they wouldn't appear in the task bar. + Flag_TitleBarNoFloatButton = 0x4000, ///> The TitleBar won't show the float button + Flag_internal_AutoHideSupport = 0x8000 | Flag_TitleBarNoFloatButton, ///> Supports minimizing dock widgets to the side-bar. + ///>By default it also turns off the float button, but you can remove Flag_TitleBarNoFloatButton to have both. + ///>Internal for now. Will be public once the feature is finished. Flag_Default = Flag_AeroSnapWithClientDecos ///> The defaults }; Q_DECLARE_FLAGS(Flags, Flag) diff --git a/src/private/TitleBar.cpp b/src/private/TitleBar.cpp index a2e7eb72..23e70150 100644 --- a/src/private/TitleBar.cpp +++ b/src/private/TitleBar.cpp @@ -193,6 +193,11 @@ bool TitleBar::supportsFloatingButton() const return false; } + if (Config::self().flags() & Config::Flag_TitleBarNoFloatButton) { + // Was explicitly disabled + return false; + } + // If we have a floating window with nested dock widgets we can't re-attach, because we don't // know where to return !m_floatingWindow || m_floatingWindow->hasSingleFrame();