SWT Issue with Display settings of Windows - eclipse

I have a fixed shell sized (800x600) application developed in SWT. The issue is, if I change the display settings of Windows ( from smaller - to medium/larger ) few parts of the application are being truncated.
So is there any way I can give dynamic size based on the selection of display settings ?

A fixed shell size is very seldom the right way to go. Instead, use the layout to set the constraints and let SWT figure out the size. That will make it more likely that dpi changes will work correctly and more likely that the app will look correct on other operating systems or different versions of Windows.

Related

Can I increase UI scaling in eclipse on Mac?

I've spent some time already searching for an answer. I know that I can increase the text size in an open file, but is there any way to increase the overall UI scaling? I have a large monitor so I can utilize multiple applications in my workflow, but the size of the application text and icons is so small that it's totally unusable.
Here is a comparison between Eclipse on the left and IntelliJ on the right on my screen:
I scaled IntelliJ on the right to be the perfect size, easily, but Eclipse on the left is way too small to effectively work with it.
I've tried removing a line indicating small text in the eclipse.ini file but that didn't change anything.
Given how poorly my search has turned up already, I assume the answer is 'no'. This leads me to ask, how is this possible? How can such a sophisticated and popular application not be able to change the UI scaling? I feel as though there must actually be a reasonable explanation because this is just plain absurd. This can't be passed off as a legitimate piece of software in this day and age without flexibility on screen size.
Thank you.
EDIT: *
I'm still unable to update the size of the UI icons. I've searched through numerous other issues going through the "-Dswt.autoScale=200" options in the elipse.ini setting but this is not working on Mac. Anyone able to assist here? Thank you!
The "Tree and Table font for views" setting in the "General > Appearance > Colors and Fonts" page of the Preferences sets the size of Project Explorer view. That entry is in the "View and Editor Folders" section.
Icons are only scaled if the display is set up as scaled by x2 or x1.5.

Can I programatically specify size of Eclipse RCP Editor Part?

I have some users that wish to set the size of an EditorPart in an Eclipse RCP app to a specific dimension (in pixels).
This is so that a screenshot of the editor contents exactly matches the PowerPoint slide they want to paste it into, which will guarantee zero pixelation.
I know it's possible to manually change the size of an Eclipse EditorPart, but can't find a programmatic way.
Can anyone give me any pointers?
While it won't solve my specific scenario, I have found an alternate strategy.
If an EditorPart is dragged out of the main Eclipse Window, so it's floating, then it is possible to set the size of the Shell that contains this floating pane.
The size of the shell just needs to be adjusted to allow for the decorations/trimming around the editor within it.
More details here: Setting size of inner region of Java SWT shell window

very small fonts and icons on 4k screens

I'm using CFeclipse on Windows 10 OS.
With the adaptation of new 4k resolution laptops. Eclipse displays small icons and fonts. Its also reported as a bug in https://bugs.eclipse.org/bugs/show_bug.cgi?id=451693.
The mentioned bug has been fixed, Eclipse automatically scales images on high-DPI monitors on Windows since Eclipse Neon (4.6). So, make sure your Eclipse IDE is up to date.
If upgrading does not fix your issue, in eclipse.ini add the following line below the line -vmargs (see Tweaking SWT's auto-scaling):
-Dswt.autoScale=200
(In contrast to the compatibility mode of Windows, this is the way to get the double-resolution icons.)
To solve the problem in Windows 10.
Right click Eclipse Icon
Select Properties
Compatibility Tab
Under Settings Section check
Override High DPI scaling behaviour. Scaling performed by.
Select System.
Then Apply or Ok
I haven't encountered it yet in other application but this solution might also work for other apps that displays small icons and fonts.
This solution also works in Ultraedit,FastStone capture
The steps also helps for Coldfusion installer that appears too tiny to be readable or other Application installer in a 4k screen that shows everything too small.
I was having problems with a Windows 10 RDP connection using a Surface Pro machine. A recent update made Eclipse virtually unusable.
This solution worked perfectly :
Right click Eclipse Desktop Icon
Select Properties
Compatibility Tab
Change high DPI settings
Override High DPI scaling behaviour. Scaling performed by. Select
System.
Then Apply or OK
I then had to slightly adjust the font size within Eclipse itself. I found I could use a slightly smaller font

How to set a fixed width of editor window in Eclipse?

Recently I have got a new 22" monitor. Finally it's possible to keep all needed windows in Eclipse open while having the main editor window wide enough to display all 120 columns. Problem now is when I wide up or narrow down windows on the left or right side of the editor. Editor's width narrows down or wides up. I'd like to set its width fixed to some value and let the other windows 'breathe' in width.
Take a look at the illustration.
You should rather use detached views, that way your main editor is not affected by the other windows resize operations.
(source: eclipse.org)
Either that, or use fast views, which minimises the views down to an icon that can be conveniently popped up when you need to use them. This is especially handy for things like the JUnit test view, as suggested by the JUnit Eclipse documentation
http://help.eclipse.org/help32/topic/org.eclipse.jdt.doc.user/gettingStarted/qs-junit.htm

Is there a way to make a toplevel GTK window smaller than the default minimum size?

I need to draw a few small undecorated windows on top of another app's window. Each of these windows contains just a short label. It works fine but the windows are too big for my purpose. It seems as if Windows doesn't allow smaller than 104 x 27 toplevel windows, I might be wrong. I haven't tested on another backends. I'd like to shrink them to just the size needed to display the label. Is there a way to accomplish this?
Trying out things, I figured that setting the type hint with gtk_window_set_type_hint to GDK_WINDOW_TYPE_HINT_UTILITY allows the window to shrink horizontally but not vertically. I'm not sure what other implications this has. But it didn't solve the problem anyway.
I'm looking for a portable solution but platform-dependand answers are welcome too. Any help appreciated.
Edit: As usual, the solution is trivial. I had completely forgotten the GTK_WINDOW_POPUP window type.
Edit: Making the window GTK_WINDOW_POPUP has some unfortunate side effects which make it unusable for my purpose. I eventually got GTK_WINDOW_TOPLEVEL to work as expected. The key was to do gtk_window_set_resizable(window, FALSE) after the the window has been exposed.
Use gtk_window_set_resizable, this affects user resizes, which apparently includes resizes requested by the window manager. Setting it to FALSE therefore makes the programmatic value stick.