jurplel / qView

Practical and minimal image viewer
https://interversehq.com/qview/
GNU General Public License v3.0
2.03k stars 120 forks source link

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

Open porg opened 3 years ago

porg commented 3 years ago

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:

jurplel commented 3 years ago

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];
boehs commented 3 years ago

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

eugenesvk commented 3 years ago

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 :(

porg commented 3 years ago

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 commented 3 years ago

@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.

jurplel commented 3 years ago

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.

porg commented 3 years ago

Thanks for providing an outlook!

rlaphoenix commented 2 years ago

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

jurplel commented 1 year ago

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