Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Display Widgets on Top option #3038

Merged
merged 6 commits into from
Jun 1, 2018

Conversation

astaric
Copy link
Member

@astaric astaric commented May 21, 2018

Issue

When Canvas gets focus, all widgets get hidden behind it

Description of changes

View -> Float Widgets on Top flag to show widgets on top of all other windows.

@astaric
Copy link
Member Author

astaric commented May 21, 2018

@ales-erjavec, can you take a look?

@codecov-io
Copy link

codecov-io commented May 21, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@a8ea66b). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #3038   +/-   ##
=========================================
  Coverage          ?   82.37%           
=========================================
  Files             ?      335           
  Lines             ?    57811           
  Branches          ?        0           
=========================================
  Hits              ?    47621           
  Misses            ?    10190           
  Partials          ?        0

@ales-erjavec
Copy link
Contributor

On macOS all windows with the Qt.WindowStaysOnTop hint stack above other windows including windows belonging to other applications.
Perhaps we can use QGuiApplication.applicationStateChanged to unset/set the flag around the state changes.

`Float Widgets on Top` menu option has changed.

Update the flag on existing widgets.
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

Change this to a setter (def set_show_widgets_on_top(self, state):) record the state in an instance attribute, and use that instead of querying QSettings in __set_float_on_top, so the state is local to the workflow and not shared between them.

Serialize to QSettings on close, like other canvas settings
@astaric
Copy link
Member Author

astaric commented May 24, 2018

@ales-erjavec , state is now stored as an instance attribute in WidgetManager.

@astaric astaric changed the title canvas: Float Widgets on Top option [ENH] Display Widgets on Top option May 25, 2018
@lanzagar
Copy link
Contributor

lanzagar commented Jun 1, 2018

Does not really achieve the goal completely on my system (using dwm :)), but I could get the desired functionality even before this PR (and can still).
It does bring all widgets to the top when selected so it might be useful for that (if we add a shortcut).

@lanzagar lanzagar merged commit 9c4bd23 into biolab:master Jun 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants