Skip to content

Text sometimes partially disappears in Section when using autoscaling #2980

Closed
eclipse-platform/eclipse.platform.swt
#2551

Description

@selundqma

We set the text "Service Properties" in a Section and it is showed nicely when creating an RCP application using Eclipse 2024-12 in all scaling variants. But, in newer versions (2025-03, 2025-06 M1, 2025-06 M2) some of text disappears when using different scaling in Windows. Like, on my laptop it works fine in 125% scaling. Moving over to 150% and some of the text is missing in the Section. By removing the autoscaling from the ini file, the text appears also in the 150% case. So... there might be an issue with how sizes are calculated when using autoscaling.

OS: Windows 11
Java: JDK 21.0.6.7.1
Issue seen from: Eclipse 2025-03

Scaling parameters used in the ini file

-Dswt.autoScale=quarter
-Dswt.autoScale.method=smooth

The section is created with the FormToolkit like this:

final Section vPropSection = pFormToolkit.createSection(
            pFormBody,
            Section.DESCRIPTION
                  | Section.TWISTIE
                  | Section.TITLE_BAR
                  | Section.EXPANDED);
      vPropSection
            .setText(UIMessages.ServiceListUIHelper_ServiceProperties);

See attached images for the different cases (no autoscaling + 125%/150% OS scaling / autoscaling + 125%/150% OS scaling)

Image
Image
Image
Image

We also have issues with disappearing text in the same manner in org.eclipse.swt.widgets.Label where the last word sometimes (according to the scenarios mentioned above) is going missing.

-Dswt.autoScale=exact yields the same result.

Activity

  1. fedejeanne commented on May 14, 2025

    @fedejeanne
    Member

    I can reproduce the error by adding the style-bit Section.TITLE_BAR to the FormView in line 158 and then opening the Eclipse Form view.

    Image

    For me it happens when using a monitor zoom of 175% in my ThinkVision 34'' (true-split is deactivated).

    I assume this is another flavor of eclipse-platform/eclipse.platform.swt#2003 and the layout might be the culprit, but I haven't analyzed this in detail.

    Workaround

    • Either remove the style-bit Section.TITLE_BAR or
    • Add yet another style-bit: ExpandableComposite.FOCUS_TITLE

    @akoch-yatta / @amartya4256 can you please look into it and see if it's indeed related to eclipse-platform/eclipse.platform.swt#2003 ?

  2. akoch-yatta commented on May 14, 2025

    @akoch-yatta
    Contributor

    Looks like a similar issue, yes, but it doesn't look exactly the same. However, still investigating it @fedejeanne

  3. selundqma commented on May 16, 2025

    @selundqma
    ContributorAuthor

    Maybe a stupid question, but will the suggested fix also handle the missing text using org.eclipse.swt.widgets.Label? Or is a separate ticket needed on another GitHub for that case? We use the SWT.WRAP flag for the labels. And.. in the same way as text disappears from Section, it also happens with Label.

  4. fedejeanne commented on May 16, 2025

    @fedejeanne
    Member

    I assume "the fix" is #2986? That PR only touches the class ExpandableComposite so no, it shouldn't fix the issue for Label.

    Could you provide more details and a reproducer for the issue with the label? I can imagine we would need another Issue/PR for that.

  5. selundqma commented on May 20, 2025

    @selundqma
    ContributorAuthor

    New issue created for the SWT Label case. Attached a Reproducer in that ticket.

    eclipse-platform/eclipse.platform.swt#2166

  6. HeikoKlare commented on Nov 18, 2025

    @HeikoKlare
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions