Skip to content

Add support for window.titleBarStyle advanced setting #2716

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

Open
3 tasks done
per1234 opened this issue Apr 20, 2025 · 0 comments · May be fixed by #1870
Open
3 tasks done

Add support for window.titleBarStyle advanced setting #2716

per1234 opened this issue Apr 20, 2025 · 0 comments · May be fixed by #1870
Labels
type: enhancement Proposed improvement

Comments

@per1234
Copy link
Contributor

per1234 commented Apr 20, 2025

Describe the request

Allow the user to persistently configure the "Window: Title Bar Style" (machine identifier window.titleBarStyle) advanced setting to "custom".

- AND -

Ensure the Arduino IDE UI is fully functional when this setting is set to "custom".

🙂 Users will have control over the style of Arduino IDE's title bar.

Describe the current behavior

In addition to the primary settings that are accessible via the File > Preferences... menu item (or Arduino IDE > Settings... for macOS users), Arduino IDE has some additional settings for advanced users.

One of those advanced settings is "Window: Title Bar Style" (machine identifier window.titleBarStyle), which is intended to allow the user to choose between the use of the operating system's native window title bar style (the "native" setting), and a bespoke title bar style implemented by the Eclipse Theia Platform IDE framework (the "custom" setting).

The setting is locked to "native" by the Arduino IDE codebase:

protected override getTitleBarStyle(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_config: FrontendApplicationConfig
): 'native' | 'custom' {
return 'native';
}

If the user attempts to change the setting to "custom", after the next time the user restarts the application (not including the restart that is triggered by the setting change) Arduino IDE will be in a non-functional state where the title bar is missing entirely. After one more restart, it will revert back to the "native" title bar style.

🙁 Users are not able to persistently configure the title bar style according to their preference.

🐛 During the time when the setting is temporarily set to "custom", the title bar is in a partially non-functional state due to the window control icons (minimize, maximize/restore, close) overlapping the "Sketch", "Tools", and "Help" menus, and the "Help" menu being positioned mostly off the right edge of the window (or if the "Window: Menu Bar Visibility" setting is set to "compact", then the icons instead overlap the Serial Plotter and Serial Monitor icons).

Arduino IDE version

Original report

2.0.0.rc7-nightly-20220615

Last verified with

2.3.6

Operating system

  • Linux
  • Windows

Operating system version

  • Ubuntu 24.04
  • Windows 11

Additional context

window.titleBarStyle is intentionally disabled when Arduino IDE is running on a macOS machine. The reason is explained here.

window.titleBarStyle is connected to another setting value: window.menuBarVisibility. This preference is also disabled in Theia on macOS. Both preferences must be supported, or there is no way to show a custom title bar.


@kittaakos put together a preview from the latest Theia sources. Please look at how it works on resizing concerning overlay, menu, etc.:

custom-titlebar.mp4
  • On macOS, the window control buttons must be moved to the left, and custom button styles are needed to provide a native look and feel.
  • Figure out if IDE2 wants to support menus on the title bar. If not, the styling issues 👆 still be fixed on Windows and Linux.

Originally reported at #1077

Additional reports

Related

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant