Skip to content

Tool Bar Item Disappears after DPI Change and Enabled State Change #3073

@runaway94

Description

@runaway94

Describe the bug
A toolbar menu item with text and icon (mode="FORCE_TEXT") disappears from the tool bar after a DPI change and the tool bar refreshes (e.g. the handler is disabled/enabled)

To Reproduce
You need a tool bar with a few tool bar items (for me there are three items) that show text and icon (mode="FORCE_TEXT").
When I move the window form a 100% scaled monitor to a higher scaled monitor (e.g. 150% scaling) the tool bar icons are still available but the label text is cut off (from "My Label" to "My La...").
As soon as any tool bar item is disabled, the label texts are written out in full again but the last tool bar item disappears from the tool bar.
This only happens if text and icon are shown and if the scaling changed, if the menu is initiated with a higher scaling everything looks fine.
The item will also not re-appear if it is enabled again.

Expected behavior
The tool bar icon should not disappear.

Screenshots
On 100% scaling
Image
Moved to 150% scaling
Image
After handlers are enabled
Image

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • All OS
    • Windows
    • Linux
    • macOS
  1. Additional OS info (e.g. OS version, Linux Desktop, etc)

  2. JRE/JDK version

Version since
Eclipse or SWT version since when the behavior is seen [e.g. 4.23]

Workaround (or) Additional context
Add any other context about the problem here.
Any known workarounds for the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions