qView icon indicating copy to clipboard operation
qView copied to clipboard

Support to show window-bar Always / OnHover / OnMouseDown / Never for maximum presentation freedom

Open porg opened this issue 4 years ago • 9 comments

Praise: "No toolbars or distractions — pure space efficiency" — That's qView's slogan on it's website and it already comes very very close to this promise! Great app! Compliments!

Related Issues: The enhancement was already filed by someone in #408 as a skeleton issue but this my issue provides full UX design details.

Proposal: qView gets a mode in which it can hide the window bar:

  1. The mode can be toggled in:
    • Main menu > View
    • Context menu > View
    • Via Shortcut
  2. The mode is persisted throughout sessions.
  3. There are 4 modes:
    • Show window-bar: Always | On Hover | On Click | Never
    • Design rationale for the exotic "On-Click" and "Never" modes:
      • If you are in "Never" mode one can very easily do a collage of multiple image files on screen. This is great for visual designers, UI designers, marketers/presenters for ad-hoc combination of visual elements, as praised in #416.
      • It is not entirely new, some apps already use it:
      • Apple introduced the "On-Hover" mode in QuickTime Player X in 2009 and it even has a "Never" mode for pro users which can be enabled via Terminal which can be toggled with in Terminal with defaults write com.apple.QuickTimePlayerX MGCinematicWindowDebugForceNoTitlebar 0
      • Single window picture viewing app Pixea has the "On-Hover" mode.
  4. Integration qView window-bar-visibility in main-menu qView window-bar-visibility in context-menu
  • Main menu > View
    • Above the "Show Tab Bar" section we insert another section for "Show/hide window bar" so that the menu order resembles the order as in the window layout.
      • Show window bar W
      • … only while mouse down M
      • … never N
        • Note: Previous Frame / Next Frame (currently "N") will get shortcuts "," and "." as common in most Desktop and WebApp video player (YouTube included!)
    • Design rationale
      • Beginners will leave "Show Window Bar" ticked as in "Always"
      • Advanced users will toggle "Show Window Bar" with shortcut "W" between "Always" and "On Hover"
      • Expert users with exotic use cases can trigger dedicated modes M and N
    • User feedback when changing window bar visibility mode
      • "Always" simply shows the bar in all windows
      • "Never" simply hides the bar in all windows
      • "On Hover" quickly fades in the bar should you just happen to hover over any window, or if your pointer is over no qView window it shortly shows and hides the bar (fade in-out effect) on the last focused window.
      • "On Click" does the same regarding to mouse-down/click
      • To differentiate the "On Click" and "On Hover" feedback on the window-bar, the title shortly reads "Hovering reveals window bar" or "Mouse down reveals window bar". Most significant text portion first to tackle cutoff due to small window width or user only having short glimpse due to fade-in-out-animation.
  • Context menu: Proposing a new root level entry below "Tools"
  • Shortcuts: As laid out above. Shall be customizable as most other shortcuts too.

porg avatar May 05 '21 21:05 porg

This is where the challenge of qView comes into play: it is a cross-platform application.

For what @boehs said in the previous issue:

anyway, seems fairly easy to do using window.setWindowFlags(Qt::Window | Qt::FramelessWindowHint);

It is possible to do it that way but it ends up looking bad. On macOS: Screen Shot 2021-05-05 at 6 47 19 PM

Basically, the window manager loses track of the program, so edges are not curved, and other stuff happens. This affects other platforms arguably worse.

But, I know exactly how to do this in mac-specific code and it isn't even that hard, although the autohide requires a little bit of work. This could be a mac-specific feature in the future.

For no titlebar:

        view.window.titleVisibility = NSWindowTitleHidden;
        view.window.titlebarAppearsTransparent = true;
        [[view.window standardWindowButton:NSWindowCloseButton] setHidden:true];
        [[view.window standardWindowButton:NSWindowZoomButton] setHidden:true];
        [[view.window standardWindowButton:NSWindowMiniaturizeButton] setHidden:true];

jurplel avatar May 05 '21 23:05 jurplel

But, I know exactly how to do this in mac-specific code and it isn't even that hard, although the autohide requires a little bit of work. This could be a mac-specific feature in the future.

Yeah, reading the concepts I was mostly thinking that autohide seems hard to implement cross-platform. cool API but perhaps out of scope here

Edited to remove unneeded quote Edited to quote relevant bit

boehs avatar May 05 '21 23:05 boehs

But, I know exactly how to do this in mac-specific code and it isn't even that hard, although the autohide requires a little bit of work. This could be a mac-specific feature in the future.

That would still be a valuable feature because (in addition to all the porg's rationales), as far as I understand, there is no other way on a macOS to hide the titlebar. At least on Windows I can use an AutoHotkey script command to hide the titlebar completely (granted, it'd still be slightly worse than a native implementation as there is a tiny delay during startup where a title bar is shown before a script command is applied), but there is no such hack/customization for a macOS app :(

eugenesvk avatar Sep 14 '21 12:09 eugenesvk

Since proposing this feature I already encountered some situations where I‘d loved to use it and predict that this need comes again and again. Would love that this feature see‘s the light of this world.

porg avatar Sep 14 '21 13:09 porg

@jurplel Of all my requests this would be my top one 😉 Could you share what's the status of this?

Would love to have the possibility to activate this experimental feature on my own risk in preferences to test it out. Til full implementation better something with some instability here and than nothing at all.

porg avatar Oct 18 '21 14:10 porg

Hi, so, I wish I could take the time to implement this but it still has a lot of design challenges and I very busy at college (lots of extra responsibilities). I plan to try to make a release in December if possible but this feature requires a lot of hacking around. I might be able to make this mac-specific in that time. I will take a look soon.

jurplel avatar Oct 19 '21 18:10 jurplel

Thanks for providing an outlook!

porg avatar Oct 19 '21 20:10 porg

I would personally love this option on Windows too, this would be fantastic when combined with #338

rlaphoenix avatar Nov 18 '21 08:11 rlaphoenix

I would personally love this option on Windows too, this would be fantastic when combined with #338

most likely it would need to be combined with some form of that suggestion, i agree. However, i think it will never make it to windows. I can only think of a macOS specific implementation

jurplel avatar May 01 '23 19:05 jurplel