Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: darmar on June 10, 2018, 01:03:58 pm

Title: Problem with icons on HiDPI displays
Post by: darmar on June 10, 2018, 01:03:58 pm
Icons in C::B are too small on HiDPI displays. I am experiencing it myself and others do too (e.g. http://forums.codeblocks.org/index.php/topic,21724.msg147764.html#msg147764 )
 
Are there any changes on this matter? Do somebody has already started to implement required changes?

If not, I could put some of my efforts for solving this problem.

Maybe somebody could advise what steps should be taken?
I was thinking about (a) the making icons with different sizes and (2) implementing in C::B the possibility to choose these icon sets.
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on June 10, 2018, 07:45:12 pm
As a start we need bigger icons.
I'm agitating a person to do the work, but the progress is really slow there.
I've not looked what we need to do after we have the bigger icons.
I'm running at 160dpi and 22x22 icons aren't too small. :)
Title: Re: Problem with icons on HiDPI displays
Post by: darmar on June 11, 2018, 08:35:21 am
Quote
As a start we need bigger icons.

Which icons are needed? How big they should be? Maybe I will be more successful in agitating somebody  ;).
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on June 11, 2018, 08:51:45 am
All of them. :) I think to be safe we need sizes as big as 64x64 or even 128x128 for toolbar icons.
Title: Re: Problem with icons on HiDPI displays
Post by: headkase on June 11, 2018, 02:45:08 pm
All of them. :) I think to be safe we need sizes as big as 64x64 or even 128x128 for toolbar icons.

With the caveat that I'm a noob, if it has to be done then how about doing it once: create scalable vector graphic files, SVGs, for the icons.  Then those definitions can, even on the fly, be used to create whatever size to your heart's content?

https://en.wikipedia.org/wiki/Scalable_Vector_Graphics
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on June 11, 2018, 04:54:01 pm
SVGs aren't 100% suitable for the task, because the anti-aliasing algorithms have troubles producing sharp images for the smallest sizes.
So, even if SVG is used as a base for the icons, a manual pass is still required in order to make the icons look really good.
Title: Re: Problem with icons on HiDPI displays
Post by: BlueHazzard on June 11, 2018, 11:57:16 pm
SVGs aren't 100% suitable for the task, because the anti-aliasing algorithms have troubles producing sharp images for the smallest sizes.
So, even if SVG is used as a base for the icons, a manual pass is still required in order to make the icons look really good.
i can only confirm this. Converting svg images to low resolution does not work at all... Maybe starting from 128x128 svgs are acceptable, but i have not tested this. Nerveless I would recommend to rework all icons to svg , so for future use they are in a nice scalable format...
Title: Re: Problem with icons on HiDPI displays
Post by: darmar on June 20, 2018, 08:50:39 am
Work progress

There was created a project called "cb-icons" on github ( https://github.com/specialmart/cb-icons (https://github.com/specialmart/cb-icons) ).
Currently were created only icons used by Debugger plugin.
Icons are created in SVG format using Inkscape and are exported to PNGs. Normaly are created two SVG files for each icon. "*32.svg" are used for export to 32, 36, 128 size PNG files. "*24.svg" or "*48.svg" are used to export to 48 size PNG files. Lines in SVG files are drawn on pixel locations to make PNG look sharp.

Please write your suggestions about the icons.

Questions:
1) Icons are created in 32, 48, 64, 128 size. Icons of 16 size and 22 (for toolbars only) size are already shipped with C::B. Is it OK?
2) It seems to me, that some icons in the image directory "trunk/src/src/resources/images/" are unused. E.g. "compile.png", "compilerun.png" etc. I think, that the Compiler plugin has its own icon set. Am I wrong? Perhaps, can somebody remove unused icons from the C::B repository? Or just write me a list with the unused icons?


Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on June 20, 2018, 09:23:50 am
1. What about the 24 and 28? I'm currently using size 22 on a 160dpi monitor and they look almost right. The pngs for size 32 looked blurry in firefox, but the svg looked sharper.
2. You'll have to search the source for every icon. :(
Title: Re: Problem with icons on HiDPI displays
Post by: darmar on June 20, 2018, 09:32:46 am
Do we need 24 icons, when 22 already exist?

Note: If you look icons directly from a browser, make sure that the zoom level is at 100%. Otherwise, any image is blurred.
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on June 20, 2018, 10:13:16 am
Not sure about 24.
It would probably be good if we support scales like 1.25, 1.5, 1.75, 2.0. If we select 16 as base. We get 20, 24, 28, 32.
Also we need some code to select the size automatically, but I guess this is doable in later wx's and it is a separate issue.

Yes, I'm looking the image at 100%, but the blurriness might be caused because the browser does some scaling due to my higher dpi. I've opened it in an image browser and it looks fine.
Title: Re: Problem with icons on HiDPI displays
Post by: BlueHazzard on June 20, 2018, 11:56:15 pm
They look really good! Good job!
Title: Re: Problem with icons on HiDPI displays
Post by: darmar on January 27, 2019, 06:34:34 pm
The work on the icons was going perhaps too slow, but now most of the icons are finished. See on https://github.com/specialmart/cb-icons (https://github.com/specialmart/cb-icons). Every icon has SVG files in 20, 24, 28 and 32 size which are used to export automatically to 20, 24, 28, 32, 40, 48,... pixel size png files. The person who worked on them (not me) is not professional designer, therefore some adjustment may be required in the future.

Before creation of more icons, I think, it would be nice to know the way how to integrate these icons into C::B code.
Title: Re: Problem with icons on HiDPI displays
Post by: BlueHazzard on January 27, 2019, 07:18:05 pm
If we work on them, can we repack them? Put them in zip archives for every plugin? So all icons/images are not all in one folder, but grouped to the plugin where they should be? This would make install, uninstall plugins make much more straight forward.

For loading them from the zip file we could add some loader function to the plugin class for easy access...

I use this approach in my plugins and i think it is a lot more cleaner then putting them in the global image folder...
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on January 27, 2019, 08:43:36 pm
Before creation of more icons, I think, it would be nice to know the way how to integrate these icons into C::B code.

Do you want to do the work? Or are you asking if any of us could/would do it? I can integrate them during next week...

If we work on them, can we repack them? Put them in zip archives for every plugin? So all icons/images are not all in one folder, but grouped to the plugin where they should be? This would make install, uninstall plugins make much more straight forward.

What do you mean?
Title: Re: Problem with icons on HiDPI displays
Post by: BlueHazzard on January 28, 2019, 12:04:11 am
Plugins like wxSmith or BrowseTracker or debugger have a lot images. All this images are stored in the share\CodeBlocks\images folder or in the  share\CodeBlocks\resources.zip\images archive
I do not know which one are used, but i do not think they should be mixed like that...

The icons and images for the wxSmith plugin should be in share\CodeBlocks\wxsmith.zip
for the debugger plugin in share\CodeBlocks\debugger.zip
ecc...

What is specially do not like about this is when you uninstall one of this plugins, the images still remain in the folder and are not deleted...
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on January 28, 2019, 01:26:19 am
for the debugger plugin in share\CodeBlocks\debugger.zip
The debugger plugin almost has no images. I've not checked lately, but most of its images are part of the sdk or src folders.
Title: Re: Problem with icons on HiDPI displays
Post by: darmar on January 28, 2019, 07:24:06 pm
Today in  "cb-icons" on github direct in "images" folder are only icons used by C::B core, while icons from plugins are in separate directories. I can change this order if it is required.

Quote
Do you want to do the work? Or are you asking if any of us could/would do it? I can integrate them during next week...

If you can integrate these icons into C::B tree, it is perfect. I think, that developers of C::B are those who decide about the structure of the code.

About wxSmith plugin. It has a lot of icons and no one was created yet. Do somebody can tell me how these icons was created?
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on January 28, 2019, 07:42:06 pm
Today in  "cb-icons" on github direct in "images" folder are only icons used by C::B core, while icons from plugins are in separate directories. I can change this order if it is required.
It is fine the way it is as far as I can tell, I'll ask questions if there are problems.

If you can integrate these icons into C::B tree, it is perfect. I think, that developers of C::B are those who decide about the structure of the code.

Fine, I'll do it.

About wxSmith plugin. It has a lot of icons and no one was created yet. Do somebody can tell me how these icons was created?

No idea.
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on February 10, 2019, 11:42:48 am
darmar: Do you know if the person doing the work on the icons wants to be credited in a commit message or the about dialog?
Title: Re: Problem with icons on HiDPI displays
Post by: darmar on February 10, 2019, 12:39:20 pm
Specialmart told me, thank in a commit message is OK.
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on February 10, 2019, 01:49:01 pm
Should I use 'Specialmart' or some real name?
Title: Re: Problem with icons on HiDPI displays
Post by: darmar on February 10, 2019, 03:13:22 pm
Specialmart is OK.
Title: Re: Problem with icons on HiDPI displays
Post by: MortenMacFly on February 10, 2019, 03:23:28 pm
Great work, but keep in mind that it might be even simpler:

Most icons are available as SVG in the repo here:

https://svn.code.sf.net/p/codeblocks/code/resources

You only need to save/export these vector graphics in other sizes and you are done for the core.
Title: Re: Problem with icons on HiDPI displays
Post by: darmar on February 10, 2019, 06:13:04 pm
Yes, these SVG files were used where was possible. Also this folder contains several SVG icons used in Environment and Editor settings dialogs. However, the icons for these dialogs were not created yet.

