-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
[DPI] Elements required works to properly support hiDPI #14959
Comments
Just found 2 dialogs (Preferences & Find Replace) partially working & 1 (Shortcut mapper) totally not working: |
@donho For preference add
Shortcut mapper, Find&Replace and Windows dialogs are sizeable which require more works. EDIT Old dpiManager is scaling with dpi from primary monitor. btw
|
@ozone10
So it's not necessary I guess. The old dpiManager is supposed to be replaced by DPIManagerV2, isn't it? All I wanted to point out is, if Can you reproduce what I've shown you in the screenshot with |
BTW, the provided screenshot is Notepad++ dragged from a scale 225% laptop screen to a scale 100% external monitor. |
Yes that is right, because they are using dpi scaling from main monitor. For preferences dialog for some reason subdialogs when initializing will use dpi scaling from main monitor or system wide. |
As per @ozone10 's great suggestions, I am upsizing the toolbar icons for much better sharpness and clarity. Particularly at the smaller sizes. Please understand that it might take me up to a week to do this. I have to grab 3 SVG's (16px, 20px, and 24px) and manually edit each one. Multiply that by 46 icons. So I have to manually edit 138 SVG files if we want this to be the absolute best. Then I can automatically create inverted copies for the other 138 needed to dark mode. I have done the process with two icons so far. But trust me when I say that this will be worth while. The difference is night and day. |
@WildByDesign |
For sure. examples.zip Last night I worked on tooling so that I can fly through the icons now. I have two scripts now that take care of all converting, any inverting, packing into ICO, and renaming the icons. Previously, I had all the conversion done with scripting but I had to rename all of the icons manually at the end which was not fun. I think I love PowerShell now. |
@ozone10 Can you please test these? It's the first 3 icons on the toolbar. Please compile into your build and particularly test the size (especially smaller sizes) and also the disabled state of the Save button. Check the disabled state of the Save button in both light and dark modes. I have followed your suggestion on the disabled state colors. |
@WildByDesign |
Before I submit the PR for the updated Fluent icons, I wanted to share where it's at right now. It took about a whole week to modify all of the SVGs to ensure size, clarity and most importantly the symmetry amongst all of the icons. Everything is done, however, I do still want to fix the Word Wrap icon and possibly another icon or two. I'm hoping to submit the PR tomorrow (Thurs.) as long as all goes well. But for today, I really wanted to show how things look right now. Please view at 100% to see at it's best. |
@WildByDesign |
Yes, you are right. I did have the following briefly: Do you prefer this one with the desktop and toolbox? EDIT: I got rid of the desktop with the toolbox icon after a brief time because the little toolbox was blurry on certain DPI. I was able to resolve that problem and keep the toolbox sharp on all DPI now. Therefore, I have brought this icon back now. I also like it better because the desktop and toolbox better symbolizes folder as a workspace. Thanks for bringing this up. |
Alright I've got the new PR (#15253) submitted now. A lot of hand crafted attention was put into the symmetry between all icons. I have compiled this into my build and tested at 100%, 125% and 150% scaling all on dark mode. I need somebody to further test more scaling scenarios in light mode as well. I can easily update any of the icons individually as needed. @ozone10 Have you done a commit since 8.6.7 that affects the highlighting (hot track?) of toolbar icons? I must have missed that commit when browsing through. But what a nice surprise! It caught my attention immediately and looks fantastic. It seems to resolve the Windows 11 (blue highlighting in dark mode) issue and looks incredible. Cheers to that! EDIT: I found it. You fixed it with PR fedaabf and I must have skipped over it since it referenced pressed state. But it also obviously fixed the mouse over highlight as well. So you effectively and properly fixed this issue (#10510) which originally had a simple workaround to revert the icons when hovered over or pressed I believe. Question: Is this fix something that the LibreOffice developers could reasonably do? They still suffer from that toolbar icon blue highlighting in dark mode on Windows 11. |
One thing that I have wanted to tackle for a long time now is the Close button on the tabs. As far as I know, that is still BMP format and has issues with scalability and is wonky with the whole transparent background and such. Is it possible to change the Close button on the tabs to ICO format? I would also have more creative freedom to make it extra special. The BMPs for the Close buttons on the tabs always presented weird issues for me in the past and limited what I wanted to really do with them. |
Sorry for the barrage of messages, but I don't want to forget some of these details. Do any of these represent the Search Results icon well? Which do you prefer? Also, how can I see this Search Results panel in Notepad++? I have tried all sorts of different search options and cannot figure out how to bring up that Search Results panel. Please let me know so that way I can see the icon in various scaling scenarios to ensure that I'm doing it right. Thank you. |
They are gorgeous! I would say the 1st ones. What do you think @ozone10 ?
Step 1: Step 2: |
if they use win32 they can use custom draw Could you check Show all characters small icons, it looks strange for me.
I quiet busy now, but eventually I would like to replace all BMP files. Meanwhile you can work on main tabbar and panels tabbar and toolbar (there was recent commit which replaced BMP with ICO) icons, since they use ICO files
Personally I like the 3rd one. It looks similar to current standard.
|
@WildByDesign |
Thank you both for your quick and thorough responses, I appreciate it.
I've heard that they use the Qt framework, so they may be out of luck unfortunately.
I see what you mean. The Show All Characters icon is quite blurry for the 16x16 icons for some reason. I will fix that.
I agree with you. I think that the 3rd one represents the overall icon set.
Yes, I see what you mean and I can fix those quite easily. I just have to shift some of the SVGs over a pixel or two. Everything after that is completely scripted and automated now. It was definitely worthwhile to create the scripts to export the SVGs to PNG, then stuff the PNGs into ICO files automatically named according to the Notepad++ icon filenames. |
@ozone10 I have found something interesting under 100%, 125% and 150% scaling. All of those (and likely higher scaling) all add 1 extra pixel of space on the right side of each icon, within the square that is drawn around each icon. Top, bottom and left do not have an added pixel of space. But in a scenarios, a single pixel of space is added on the right of each icon, but within the square. For example, on my 125% scaling system using 20x20, the inner section of each icon box drawn is 25x24 pixels. Including the frame is 27x26. This gives the impression that each icon is slightly off. Now, there were definitely some icons that legitimately needed to be moved to the right by 1 pixel. And the document list icon needed to be moved to the left by 1 pixel. However, the majority of the icons can't be moved over because they cover the entire space (left to right). So in many cases, I can't adjust them for this extra 1 pixel of space. Do you know if this is something that can be fixed? I just checked a build from a few weeks ago, and in that case the extra space was being added on the left. I don't understand the programming aspect of this. |
I just did some more testing regarding the issue with the box drawn around the icons to get more details to share. 20x20 pixel icon as SVG and PNG and ICO
20x20 pixel icon as SVG and PNG and ICO (shift padding to account for extra pixel)
So my thought process was that since we had a perfectly centered icon with 2 px space on each side evenly, I would simply shift the icon spacing so that it was moved over to account for that extra pixel of space being added to the right. It should have worked, but we end up with an extra pixel of space on the left side now. Icons with a perfect amount of pixels in size and space cannot be aligned evenly (horizontally) at the moment. I can't even wrap my mind around the mathematics of this. I'm really not sure how to proceed with the horizontal symmetry of the icons right now. |
Sorry for the multiple comments in a row, again. @ozone10 @donho I have a suggestion. I propose that we merge the PR (#15253) as is. Once it is merged, I can do separate (and smaller) PRs to address individual icon issues. For example, I can do a separate PR for the Show All Characters icon, Document List icon and possibly a few others to address horizontal alignment. I just feel a lot of weight on my shoulders when I keep recreating the big PR with 188 icon files spread across 4 directories and I worry that I might make a mistake. Right now, I know that PR is proper and correct. Although as noted, I will have to follow up with one or two smaller PRs to fix a few icons. I still haven't had time to learn Git and therefore I'm just uploading the icons through the Github web site and creating the PR that way at the moment. What do you guys think? If it gets merged, I can follow up with the smaller fixes today also. EDIT: Here is the PR (#15256) for the Show All Characters icon fix. |
@WildByDesign |
@WildByDesign |
@donho You're welcome. @ozone10 I will come back to the horizontal alignment of toolbar icons once we can figure out that issue with the 1 pixel added to the right of all toolbar icons. But for now, I am working on the icons for tab bar and toolbars from docking panels and docking panels tab bar. I ran into another weird scaling issue while working on that Search Results (findResult.ico) icon. The original icon is 16x16. I created 16, 20, 24 and 48 pixel icons within the new ICO. Here is what I am seeing: Scaling Dimensions Using
in NPP Icon
100 14x14 16
125 17x17 20
150 20x20 24 The Dimensions in NPP refers to what is visually showing within Notepad++. For example, at 100% scaling, the 16px icon is being scaled down to 14px. The weird thing is, the ICO contains a 20px icon yet it still scales the 24px down to 20px instead of using the 20px. So as you can imagine, all scaling scenarios look terrible. I will attach an example ICO to this comment so that you can test. Until this is resolved, I will try working on the Function List docking panel icons to see if they are scaling correctly or not. EDIT: The docking panel icons such as funclstReload.ico all display in the correct dimensions, which is great news. So I can move forward and work on those now. They do suffer from the same 1 pixel space on the right issue that the main toolbar icons suffer from though. |
@WildByDesign Panel's tabbar icons are still using non-dpi api so it's normal what you are observing. For 1 px to right this is also normal. Icon has size 16x16 and we are setting button to size 16x16 for this same size OS cannot add padding. By standard toolbar button width is usually 1-2 px larger than height and padding will center icon. So mainly modify document list icons. |
@WildByDesign |
That is interesting and I never realized that. All these years of using Notepad++ and I never noticed that the icon moved over 1 pixel to simulate the button being pressed. That makes sense. I can work with that and align the icons as best as possible to accomodate.
I've compiled my local build based on this PR. It has slightly changed the display size of the icons, but it seems that the sizes still quite aren't as expected.
|
@WildByDesign You can change size by yourself
|
I apologize for the confusion on my part. Initially, I misunderstood which icons that PR was targeting. I kept focusing on the Search Results icon and panel which was clearly not part of that PR. Now I understand which icons and I can go ahead and complete most icons tonight which is exciting. |
This is working perfectly. The icons are displaying as 16, 20, 24, etc. and looking sharp and beautiful. I can submit a PR for this 14 to 16 base pixel change later today along with all of your the updated icons. They are all done but I am reviewing them in all scaling scenarios first before submitting the PR which should be today. |
This issue is for tracking issues with hiDPI environment and works on it.
Testing PR #13533
Main window
Dialogs
More complex
goToCenter
(Move window for dpi change for goToCenter() #15158)Panels
MISC
The text was updated successfully, but these errors were encountered: