lens
lens copied to clipboard
CSD or native headerbars
What would you like to be added: Client-Side Decoration (CSD) support or native headerbars
Why is this needed:
Now if you open Lens in Linux you have something like this.
But if you support CSD as in Teams (for example) can use headbar to add app elements and don't waste a lot of space.
Environment you are Lens application on:
- Kubernetes distribution: n/a
- Desktop OS: GNOME on Linux, but n/a
This is not currently possible as electron does not support it see https://github.com/electron/electron/issues/11907
How would lens handle positioning of the buttons? Positioning needs to be passed from gtk to electron environment but after that the app is responsible for actually placing the buttons within the UI.
On linux, you can have buttons on both left and right side or even both side at same time, Plus they can have different options, even non-standard ones at times.
Considering we ignore all buttons that are non standard, the app still needs to accommodate for between one to three buttons on both sides of the UI. And this is considering the app uses its own assets for the button UI and ignores the system style. This can actually be desirable as using system UI means even more complexity.
Teams is an electron app and uses CSD very well. I think that Lens can handle it in same way.
@ogarcia Teams has the same issue that i discussed in previous comment. It doesnt follow system in button placement. Even if you set your window decorations to be on left, teams buttons wil appear on right. This isnt an issue on macOS and windows because those settings arent configurable.
On gnome for example you need to read the following gsetting to learn user's preference: org.gnome.desktop.wm.preferences button-layout
There is no standardized way to read this settings. Its best if a library does the heavy lifting of querying these and the app can in turn read from the said library.
IMHO the actual button graphics used isn't important as long as it conveys the action. This is also something the app might wanna brand like the purple used on teams with distinctively microsoft window buttons. But following user's preference on button placement is important as unusual placement might confuse users.
I prefer buttons to be on left. VSCode and teams dont follow that and place button on right side like in screenshot above. This should not be the case.
@rohmishra ok, I understand now. As @Nokel81 says, electron don't support (for now) CSD, because of this apps like Teams don't respect your settings.
IMHO I prefer lose my settings about buttons position that have a useless headbar that just wastes space, and if in future electron adds support for these settings then add it to Lens.
@ogarcia TBH I dont care about the button styles too. Apps should be able to use their own glyphs if they know their design would clash with system glyphs for many but i would love if they respected where the buttons are placed (I am a maniac and have them on the left)
But notice how i said "prefer". Now having a giant bar that doesn't match the app UI is still worse!
In mean time, apps may provide option to select the option to place window actions right or left manually. They already have both options internally if they support windows and macOS.
Can you please make an option for Lens to respect the system-wide Window Manager decorations and widgets on Linux? For example, I'm used to a context menu available with right-clicking on a title bar, but this does not work in Lens. Same about the width of window edges etc.
@victor-sudakov respecting window manager decorations and widgets is tough as depending on what theme you use it may clash with the background and simply disappear visually because of low contrast. Moreover, currently electron supports only macOS window manager decoration placements. Even for windows its using custom assets and not what windows provides.
As for placement, there has been little to no progress for relaying button positions to app on electron which is required in order to place the buttons at correct location respecting your window manager positioning.
respecting window manager decorations and widgets is tough
@rohmishra I may have worded my request incorrectly, sorry about that. By "respecting" I meant please don't mess with the decorations, don't try to override the titlebar, buttons etc with your own style. It should not be tough because most X Window applications from xterm to Wireshark to Thunderbird do just that by default: use the default WM decorations, titlebars and buttons.
@rohmishra For example Telegram Desktop can be configured to "Use system window frame" - that's what I meant by "respecting the WM decorations."
Ah you mean just using system decorations. That is now possible with a flag on electron. App needs to hide the buttons to avoid duplicate buttons though.
Ah you mean just using system decorations.
Exactly.
That is now possible with a flag on electron. App needs to hide the buttons to avoid duplicate buttons though.
Great news! What's the setting in Lens to start using system decorations?
This is already supported by Lens so I think I'll proceed to close the issue
This is already supported by Lens so I think I'll proceed to close the issue
Excuse me @ogarcia how and where is it supported? Where is the knob in Lens to start using system decorations?
The initial request was to remove the windows from the system which was a useless waste of space and replace them with CSD (client side decorations). This has already been done, although right now the implementation is Lens' own and not system dependent (because there is no support for it in Electron).
What you are talking about is to give full support to be able to use the client decorations offered by the system (for example using GTK in Gnome), but that is a completely different issue.
@ogarcia
As of now, Electron does not have the wiring to expose button layout to the app. So we cannot have app automatically follow system's layout without significant work
@rohmishra you mentioned earlier that "using system decorations is now possible with a flag on Electron." Can you please share how I can enable this flag for starting Lens with system decorations?
I've created a feature request