ENVIRONMENT
- Xubuntu Linux 12.04
- XFCE 4.8
- Oracle Java 1.6.0.37
- Aquafold Datastudio 12
- Laptop with 15'' 1920x1080 screen
- System DPI is set to 120
PROBLEM
After I got a new laptop with 15'' screen and 1920x1080 I found that many Java/Swing application have very small fonts in menus and controls. Unfortunately Aquafold Datastudio is one of them. I've attached the screenshot (see aquafold-problem.png) which show small fonts in Datastudio. Also there you can see native GTK application (calculator) and Java/Swing application (Jets3t Cockpit) with GTK+ L&F which both look fine.
Please note there is more advanced SOHO devices on the market than mine.
ASUS ZENBOOK Prime UX31A - 13'' 1980x1020
Apple MacBook Pro Retina - 13'' 2560Х1600
Both can be used with Linux
DESCRIPTION
The problem is that Swing doesn't respect system DPI and by default assumes that DPI is 72. There is GTK+ L&F theme which renders all controls with respect to system DPI via linux system libraries. Unfortunately Datastudio doesn't allow to specify GTK+ L&F nor with setting dialog nor with standard system properties (swing.defaultlaf and swing.systemlaf).
WORKAROUND
After I discovered that Datastudio uses JGoodies as L&F I read documentation on JGoodies and found out that font can be changed with the following Java system parameters.
-DPlastic.controlFont="Ubuntu-plain-18"
-DPlastic.menuFont="Ubuntu-plain-18"
Also there are two additional parameters which eliminates artefacts from font hinting
-Dswing.aatext=true
-Dawt.useSystemAAFontSettings=lcd
The result is shown on the screenshot (see aquafold-workaround.png)
SOLUTION #1
The solution is to allow specify GTK+ L&F as a theme for Datastudio. It would render all menus and controls with respect to system DPI settings via standard system libraries. Custom drawn control (text editors, charts) will still be unaware of system DPI but you already have font settings for these.
Who uses GTK+ L&F: IntellijIDEA, Apache JMeter
SOLUTION #2
Allow to specify font for the menu and controls. It also would allow people with low vision increase application font to the appropriate level.
Who uses main font settings: Oracle SQL Developer, Smart SVN (< 7.5)
|
176 KB
|
159 KB
Aqua Data Studio (ADS) uses JIDE (http://www.jidesoft.com/) for much of it's L&F. The default L&F in ADS is "Aqua Data Studio". The L&F for "Aqua Data Studio" on Linux is mapped to "com.jgoodies.looks.plastic.Plastic3DLookAndFeel". We are setting the L&F in CLookAndFeel.setPlasticLookAndFeel(), and we are hard coding a few things with :
// Set font options UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE); //Options.setGlobalFontSizeHints( FontSizeHints.MIXED ); Options.setDefaultIconSize(new Dimension(16, 16)); Options.setUseNarrowButtons(false); Options.setTabIconsEnabled(true); // Swing Settings PlasticLookAndFeel.setTabStyle(PlasticLookAndFeel.TAB_STYLE_METAL_VALUE); PlasticLookAndFeel.setHighContrastFocusColorsEnabled(false);
I think we did this because we wanted to minimize QA regression on UI layouts across non-windows and non-osx platforms. This was done over 5 years ago. We can probably make a pass to see how this will effect the UI layouts.
Issue #7953 |
Closed |
Completion |
No due date |
No fixed build |
No time estimate |
Aqua Data Studio (ADS) uses JIDE (http://www.jidesoft.com/) for much of it's L&F. The default L&F in ADS is "Aqua Data Studio". The L&F for "Aqua Data Studio" on Linux is mapped to "com.jgoodies.looks.plastic.Plastic3DLookAndFeel". We are setting the L&F in CLookAndFeel.setPlasticLookAndFeel(), and we are hard coding a few things with :
I think we did this because we wanted to minimize QA regression on UI layouts across non-windows and non-osx platforms. This was done over 5 years ago. We can probably make a pass to see how this will effect the UI layouts.