By the way, only icons really used in C::B is created. Some icons are in the source tree, however are not used. I remember this is the case with ThreadSearch plugin. It can be, that I just overlooked something. Let me know about it.

SVG files for icons were created as close as possible to the existing *.png icons. However there are exceptions:
1) misc_16x16.png icon. It is blue 3D gear used on "Logs & others" window in "Build log" and "Debugger" tabs. It is quite (too) complicated icon to make in SVG. This icon was changed with a simpler 2D gear icon found in the C::B repo. See screenshot.
2) trash.png icon used in "Start here" tab for reopen recently used projects (can be found in /src/resources/start_here/). I do not want to hurt anyone, however I dislike this icon here. It is like saying for the user: "Your work is just trash. If you like, take it from there." I changed it to an icon with rotating arrows. See screenshot.

Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on March 03, 2019, 07:07:30 pm
It turned out that adding the icons would be a lot more involved and complex than I originally thought.
So, I'll do it in two steps:
1. move 22x22 images in a separate folder and make sure everything works
2. add new icons after 1 is complete

So I've implemented step 1. You can see the changes in this branch: https://github.com/obfuscated/codeblocks_sf/tree/ui/move_images

At the moment the code seems to work on linux with both wx2.8 and wx3.x. Unfortunately I don't have the energy to test stuff on windows at the moment. So I'll be really happy if someone volunteers to apply the changes to update*.bat files and do some testing on windows.

Next I plan to see how this modified codeblocks works on macOS.
Title: Re: Problem with icons on HiDPI displays
Post by: stahta01 on March 03, 2019, 09:02:20 pm
Used your branch to build win64 version of Code::Blocks and CB booted up OK; did not test any plugins.

Tested only 64 bit wxWidgets 3.0 build; patch used below
Code: [Select]
From 9fa06dff4ecceb602411b34e925f061089cf17d5 Mon Sep 17 00:00:00 2001
From: Tim S <[email protected]>
Date: Sun, 3 Mar 2019 14:38:10 -0500
Subject: [PATCH] ui: Copy 22x22 images

---
 src/update30_64.bat | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/update30_64.bat b/src/update30_64.bat
index 07388dc3a..bc71ac4a6 100644
--- a/src/update30_64.bat
+++ b/src/update30_64.bat
@@ -16,6 +16,7 @@ if not exist %CB_OUTPUT_RESDIR%\lexers md %CB_OUTPUT_RESDIR%\lexers\
 if not exist %CB_OUTPUT_RESDIR%\images md %CB_OUTPUT_RESDIR%\images\
 if not exist %CB_OUTPUT_RESDIR%\images\settings md %CB_OUTPUT_RESDIR%\images\settings\
 if not exist %CB_OUTPUT_RESDIR%\images\16x16 md %CB_OUTPUT_RESDIR%\images\16x16\
+if not exist %CB_OUTPUT_RESDIR%\images\22x22 md %CB_OUTPUT_RESDIR%\images\22x22\
 if not exist %CB_OUTPUT_RESDIR%\images\codecompletion md %CB_OUTPUT_RESDIR%\images\codecompletion\
 if not exist %CB_OUTPUT_RESDIR%\plugins md %CB_OUTPUT_RESDIR%\plugins\
 if not exist %CB_OUTPUT_RESDIR%\templates md %CB_OUTPUT_RESDIR%\templates\
@@ -30,6 +31,7 @@ if not exist %CB_DEVEL_RESDIR%\lexers md %CB_DEVEL_RESDIR%\lexers\
 if not exist %CB_DEVEL_RESDIR%\images md %CB_DEVEL_RESDIR%\images\
 if not exist %CB_DEVEL_RESDIR%\images\settings md %CB_DEVEL_RESDIR%\images\settings\
 if not exist %CB_DEVEL_RESDIR%\images\16x16 md %CB_DEVEL_RESDIR%\images\16x16\
+if not exist %CB_DEVEL_RESDIR%\images\22x22 md %CB_DEVEL_RESDIR%\images\22x22\
 if not exist %CB_DEVEL_RESDIR%\images\codecompletion md %CB_DEVEL_RESDIR%\images\codecompletion\
 if not exist %CB_DEVEL_RESDIR%\plugins md %CB_DEVEL_RESDIR%\plugins\
 if not exist %CB_DEVEL_RESDIR%\templates md %CB_DEVEL_RESDIR%\templates\
@@ -60,14 +62,14 @@ echo Compressing plugins UI resources
 %ZIPCMD% -jqu9 %CB_DEVEL_RESDIR%\abbreviations.zip plugins\abbreviations\resources\manifest.xml plugins\abbreviations\resources\*.xrc > nul
 echo Packing core UI bitmaps
 cd src\resources
-%ZIPCMD% -0 -qu ..\..\%CB_DEVEL_RESDIR%\resources.zip images\*.png images\12x12\*.png images\16x16\*.png > nul
+%ZIPCMD% -0 -qu ..\..\%CB_DEVEL_RESDIR%\resources.zip images\*.png images\12x12\*.png images\16x16\*.png images\22x22\*.png > nul
 cd ..\..\sdk\resources
-%ZIPCMD% -0 -qu ..\..\%CB_DEVEL_RESDIR%\manager_resources.zip images\*.png images\12x12\*.png images\16x16\*.png > nul
+%ZIPCMD% -0 -qu ..\..\%CB_DEVEL_RESDIR%\manager_resources.zip images\*.png images\12x12\*.png images\16x16\*.png images\22x22\*.png > nul
 echo Packing plugins UI bitmaps
 cd ..\..\plugins\compilergcc\resources
-%ZIPCMD% -0 -qu ..\..\..\%CB_DEVEL_RESDIR%\compiler.zip images\*.png images\16x16\*.png > nul
+%ZIPCMD% -0 -qu ..\..\..\%CB_DEVEL_RESDIR%\compiler.zip images\*.png images\16x16\*.png images\22x22\*.png > nul
 cd ..\..\..\plugins\debuggergdb\resources
-%ZIPCMD% -0 -qu ..\..\..\%CB_DEVEL_RESDIR%\debugger.zip images\*.png images\16x16\*.png > nul
+%ZIPCMD% -0 -qu ..\..\..\%CB_DEVEL_RESDIR%\debugger.zip images\*.png images\16x16\*.png images\22x22\*.png > nul
 cd ..\..\..
 
 echo Copying files
@@ -80,6 +82,8 @@ xcopy /D /y src\resources\images\*.png %CB_OUTPUT_RESDIR%\images > nul
 xcopy /D /y src\resources\images\settings\*.png %CB_OUTPUT_RESDIR%\images\settings > nul
 xcopy /D /y src\resources\images\16x16\*.png %CB_DEVEL_RESDIR%\images\16x16 > nul
 xcopy /D /y src\resources\images\16x16\*.png %CB_OUTPUT_RESDIR%\images\16x16 > nul
+xcopy /D /y src\resources\images\22x22\*.png %CB_DEVEL_RESDIR%\images\22x22 > nul
+xcopy /D /y src\resources\images\22x22\*.png %CB_OUTPUT_RESDIR%\images\22x22 > nul
 xcopy /D /y plugins\codecompletion\resources\images\*.png %CB_DEVEL_RESDIR%\images\codecompletion > nul
 xcopy /D /y plugins\codecompletion\resources\images\*.png %CB_OUTPUT_RESDIR%\images\codecompletion > nul
 xcopy /D /y plugins\compilergcc\resources\compilers\*.xml %CB_DEVEL_RESDIR%\compilers > nul
--
2.21.0.windows.1

Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on March 04, 2019, 12:16:35 am
Does switching to 16x16 icons work correctly? Do you see images in all four core toolbars?
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on March 04, 2019, 12:53:46 am
Committed. I've applied the same changes to the other update.bat scripts hopefully I've not messed something up.
Title: Re: Problem with icons on HiDPI displays
Post by: stahta01 on March 04, 2019, 01:51:13 am
Does switching to 16x16 icons work correctly? Do you see images in all for core toolbars?

Yes
Title: Re: Problem with icons on HiDPI displays
Post by: BlueHazzard on March 06, 2019, 10:22:36 pm
Does switching to 16x16 icons work correctly? Do you see images in all four core toolbars?
For me it does not work on latest Linux Mint wx3.0 gtk2
If i switch symbol size in the settings and hit OK, the toolbars flash, but do not switch size. I have to restart codeblocks to make the changes happen. If i restart everything looks nice and smooth. Good work to all.
Is this restart expected?
If not i can try to debug it.
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on March 12, 2019, 09:08:08 am
Yes it is expected. It event shows a dialog about it.

Probably this should also be fixed some day in order to support moving the window from one monitor to another.
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on March 15, 2019, 09:39:38 am
@darmar: I'm working on getting the 32x32 icons to work (and then I'll do all the other sizes in bulk), but I've found that project.png is missing from ThreadSearch. Could you arrange to add it to the repo?
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on March 15, 2019, 09:44:10 am
Also it would be good if you could notify me for any changes in the repo, because I'm missing the last two commits.
Title: Re: Problem with icons on HiDPI displays
Post by: darmar on March 16, 2019, 09:38:48 am
I have added project.png icons to ThreadSearch. And additionally project.png, project-readonly.png and folder_open.png icons were added to the core.
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on March 16, 2019, 10:44:49 am
Cool, thanks.

