Auto hide feature by SyarifFakhri · Pull Request #452 · githubuser0xFFFF/Qt-Advanced-Docking-System

@SyarifFakhri

  • Added main functionality for auto hiding docks
  • Auto hide toggle button is added in the dock area titlebar
  • Side tab bars are added to the left and right of each window
  • Add config for enabling the auto hide button, left side bar area and the right side bar area
  • Add logic for save state and restore state with the auto hide functionality

Syarif Fakhri added 5 commits

September 7, 2022 10:12
Fix bug where pin and unpin doesn't work

@githubuser0xFFFF

githubuser0xFFFF

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed all build issues that occured when building your pull request on my Windows machine with qmake and pushed everything to a new branch auto_hide_feature

@githubuser0xFFFF

Thank you for this big merge request with a great new feature. I fixed all build issues in your pull request that occured when building everything on Windows with MinGW and qmake.

When I run the demo application on WIndows to test the feature, I can see an issue that I will document in the next days.

@githubuser0xFFFF

The current implementation has a bug, that causes a wrong painting on Windows. To reproduce this, execute the following steps:

Because you implemented the feature, it is easier for you to find the problem.

@SyarifFakhri

Thanks for reviewing it so quickly! I will merge this with the auto hide branch you created and look into the issues you brought up. Please let me know if you find anything else :). I'm still testing this, so I will post more bug fixes as I go along, will let you know once it's fully ready for review!

Syarif Fakhri added 14 commits

September 8, 2022 11:18
edge border when not selected
widgets when toggling overlay

Also centralized and simplified the logic for the title bar button
visibility

@githubuser0xFFFF

@githubuser0xFFFF

…e click shortly after a mouse over collapse event

@githubuser0xFFFF

@githubuser0xFFFF

@githubuser0xFFFF

@SyarifFakhri

@githubuser0xFFFF

@githubuser0xFFFF

@githubuser0xFFFF

@githubuser0xFFFF

@githubuser0xFFFF

@githubuser0xFFFF

…vanced-Docking-System into auto_hide_feature
…emoveDockWidget(DockWidget) call when restoring state
…vanced-Docking-System into auto_hide_feature

@githubuser0xFFFF

@SyarifFakhri Thank you for your contribution. I'm closing the pull request now because development now takes place in the autohide_feature branch.

@FelixBer

@githubuser0xFFFF

@SyarifFakhri

@githubuser0xFFFF

@SyarifFakhri Thank you. Fixed it. Please test.

I have a question. In qmake I can add an RC file on Windows with the RC_FILE statement (see demo.pro RC_FILE += app.rc). Do you know how to add this for a CMake file?

@SyarifFakhri

Cheers! It does build now :)

In qmake I can add an RC file on Windows with the RC_FILE statement (see demo.pro RC_FILE += app.rc). Do you know how to add this for a CMake file?

I believe you just need to add it like so:
image

Let me know if that works for you :)

@SyarifFakhri

@githubuser0xFFFF I did find one more issue while testing this. If you open an auto hide dock tab and open the context menu as shown:
image

Then click anywhere inside the dock but outside the context menu, the dock will collapse.

I believe that's due to this code here:

if (widget && widget->window() != this->window())

The context menu is considered as a different window, so it closes. I think one fix would be to check if the widget is a descendant of the auto hide widget, and don't collapse it if it is perhaps?

@githubuser0xFFFF

@SyarifFakhri Thank you - good catch. I changed the implementation now. Now the auto hide container is not closed, if the user clicks into another floating window. It will only get closed in the following cases:

  • user clicks in the same dock container but outside of the auto hide widget
  • user clicks the auto hide tab
  • user starts dragging a floating widget that is not the container of this auto hide widget
  • user starts dragging a docked widget

Please test, if this is ok for you.

@githubuser0xFFFF

@SyarifFakhri I noticed that there are still some things, that needs to get fixed with hiding the auto hide widget

@githubuser0xFFFF

@SyarifFakhri Ok, I think I finally fixed the eventFilter function ion auto hide widget to work properly. Please test.

@SyarifFakhri

Everything seems good. Thanks for the fixes!

@yuriyoung

how to pin/unpin(auto hide) a group?

@githubuser0xFFFF

@yuriyoung Just read the manual and play around with the demo application and you will find it out in some minutes.