Toolbar icons are too small with HiDPI display

Bug #1341933 reported by Ryan Press
54
This bug affects 10 people
Affects Status Importance Assigned to Milestone
KiCad
Confirmed
Wishlist
Unassigned

Bug Description

I am running KiCad 4996 on Fedora rawhide. My screen is 13.3" with 3200x1800 resolution, and the toolbar icons are very hard to use. See attached screenshot.

Tags: hidpi
Revision history for this message
Ryan Press (ryan-nryiuoo) wrote :
Revision history for this message
Ryan Press (ryan-nryiuoo) wrote :

I have attached a patch. It determines if the display is HiDPI and if so it doubles the bitmap size. This isn't an ideal solution but it makes the icons much more usable for me.

Jon Neal (reportingsjr)
Changed in kicad:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Given that there have been additional reports about high res displays, now is a good time to revisit this. There may be a better way to scale the images than arbitrarily assuming 2X is correct. I'm not thrilled about the font size assumption in this patch. wxWidgets provides wxSystemSettings which may be more useful but I need some more information since I do not have access to an ultra high resolution small screen device to test. When someone gets a chance, please install the wxPython demo on your system and run the SystemSettings demo in the Recent Additions/Updates tree. Click on the System Metrics tab and look up the values of SYS_SMALLICON_X and SYS_SMALLICON_Y. On my 1920x1080 22" monitor I get 16X16 as the small icon size. Please let me know if these values are scaled appropriately for high res displays. I have some lower res devices that I can test. If anyone has any low res displays ( <= 1024x768), it would be nice to know if the have smaller icon sizes. Of course we could us the display resolution (SYS_SCREEN_X and SYS_SCREEN_Y) to determine the scaling factor as well so please check if they are reported correctly for you device.

Revision history for this message
David Zweben (dzweben) wrote :

I have a Surface Pro 4 with a 13" 2736x1824 resolution screen, so this problem affects me, as all of the buttons in KiCad are absolutely microscopic.

@stambaughw:

I did what you requested, on the Surface Pro 4. Here's what I got:

SYS_SMALLICON_X = 16
SYS_SMALLICON_Y = 16

The SYS_SCREEN_X and SYS_SCREEN_Y values appear to be calculated based on the current Windows UI scaling setting. With it set to 100% (unusably small on this device), I get the screen's hardware resolution:

SYS_SCREEN_X = 2736
SYS_SCREEN_Y = 1824

But with the system UI scaling setting set to a more reasonable 200%, I get:

SYS_SCREEN_X = 1368
SYS_SCREEN_Y = 912

So it seems if you can pull the hardware resolution from somewhere else, you can get the UI scaling by comparing it to the SYS_SCREEN_X/SYS_SCREEN_Y values, and scale the icon sizes based on that value.

I'd really like to see this issue fixed, so if there's any other test I can do that will help, let me know.

Revision history for this message
David Zweben (dzweben) wrote :

Actually, come to think of it, the UI scaling doesn't need to be automatic. Just put in a preference to set the UI scaling for KiCad specifically.

A toggle between 100% and 200% would be a great start, and a slider to choose among the same UI scaling levels Windows 10 provides would be excellent. I don't even care if the icons are pixelated, they just need to be a usable size.

Revision history for this message
Tarjei Knapstad (tarjei-knapstad) wrote :

According to the changelog, the wxWidgets 3.1.0 release has multiple high DPI fixes. Have not tested doing a build against 3.1.0, but might be worth investigating.

Revision history for this message
ereao_eash (coronzon88) wrote :

Hello, I have an older notebook computer with a smaller resolution 1280x800 16:9 screen and here buttons are too large. Something definitely can be done with these icons to fit all screens - Maybe using the code from patch to scale sizes by multiplier stored as some setting? Then, if needed, user may change the multiplier to change size.

Revision history for this message
Jon Watte (jwatte) wrote :

My 2014 notebook had a 14" 3200x1800 display. My 2016 notebook has a 14" 4k display. This has been reality for a long time now. (Not to mention Mac Retina displays.)

If cross-platform DPI detection is hard, how about a setting/preference for whether to double the UI or not?
Also, users with poor vision might appreciate that, even if they don't have HiDPI screens!

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1341933] Re: Toolbar icons are too small with HiDPI display

I did some digging around and it looks like wxWidgets 3.1 handles this
automatically (possibly). Maybe one of our developers that has access
to a high resolution display can build kicad against wx 3.1. The only
issue may be wxpython support for 3.1. So we may only be able to
provide high res display support without python scripting.

On 2/8/2017 11:08 PM, Jon Watte wrote:
> My 2014 notebook had a 14" 3200x1800 display. My 2016 notebook has a 14"
> 4k display. This has been reality for a long time now. (Not to mention
> Mac Retina displays.)
>
> If cross-platform DPI detection is hard, how about a setting/preference for whether to double the UI or not?
> Also, users with poor vision might appreciate that, even if they don't have HiDPI screens!
>

Revision history for this message
Tarjei Knapstad (tarjei-knapstad) wrote :

Wayne: I've made that comment above, however 3.1 is a development release and too early to target.