It turned out that the image is binary the same as the image I was using. To me it looks a bit blurry. But I guess it is good enough. This means that 32x32 should work fine now. It doesn't on macOS, but I'll fix this in the next days. Any testing would be appreciated. I'll do some testing on win7, but I won't be able to test this on any other version, so this would be highly appreciated.
Title: Re: Problem with icons on HiDPI displays
Post by: BlueHazzard on March 18, 2019, 12:32:56 am
Can test it on win 10 and mint 18 this week
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on March 18, 2019, 12:44:42 am
Good. I've pushed some fixes for windows. I have to test them on linux/macOS.
Title: Re: Problem with icons on HiDPI displays
Post by: BlueHazzard on March 20, 2019, 06:47:35 pm
I sadly have not much time this and the next week but i was able to test a bit:
Windows 10, resolution 1920x1080 and 100% scaling everything looks fine. Even better than in eclipse (no blurry text) ;)
I can not say if there is some to big space of the toolbar or around the controls, this simply does not jump into my eye....

One thing that bothers me is that there is no message box that says you have to restart codeblocks for the changes to work. I also do not have disabled any dialog, so is there one? If not it should be introduced...
As i said top i have not much time for the next weeks ;(
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on March 30, 2019, 02:14:20 pm
OK, I think I've finished the changes to add support for crisp 32x32 images on gtk2, gtk3, windows and macOS in 1x and 2x scaling.

For best support of HiDPI you need wx-master. I've tested if the things compile with most configs, but not wx2.8 or  wx3.0 on windows.
I plan to test if using artproviders is better and then I'll commit this to master/trunk in the next week.
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on April 06, 2019, 12:28:58 pm
The changes are in trunk/master. If you have problems don't hesitate to report them. Sometime next week I'll probably add the other sizes.
Also I plan to remove the 22x22 size, because it seems redundant.
Title: Re: Problem with icons on HiDPI displays
Post by: BlueHazzard on April 06, 2019, 02:25:48 pm
Looks fine for me windows 7 and windows 10
wx30 (for the moment)

beside this:
Quote
One thing that bothers me is that there is no message box, or any hint, that says you have to restart codeblocks for the changes to work.
Title: Re: Problem with icons on HiDPI displays
Post by: ollydbg on April 07, 2019, 04:33:08 pm
Looks fine for me windows 7 and windows 10
wx30 (for the moment)

beside this:
Quote
One thing that bothers me is that there is no message box, or any hint, that says you have to restart codeblocks for the changes to work.

I'm building the C::B rev11623 against wx git master(909adbb6bf832ada3db034cffc5548b8309a1602, note VZ has fix some toolbar related issue in the wx git master recent days, see discussion here: possible to make wxChoice a little shorter(smaller) inside wxToolbar - Google Groups (https://groups.google.com/forum/#!topic/wx-users/DjX5OD5_2wc)), under mingw-w64's GCC 7.2 32bit compiler, the icon works fine! Thanks.

I think a "restart" hint should show up so people will restart C::B to let the change of icon take effect.

BTW, the dialog somehow shows some layout issue, but maybe, it is not C::B related, see image shot in attachment:
Title: Re: Problem with icons on HiDPI displays
Post by: Miguel Gimenez on April 07, 2019, 08:51:49 pm
Quote
BTW, the dialog somehow shows some layout issue
That's due to the wxCB_SIMPLE flag being used in the combobox, removing it fixes the issue. I have attached a patch.
Title: Re: Problem with icons on HiDPI displays
Post by: ollydbg on April 08, 2019, 04:26:06 pm
Quote
BTW, the dialog somehow shows some layout issue
That's due to the wxCB_SIMPLE flag being used in the combobox, removing it fixes the issue. I have attached a patch.
Thanks Miguel Gimenez for the patch. It works fine on my system(wx master, which is wx 3.1.2).
OK to commit?
I currently don't have other wx library, I see the patch fixed the same issue under wxsmith's preview (in C::B prebuild against wx 3.1.1), does it cause regression other wx version, such as wx 2.8?
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on April 08, 2019, 07:46:54 pm
The proper fix for this is to use wxChoice...
Title: Re: Problem with icons on HiDPI displays
Post by: Miguel Gimenez on April 09, 2019, 11:43:05 am
Quote
The proper fix for this is to use wxChoice...

OK, this patch changes wxComboBox to wxChoice
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on April 10, 2019, 08:51:54 am
Thanks, I'll apply in the next days...
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on May 03, 2019, 05:07:44 pm
All sizes up to 64x64 have been added. 22x22 have been removed.
Testing and reporting any problems is welcome...  8)
Title: Re: Problem with icons on HiDPI displays
Post by: Miguel Gimenez on May 03, 2019, 07:19:02 pm
In update.bat resources.zip includes src\resources\images\12x12\*.png, this folder does not exist.
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on May 04, 2019, 01:13:14 pm
@darmar:
I've made a simple script to gather all sizes in a single image, so I can compare images and see if there are problems.
An example output images could be seen here: http://cmpt.benbmp.org/codeblocks/images/
From the images it is obvious that size 40x40 is not right. It needs to be lighter. Now it looks bolder/darker than both 32x32 and 48x48 or bigger. And the jump from 32x32 is very abrupt.

