I have a RCP application with a stand alone view on the top. I have to set certain height for that view. To set it, i'm using
Monitor monitor = Display.getCurrent().getMonitors()[0];
Rectangle rect = monitor.getBounds();
if (rect.width >= 1900 && rect.height >= 1000) {
layout.addStandaloneView(MyView.VIEW_ID, false, IPageLayout.TOP,
0.130f, editorArea);
}
else if (rect.width >= 1200 && rect.height >= 900) {
layout.addStandaloneView(MyView.VIEW_ID, false, IPageLayout.TOP,
0.135f, editorArea);
}
This doesn't seems to work when I connect my laptop to an extended monitor or change the default resolution and text size of my extended monitor.
How do I solve this problem?