As for importance I would rate this well above "Whishlist". This makes KiCAD unusable on high DPI displays which are just becoming more and more common.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 2/17/2017 4:23 PM, Tarjei Knapstad wrote:
> Wayne: I've made that comment above, however 3.1 is a development
> release and too early to target.
>
> As for importance I would rate this well above "Whishlist". This makes
> KiCAD unusable on high DPI displays which are just becoming more and
> more common.
>

I agree that something needs to be done. The problem is what and how.
If we cannot use wx 3.1 then we would have to design our own solution
which will most likely be obsolete when 3.2 is released. There is no
clear path forward here unless someone else has any good ideas. The
other issue is that I don't have a high dpi display or a graphics card
that could support one so even if I wanted to work on the problem, I
would have no way to verify it.

Revision history for this message
Jon Watte (jwatte) wrote :

It should be possible to create a "2x" size mode for all the icons/menus/widgets.
This might be something that's turned on with a checkbox. This checkbox might require re-start (or at least re-opening a window) to be effective.
It would simply fatten up all the GUI widgets in layout -- if it was 24 pixels, make it 48 pixels, and so forth.
Anyone should be able to test this, at least initially, simply by looking at the GUI widgets: Are they 2x the size of normal?
Note that some things seem to auto-scale (font sizes) already, but others (size of popup menu items) do not, so looking at affected screen shots to tell what to scale would be the next step up in accuracy.

I'm including a screen shot of the main schema window, which is 10 inches (30 cm) wide on my screen, and main layout window 10 inches (30 cm) wide and edit-footprint-dialog 3.5 inches (9 cm).
You can view these in a resizable window and get the right physical size on your screen, or just resize them in pixel size 2:1, to get a feeling for it.
You can see that the dialog is actually quite usable, whereas the icons along the left and right edges, and top toolbars, are much less so.

Revision history for this message
Jon Watte (jwatte) wrote :
Revision history for this message
Jon Watte (jwatte) wrote :
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Everything I've read (granted it hasn't been a lot) about how to
implement this have made it clear that increasing the size of images in
your program is *not* the way to resolve this issue. If you google
around you find that there seems to be a consensus on this at least as
it applies to wxWidgets. I believe on recent versions of windows, this
is configured with by providing a windows manifest file which allows
windows to take care of this internally. I'm guessing osx has something
similar. I'm not sure how this ties into what wx 3.1 is doing to handle
this. If someone has any experience with this and a high dpi monitor to
validate it, the help would be appreciated.

On 2/18/2017 8:03 PM, Jon Watte wrote:
> It should be possible to create a "2x" size mode for all the icons/menus/widgets.
> This might be something that's turned on with a checkbox. This checkbox might require re-start (or at least re-opening a window) to be effective.
> It would simply fatten up all the GUI widgets in layout -- if it was 24 pixels, make it 48 pixels, and so forth.
> Anyone should be able to test this, at least initially, simply by looking at the GUI widgets: Are they 2x the size of normal?
> Note that some things seem to auto-scale (font sizes) already, but others (size of popup menu items) do not, so looking at affected screen shots to tell what to scale would be the next step up in accuracy.
>
> I'm including a screen shot of the main schema window, which is 10 inches (30 cm) wide on my screen, and main layout window 10 inches (30 cm) wide and edit-footprint-dialog 3.5 inches (9 cm).
> You can view these in a resizable window and get the right physical size on your screen, or just resize them in pixel size 2:1, to get a feeling for it.
> You can see that the dialog is actually quite usable, whereas the icons along the left and right edges, and top toolbars, are much less so.
>
>
> ** Attachment added: "schema editor 30 cm wide window"
> https://bugs.launchpad.net/kicad/+bug/1341933/+attachment/4821776/+files/schema-30-cm.jpg
>

Revision history for this message
Jon Watte (jwatte) wrote :

I would suggest making the actual icon buttons and layout panel to fit them bigger -- not necessarily the image itself.

However, I don't know exactly how this layout is done or how the widget is implemented, so perhaps that is not possible?

The icon buttons in the launcher app are quite big enough, though, so or seems that should be disable.

Revision history for this message
Keegan Dent (dagreenmamba) wrote :

All of my displays are hi-res, and yeah this makes the icons impossibly small (for reference I'm on the latest 64-bit windows stable 4.0.6). Interestingly enough the icons to open the schematic editor, library, pcb layout, etc are actually decent size. I've got to imagine that the original icons are vector graphics and have been rasterized for the build. If you could get the vector themselves as part of the program and then have it scale the buttons to a function of the screen height and width in pixels, it would go a long way.

As it stands right now, this one bug makes the program useless to me, and I'm sure I'm not alone.

Revision history for this message
Tarjei Knapstad (tarjei-knapstad) wrote :

I found a workaround for Windows today:

1. Right click the KiCAD icon and select "Properties"
2. Open the "Compatibility" tab
3. Check "Override high DPI scaling behavior". The default is "Application". Change it to either "System" or "System (enhanced)" (don't know what the difference between these two are).

After that, all icons will be normally sized and clearly visible.

This does nothing for Mac/Linux users of course, but at least alleviates the problem on Windows.

tags: added: hidpi
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.