Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI scaling for high-resolution desktop displays #629

Open
milipili opened this Issue Aug 2, 2015 · 40 comments

Comments

Projects
None yet
@milipili
Copy link
Contributor

milipili commented Aug 2, 2015

DPI scaling for QVGA displays {#147}

I've just received a Lenova Yoga 3 with QVGA display - after loading Notepad++ the toolbar shows very small. My understanding is that if applications have not used DPI scaling then it will not scale properly for higher resolutions. Now these displays are becoming popular it would be worth checking.

Icon size problems {#568}

On a 4K monitor some icons are too small:

  • The X icon on a tab
  • Icons of plug-ins on the toolbar that exist only as small icons are not scaled up

You should be able to make icons in general larger (ideally in steps of 1 px).

Icons in tabs don't scale up on high pixel density screens {#610}

So I just started using Notepad++ on a 4K screen (on Windows 8). Most elements work great, but the close (cross) icons in the top right of tabs don't scale up. They're so small that they're pretty much unusable on a 4K monitor.

Font size of UI elements {#562}

Notepad++ doesn't go along with an increased font size of Windows 8.1, although it scales correctly. Especially important in the search-and-replace dialog.

Adjust the individual segments to the (scaled) string size on HiDPI systems {#539}

When using a monitor with a higher DPI than the usual 96 DPI and Windows 8.1 scaling set to >100%, Notepad++ typically scales rather well.

The status bar segments for the line ending type and the encoding are too small, however, and the labels "Dos/Windows" and "UTF8 w/o BOM" are cut off, see the attached screenshot. Other status bar labels may be affected as well, I have only seen it for these two, though.

@milipili milipili added the enhancement label Aug 2, 2015

@milipili milipili added this to the 6.x milestone Aug 2, 2015

@milipili milipili changed the title UI scaling UI scaling for high-resolution desktop displays Aug 2, 2015

This was referenced Aug 8, 2015

@h-h-h-h

This comment has been minimized.

Copy link
Contributor

h-h-h-h commented Aug 11, 2015

Also the caption bars of dockable dialogs and their UI elements are not scaled up.

@ccompletion

This comment has been minimized.

Copy link

ccompletion commented Sep 21, 2015

Status bar indeed does not scale well. I have many medium-sized source files >10 KiB and on my DPI, nothing after "lines:" is displayed. So I have to use workarounds to learn number of lines instead of just having it displayed.

@ccompletion

This comment has been minimized.

Copy link

ccompletion commented Sep 29, 2015

This is how I've had it for years... it really is time to fix this.
untitled
Most of the time in practice, I can't see "Sel" number either, so I need to manually calculate selection length from columns.

@nsgundy

This comment has been minimized.

Copy link

nsgundy commented Oct 28, 2015

Tab labels are really tiny (200% scaling set in windows):
image

@h-h-h-h

This comment has been minimized.

Copy link
Contributor

h-h-h-h commented Oct 28, 2015

@nsgundy:
Tab labels are really tiny (200% scaling set in windows):

I can agree the font is too small when having the system setting increased, but here, it's not that small! That's very strange! Here, it's just as small as, for instance, the text in the find-and-replace dialog.

@MTphilclothier

This comment has been minimized.

Copy link

MTphilclothier commented Jan 22, 2016

Yeah, same problems for me on 4k Dell XPS15. Not unusable, but I need to put my good glasses on ;)

@thezoggy

This comment has been minimized.

Copy link

thezoggy commented Feb 18, 2016

first thing I noticed when launching notepad++ on 4k dell xps 13 was that the toolbar icons just arent as crisp as the other ui elements. :(

@rjbanker

This comment has been minimized.

Copy link

rjbanker commented Mar 17, 2016

I can confirm this behavior on a Surface Pro 4 with Windows 10 (4K screen and auto-DPI scaling which is default configuration). Extending to 1080p external monitors and moving the Notepad++ to said monitors worsens the behavior.

@BoostHungry

This comment has been minimized.

Copy link

BoostHungry commented Apr 7, 2016

++1 The font is fine but things like the text in the tab labels and the + icons in the left margin to collapse and expand code sections are minuscule and unreadable on my 4k Lenovo Y50.

@Koshmaar

This comment has been minimized.

Copy link

Koshmaar commented May 7, 2016

Same thing here - n++ 6.9.1 has way too small UI text on 4k screen. I don't want to change windows scaling, because on win 7 all monitors will have same scaling, so that would make other monitors unusable. Best would be if n++ itself could scale the Ui text.

@h-h-h-h

This comment has been minimized.

Copy link
Contributor

h-h-h-h commented May 7, 2016

Try it with this setting (Windows 10, translated from German, find your way): "Settings" > "System" > "Extended Display Settings" > "Extended Size Settings for Text and Other Elements". Then change the size for every list item. Check if the items remain changed after applying. This changes just the text, although the taskbar text doesn't want to change.

@ygoe

This comment has been minimized.

Copy link
Contributor

ygoe commented Jun 5, 2016

The text cursor is also too thin. It's a single device pixel whereas (at 200%) it should be 2 device pixels like in every other application. I can barely see it between the text. Should I open a new issue for this?

@h-h-h-h

This comment has been minimized.

Copy link
Contributor

h-h-h-h commented Jun 6, 2016

The text cursor is also too thin. It's a single device pixel whereas (at 200%) it should be 2 device pixels like in every other application. I can barely see it between the text. Should I open a new issue for this?

Mine is wider than 1 device pixel. I think there's an option for this in Notepad++.

@ygoe

This comment has been minimized.

Copy link
Contributor

ygoe commented Jun 6, 2016

Great, thanks! I just copied my config over from the PC where 1 is a good value. Now I can even select 3 pixels, which would be 1.5 on a regular monitor. :-) Everybody should have a 200% scaled monitor!

@aterzi

This comment has been minimized.

Copy link

aterzi commented Jul 6, 2016

screenshot_1
I have laptop with high-resolution display and second monitor with 1920x1200 and I have such kind of bug.

@JoelRSimpson

This comment has been minimized.

Copy link

JoelRSimpson commented Jul 7, 2016

Same issue as aterzi above. I have a 4k laptop display and 4 external monitors. The 4k display is set to 200% scaling. All the other monitors are 1920x1200, 2 are set portrait, and all are set to 100% scaling. The tab font shows big regardless of which monitor the application is displaying on.

@h-h-h-h

This comment has been minimized.

Copy link
Contributor

h-h-h-h commented Jul 8, 2016

@JoelRSimpson:
I have a 4k laptop display and 4 external monitors.

Then you can go take a walk with your mouse cursor.

@jorrit

This comment has been minimized.

Copy link

jorrit commented Aug 12, 2016

@aterzi 's issue happens to me when I connect my laptop with a 4k display to a regular monitor via a docking station and not use the laptop screen.

@h-h-h-h

This comment has been minimized.

Copy link
Contributor

h-h-h-h commented Aug 12, 2016

It might have to do with different DPI scaling factors on different monitors.

@AdrianHordyk

This comment has been minimized.

Copy link

AdrianHordyk commented Aug 26, 2016

any tips on how to deal with the issue that @aterzi describes?
I'm experiencing same problem with Dell XPS 15 with an external monitor. Perfectly usable, but would be great to have this fixed

@cvcnsprakash

This comment has been minimized.

Copy link

cvcnsprakash commented Nov 9, 2016

Any Solution to the above Scenario? Facing the same issue.

@ksadralodabai

This comment has been minimized.

Copy link

ksadralodabai commented Nov 29, 2016

Any news on the tiny labels listed on the tabs for N++?

@hmtamim

This comment has been minimized.

Copy link

hmtamim commented Jan 6, 2017

You can easily fix this issue by creating a manifest file and putting it in the Program files/Notepad++. Here's an article on it https://tricklio.com/fix-notepad-plus-plus-scaling-in-high-dpi-displays/

@ouned

This comment has been minimized.

Copy link

ouned commented Jan 9, 2017

What about Per-Monitor DPI scaling?

I recently made some tests and it seems promising. If there is interest I may spend some time doing it.
Is using newer API's like EnableNonClientDpiScaling allowed? It would be a requirement for it to actually work properly.

@tomhunter-gh

This comment has been minimized.

Copy link

tomhunter-gh commented Jan 11, 2017

Tab labels look good when I run the program locally:

But tab label font size is too small when I run on a remote machine via remote desktop connection:

I'm on a Surface Book with 175% scaling.

@hmtamim

This comment has been minimized.

Copy link

hmtamim commented Jan 11, 2017

Hi tomhunter-gh,

You can easily fix this. Just go to Notepadd++ > Settings > Performances > Now mark on Reduce and finally click Close to save it. Hope it helps :)

If you have scaling problem then check my earlier comments. There's a fix for it.

@tomhunter-gh

This comment has been minimized.

Copy link

tomhunter-gh commented Jan 11, 2017

Hi @hmtamim, thanks for the tip but that doesn't quite fix the tab labels on remote desktop connection I'm afraid.

Reduce on:

Reduce off:

Still looks a bit different to when I run the program on my local machine.

@gstavi

This comment has been minimized.

Copy link

gstavi commented Jan 12, 2017

The tab font problem is at least partially due to the use of GetStockObject API in TabBarPlus::init.
Microsoft considers it obsolete.
The recommended approach is (to use Menu font for example):

NONCLIENTMETRICS ncmat;
ncmat.cbSize = sizeof(ncmat);
::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncmat, 0);
_hFont = ::CreateFontIndirect(&ncmat.lfMenuFont);

@chulai

This comment has been minimized.

Copy link

chulai commented Jan 19, 2017

It's been a year and a half since this issue was originally reported. Last comment suggests Notepad++ is using a deprecated API and a possible solution. Any plan to resolve this? Any workaround? I'm not sure under what conditions this issue does show up. I also use an external monitor but this happens in both monitors. Sometime it appears sometime it doesn't. Restarting Notepad++ doesn't help, neither does using the 'Reduce' option as explained above.

@carlos-quintero

This comment has been minimized.

Copy link

carlos-quintero commented Jan 20, 2017

Can you verify if the Windows Updates of January 2017 fix the bug of @aterzi: big font size in Notepad++ tabs with high-dpi laptops with non-high-dpi external monitors? Something seems to have fixed the problem for me and another user for Notepad++ and another app of mine suffering the same problem

Update: the Windows Updates of January 2017 don't fix the problem, it has happened again. The cause is that Notepad++ uses _hFont = (HFONT)::GetStockObject(DEFAULT_GUI_FONT); in TabBar.cpp file to get the font. FWIW, Windows.Forms (.NET, which I use in my app suffering the problem too) does the same and in this scenario that font is returned huge (Microsoft Sans Serif, size 21, 15.75 points in my case). Microsoft doesn't recommend to use DEFAULT_GUI_FONT.

@chulai

This comment has been minimized.

Copy link

chulai commented Jan 20, 2017

I have a 2-monitor setup (laptop and external monitor) at work where, unfortunately, I can't update Windows due to Group Policies. However, I just got an external monitor for home so I'll try to update Windows and use Notepad++ with a similar setup for a while to see if the issue got resolved by the Windows January updates or not. I will post my findings here. Thanks.

@M-Jup

This comment has been minimized.

Copy link

M-Jup commented Jan 31, 2017

My laptop and docked monitor have different DPI scaling. I need to logout / login to Windows every time after screen change because otherwise Notepad++ is blurry. Very annoying!!

I can also reproduce the tab font size problem. Size of the font is huge and no setting fixes it.

I have the latest Windows 10 from Windows Update.

@chulai

This comment has been minimized.

Copy link

chulai commented Feb 2, 2017

@M-Jup the blurry thing is a dpi scaling issue that affects to many Windows application when you have a monitor configuration with at least one being high DPI. It's not the issue reported here.

@chulai

This comment has been minimized.

Copy link

chulai commented Feb 2, 2017

So I tested with Windows 10 Anniversary update and latest updates and with 2 different monitor configurations, both with multiple monitors. The issue is still around.

@M-Jup

This comment has been minimized.

Copy link

M-Jup commented Feb 3, 2017

Should I then create a separate issue about the blurry thing? At least Firefox, Chrome and most of the bundled Win10 apps don't have this problem so there should be a way to fix it?

@h-h-h-h

This comment has been minimized.

Copy link
Contributor

h-h-h-h commented Feb 4, 2017

@M-Jup:

Might have to do with per-monitor DPI-awareness not being present.

@M-Jup

This comment has been minimized.

Copy link

M-Jup commented Feb 5, 2017

Created #2871 for PM support in Notepad++

@Fenrirthviti

This comment has been minimized.

Copy link

Fenrirthviti commented Jun 6, 2017

Also having this issue on a clean install of Windows 10 and NP++ 64bit. Tab font size is too large. Unchecking "Reduce" for the tab bar settings doesn't do anything but make the icon in the tab bigger. Anyone have any actual solutions to this, or is this something that needs to be patched in the program itself?

@SnoringFrog

This comment has been minimized.

Copy link

SnoringFrog commented Feb 12, 2018

I've just begun having this issue as well. Unchecking Reduce changes the font size slighty, but does not correct it.

@MarkCanada

This comment has been minimized.

Copy link

MarkCanada commented Mar 11, 2018

Just switched a 4K laptop as well.
The text in tabs is quite small - doesn't seem to scale.
The main icons - New, Open ... seem right, but the icons of Plugins are very small either and don't seem to scale either.
The tab icons for document and close seem a bit large and are clipping the tab, but otherwise it seems nice.
Scaling is at 260%
screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.