This script also finds mismatches between image names. There are some.

If you're interested in the script I can make a pull request against your repo.
Title: Re: Problem with icons on HiDPI displays
Post by: BlueHazzard on May 07, 2019, 08:20:00 pm
We probably need all this for the wxSmith plugin too?
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on May 07, 2019, 08:39:49 pm
Yes, I'll get to it, but first I need to handle other more important icons. If you're interested to do the work for wxSmith I won't mind :)
Title: Re: Problem with icons on HiDPI displays
Post by: Miguel Gimenez on May 08, 2019, 04:10:14 pm
This morning i got an alert probably related to these HiDPI changes. When trying to rename a symbol using Code Refactoring a wxWdgets alert pops up indicating invalid bitmap.

The error is in line 74 of coderefactoring.cpp, the specified file (share\CodeBlocks\images\32x32\filefind.png) does not exist.

EDIT: found the same problem in three more files, proposed patch is attached

EDIT 2: created ticket 826, https://sourceforge.net/p/codeblocks/tickets/826/ (https://sourceforge.net/p/codeblocks/tickets/826/)
Title: Re: Problem with icons on HiDPI displays
Post by: BlueHazzard on May 08, 2019, 06:08:00 pm
I have a similar problem for all wxSmith icons... Still have to figure out what is going on...
I have deleted all output and devel folders and now i get this error message for all wxSmith icons..

It is working now... probably some mismatch with compiler options
Title: Re: Problem with icons on HiDPI displays
Post by: Miguel Gimenez on May 09, 2019, 11:56:38 am
The folder src\src\resources\images\22x22 is empty and can be removed, because 22x22 images are no longer used.

There are still references to 22x22 images, notably in XRC files and in ThreadSearch\update31

