Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356970

Summary: [ui] [150 % font size] dialog size is miscalculated
Product: [Eclipse Project] Platform Reporter: Helmut J. Haigermoser <helmut.haigermoser>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug
Attachments:
Description Flags
sample project with a dialog demonstrating the issue
none
screen shot of the sample with 8 radio buttons
none
screen shot of the same sample, but font size set to 150%
none
Windows 7 configuration dialog none

Description Helmut J. Haigermoser CLA 2011-09-07 12:46:57 EDT
Build Identifier: 3.7

When setting the font size to 150% on Windows the initial size of my dialog is slightly off, not all radio buttons are displayed, the last one is always cut off.

Note that the number of radio buttons does not care, once a certain number (8 for me) is reached it's always the last one that is not shown correctly

Reproducible: Always

Steps to Reproduce:
1. Put the attached project in your workspace
2. Fire up the Eclipse SDK including that plug-in
3. Use the Sample menu  -> Sample Command and check the dialog
Comment 1 Helmut J. Haigermoser CLA 2011-09-07 12:48:15 EDT
Created attachment 202915 [details]
sample project with a dialog demonstrating the issue
Comment 2 Helmut J. Haigermoser CLA 2011-09-07 12:48:56 EDT
Created attachment 202916 [details]
screen shot of the sample with 8 radio buttons
Comment 3 Helmut J. Haigermoser CLA 2011-09-07 12:49:27 EDT
Created attachment 202917 [details]
screen shot of the same sample, but font size set to 150%
Comment 4 Helmut J. Haigermoser CLA 2011-09-07 12:51:29 EDT
CQ:WIND00254111

Let me know what you think! :)
Helmut
Comment 5 Helmut J. Haigermoser CLA 2011-11-14 06:24:45 EST
(In reply to comment #4)
> CQ:WIND00254111
> Let me know what you think! :)
> Helmut

Can we get a comment from the UI team, can you reproduce the issue?
TIA,
Ciao, hh
Comment 6 Paul Webster CLA 2011-11-14 13:43:59 EST
How do you set your windows font to 150%?  Is it some basic setting in windows, or one of the eclipse prefs from General>Appearance>Colors and Fonts?

PW
Comment 7 Helmut J. Haigermoser CLA 2011-11-15 05:57:08 EST
Created attachment 207017 [details]
Windows 7 configuration dialog

In order to increase the font size I used this Windows 7 dialog...
Comment 8 Remy Suen CLA 2011-11-15 09:17:28 EST
I can reproduce the problem on Windows 7. You don't necessarily need to include the dialog as a plug-in. The code below will reproduce the problem. If you don't use a TitleAreaDialog but instead extend TrayDialog, the problem doesn't occur.

------------------

public class VerySimple extends TitleAreaDialog {
  public VerySimple() {
    super(null);
  }

  @Override
  protected Control createDialogArea(Composite parent) {
    Composite group = new Composite(parent, SWT.NONE);
    group.setLayout(new GridLayout());
    group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    for (String string : new String[] { "1", "2", "3", "4", "5", "6", "7",
        "8" }) {
      Button button = new Button(group, SWT.PUSH);
      button.setText(string);
      button.setLayoutData(new GridData(SWT.FILL));
    }
    return parent;
  }

  public static void main(String[] args) {
    Display display = new Display();
    VerySimple dialog = new VerySimple();
    dialog.open();
    display.dispose();
  }
}
Comment 9 Remy Suen CLA 2011-11-17 14:54:35 EST
Ultimately, could be an issue with TitleAreaDialog or possibly the SWT layout code.
Comment 10 Lars Vogel CLA 2019-11-14 03:40:10 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.