Skip to content

Web Browser widget: add "Resize with Window" property#3853

Open
gian21391 wants to merge 4 commits into
ControlSystemStudio:masterfrom
gian21391:webbrowser-resize-with-window
Open

Web Browser widget: add "Resize with Window" property#3853
gian21391 wants to merge 4 commits into
ControlSystemStudio:masterfrom
gian21391:webbrowser-resize-with-window

Conversation

@gian21391

@gian21391 gian21391 commented Jun 26, 2026

Copy link
Copy Markdown

The Web Browser widget keeps its fixed design-time size at runtime, like every other widget. For displays built around a single browser filling the screen, that's awkward — the embedded page doesn't follow the window when it is resized.

This PR adds an opt-in resize_with_window property (Behavior category, default off). When enabled, the browser grows and shrinks to fill the runtime window/tab. The default is off, so existing displays are unaffected, and the property is left out of the saved file unless it is set (older versions ignore the unknown tag).

It is intended for top-level, browser-dominant displays: the widget should be a direct child of the display root. When the browser is nested in a Group, Tabs, or embedded display the property is a no-op and logs a warning.

Checklist

  • Testing:
    • The feature has automated tests
    • Tests were run
    • Added unit tests for the model property (default value, XML round-trip) and for the fit calculation; ran mvn clean install on JDK 21.
  • Documentation:
    • The feature is documented
    • The documentation is up to date
    • Release notes:
      • Added an entry when adding a new feature

@sonarqubecloud

Copy link
Copy Markdown

@kasemir

kasemir commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Well, the web browser widget has acknowledged limitations. Web pages with javascript may not work as expected and CPU load tends to be higher than in a "real" web browser. If your goal is to have a browser that fills the window, like a normal web browser, why don't you simply use an action button that opens the URL in a normal web browser? That way your users get the expected normal web browser behavior.

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.

2 participants