Code: [Select]
G:\Codeblocks312\src\plugins\compilergcc\resources\compiler_toolbar.xrc|7|<bitmap>images/22x22/compile.png</bitmap>|
G:\Codeblocks312\src\plugins\compilergcc\resources\compiler_toolbar.xrc|12|<bitmap>images/22x22/run.png</bitmap>|
G:\Codeblocks312\src\plugins\compilergcc\resources\compiler_toolbar.xrc|17|<bitmap>images/22x22/compilerun.png</bitmap>|
G:\Codeblocks312\src\plugins\compilergcc\resources\compiler_toolbar.xrc|22|<bitmap>images/22x22/rebuild.png</bitmap>|
G:\Codeblocks312\src\plugins\compilergcc\resources\compiler_toolbar.xrc|27|<bitmap>images/22x22/stop.png</bitmap>|
G:\Codeblocks312\src\plugins\compilergcc\resources\compiler_toolbar.xrc|39|<bitmap>images/22x22/select_target.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\BrowseTracker\BrowseTrackerToolbar.xrc|7|<bitmap>images/22x22/prev.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\BrowseTracker\BrowseTrackerToolbar.xrc|12|<bitmap>images/22x22/next.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\BrowseTracker\BrowseTrackerToolbar.xrc|18|<bitmap>images/22x22/mark.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\BrowseTracker\BrowseTrackerToolbar.xrc|23|<bitmap>images/22x22/mark_prev.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\BrowseTracker\BrowseTrackerToolbar.xrc|28|<bitmap>images/22x22/mark_next.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\BrowseTracker\BrowseTrackerToolbar.xrc|33|<bitmap>images/22x22/mark_clear.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\FortranProject\fortranproject.cpp|1128|tbSStr = _T("_22x22");|
G:\Codeblocks312\src\plugins\contrib\FortranProject\fpimagelist.cpp|20|prefix2 = ConfigManager::GetDataFolder() + _T("/images/fortranproject/22x22/");|
G:\Codeblocks312\src\plugins\contrib\FortranProject\resources\fortranprojecttoolbar.xrc|21|<object class="wxToolBarAddOn" name="fortran_project_toolbar_22x22">|
G:\Codeblocks312\src\plugins\contrib\FortranProject\resources\fortranprojecttoolbar.xrc|25|<bitmap>images/22x22/fprojectjumpback.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\FortranProject\resources\fortranprojecttoolbar.xrc|30|<bitmap>images/22x22/fprojectjumphome.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\FortranProject\resources\fortranprojecttoolbar.xrc|35|<bitmap>images/22x22/fprojectjumpforward.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\IncrementalSearch\IncrementalSearchToolbar.xrc|8|<bitmap>images/22x22/incsearchclear.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\IncrementalSearch\IncrementalSearchToolbar.xrc|14|<bitmap>images/22x22/incsearchprev.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\IncrementalSearch\IncrementalSearchToolbar.xrc|19|<bitmap>images/22x22/incsearchnext.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\IncrementalSearch\IncrementalSearchToolbar.xrc|24|<bitmap>images/22x22/incsearchhighlight.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\IncrementalSearch\IncrementalSearchToolbar.xrc|30|<bitmap>images/22x22/incsearchselectedonly.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\IncrementalSearch\IncrementalSearchToolbar.xrc|36|<bitmap>images/22x22/incsearchcase.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\IncrementalSearch\IncrementalSearchToolbar.xrc|42|<bitmap>images/22x22/incsearchregex.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|7|<bitmap>images/22x22/selecttool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|14|<bitmap>images/22x22/instrtool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|21|<bitmap>images/22x22/iftool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|26|<bitmap>images/22x22/switchtool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|33|<bitmap>images/22x22/whiletool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|38|<bitmap>images/22x22/dowhiletool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|43|<bitmap>images/22x22/fortool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|48|<bitmap>images/22x22/blocktool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|55|<bitmap>images/22x22/breaktool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|60|<bitmap>images/22x22/continuetool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|65|<bitmap>images/22x22/returntool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|72|<bitmap>images/22x22/glassptool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|77|<bitmap>images/22x22/glassntool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|84|<bitmap>images/22x22/sourceToggletool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\NassiShneiderman\nassi_shneiderman_toolbar.xrc|89|<bitmap>images/22x22/commentToggletool.png</bitmap>|
G:\Codeblocks312\src\plugins\contrib\ThreadSearch\update31|4|mkdir -p ../../../devel31/share/codeblocks/images/ThreadSearch/22x22 > /dev/null 2> /dev/null|
G:\Codeblocks312\src\plugins\contrib\ThreadSearch\update31|7|mkdir -p ../../../output31/share/codeblocks/images/ThreadSearch/22x22 > /dev/null 2> /dev/null|
G:\Codeblocks312\src\plugins\contrib\ThreadSearch\update31|12|cp ./resources/images/22x22/*.png ../../../devel31/share/codeblocks/images/ThreadSearch/22x22/ > /dev/null 2> /dev/null|
G:\Codeblocks312\src\plugins\contrib\ThreadSearch\update31|15|cp ./resources/images/22x22/*.png ../../../output31/share/codeblocks/images/ThreadSearch/22x22/ > /dev/null 2> /dev/null|
G:\Codeblocks312\src\sdk\xtra_res.cpp|67|finalName.Replace(wxT("22x22"), m_PathReplaceString);|
G:\Codeblocks312\src\src\resources\debugger_toolbar.xrc|7|<bitmap>images/22x22/dbgrun.png</bitmap>|
G:\Codeblocks312\src\src\resources\debugger_toolbar.xrc|12|<bitmap>images/22x22/dbgrunto.png</bitmap>|
G:\Codeblocks312\src\src\resources\debugger_toolbar.xrc|17|<bitmap>images/22x22/dbgnext.png</bitmap>|
G:\Codeblocks312\src\src\resources\debugger_toolbar.xrc|22|<bitmap>images/22x22/dbgstep.png</bitmap>|
G:\Codeblocks312\src\src\resources\debugger_toolbar.xrc|27|<bitmap>images/22x22/dbgstepout.png</bitmap>|
G:\Codeblocks312\src\src\resources\debugger_toolbar.xrc|32|<bitmap>images/22x22/dbgnexti.png</bitmap>|
G:\Codeblocks312\src\src\resources\debugger_toolbar.xrc|37|<bitmap>images/22x22/dbgstepi.png</bitmap>|
G:\Codeblocks312\src\src\resources\debugger_toolbar.xrc|42|<bitmap>images/22x22/dbgpause.png</bitmap>|
G:\Codeblocks312\src\src\resources\debugger_toolbar.xrc|47|<bitmap>images/22x22/dbgstop.png</bitmap>|
G:\Codeblocks312\src\src\resources\debugger_toolbar.xrc|53|<bitmap>images/22x22/dbgwindow.png</bitmap>|
G:\Codeblocks312\src\src\resources\debugger_toolbar.xrc|58|<bitmap>images/22x22/dbginfo.png</bitmap>|
G:\Codeblocks312\src\src\resources\main_toolbar.xrc|10|<bitmap>images/22x22/filenew.png</bitmap>|
G:\Codeblocks312\src\src\resources\main_toolbar.xrc|15|<bitmap>images/22x22/fileopen.png</bitmap>|
G:\Codeblocks312\src\src\resources\main_toolbar.xrc|20|<bitmap>images/22x22/filesave.png</bitmap>|
G:\Codeblocks312\src\src\resources\main_toolbar.xrc|25|<bitmap>images/22x22/filesaveall.png</bitmap>|
G:\Codeblocks312\src\src\resources\main_toolbar.xrc|31|<bitmap>images/22x22/undo.png</bitmap>|
G:\Codeblocks312\src\src\resources\main_toolbar.xrc|35|<bitmap>images/22x22/redo.png</bitmap>|
G:\Codeblocks312\src\src\resources\main_toolbar.xrc|41|<bitmap>images/22x22/editcut.png</bitmap>|
G:\Codeblocks312\src\src\resources\main_toolbar.xrc|46|<bitmap>images/22x22/editcopy.png</bitmap>|
G:\Codeblocks312\src\src\resources\main_toolbar.xrc|51|<bitmap>images/22x22/editpaste.png</bitmap>|
G:\Codeblocks312\src\src\resources\main_toolbar.xrc|57|<bitmap>images/22x22/filefind.png</bitmap>|
G:\Codeblocks312\src\src\resources\main_toolbar.xrc|62|<bitmap>images/22x22/searchreplace.png</bitmap>|
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on May 09, 2019, 07:27:40 pm
1. 22x22 in *toolbar.xrc is fine. It is replaced with the proper string for the selected resolution. I guess we could change it to something more meaningful.
2. update31 should all be removed. I'll do it soon.
3. I don't have any 22x22 folder. I guess someone with svn should remove the empty folders. Git just removes them, I guess, without telling svn.
4. FortranProject is maintained by darmar.
Title: Re: Problem with icons on HiDPI displays
Post by: BlueHazzard on May 12, 2019, 10:59:09 pm
linux mint 18
if i run ./update30 i get
Code: [Select]
codeblocks_sf/src$ ./update30
./update30: 2: ./update30: source: not found

and for
./update
Code: [Select]
codeblocks_sf/src$ ./update
Updating Linux version.
./update: 26: ./update: Syntax error: "(" unexpected (expecting "}")

I had to replace the first line with
Code: [Select]
#!/bin/bash
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on May 12, 2019, 11:48:13 pm
Bleh, I guess dash doesn't support source. :(

Can you replace it with either (note the dot at the beginning)
Code: [Select]
. ./update

or just
Code: [Select]
./update

And tell me which works for you?
Title: Re: Problem with icons on HiDPI displays
Post by: darmar on May 18, 2019, 06:48:59 pm
I have a question: What icons are still needed?

For example, wxSmith plugin has 16x16 and 32x32 size icons. Do we need other size icons?
How with the SciptedWizard?
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on May 18, 2019, 07:35:00 pm
I don't know yet, I have a list of things which I have to make hidpi aware.

Currently we use 16x16 as scale 1.0x and we have images up to 64x64 which is 4.0x. So, I guess we need most of the image in these scales. The start here page would probably work fine with only 1x and 2x scales (no in-betweens and no bigger scales).

If you make atlases you'll see that some images aren't spelled correctly. I'd be happy if you can fix those, first. :)

p.s. For wxSmith we would need all scales 1-4x + in-betweens.
p.p.s. For the scripted wizard probably the same 1-4x.
Title: Re: Problem with icons on HiDPI displays
Post by: darmar on May 18, 2019, 09:27:32 pm
Thank you, oBFusCATed, for the reply and your contribution to 'hidpi' things in general.

Atlases are cool idea. I already fixed misspelled icon names few hours ago.

I was asking because Specialmart, a guy which created most of the svg icons, maybe could contribute further his efforts in the coming summer. So, I will ask him to start from wxSmith icons.

 
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on June 25, 2019, 08:47:54 pm
I've just found that some of the images used for the project tree aren't provided for all new sizes.
This is the list of the missing icons:
Code: [Select]
rc-file-added.png
rc-file-conflict.png
rc-file-external.png
rc-file-gotlock.png
rc-file-lockstolen.png
rc-file-mismatch.png
rc-file-missing.png
rc-file-modified.png
rc-file-noncontrolled.png
rc-file-outofdate.png
rc-file-requireslock.png
rc-file-uptodate.png
vfolder_open.png
Would it be possible to talk to Specialmart if he wants/can to do them?
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on July 14, 2019, 06:09:15 pm
Also, I've copied the 16x16 icons to the cb-icons repo. Now it is easy to see if there are discrepancies. Would it be possible to ask Specialmart if he can find some time to fix them?
Title: Re: Problem with icons on HiDPI displays
Post by: oBFusCATed on August 02, 2019, 04:02:11 pm
My work the HiDPI stuff is almost done. I'm waiting for the wxsmith I icons. The last big thing that needs to be done is the start here page fix. But wxHtmlWindow need improvements, so I'm not sure how I'd proceed with it. But this will wait for a bit.

GTK3 + HiDPI is totally broken. I'll try to find some time in the future to work on this. The problems are mostly in wx in my opinion.