Author Topic: Problem with icons on HiDPI displays  (Read 26393 times)

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Problem with icons on HiDPI displays
« Reply #15 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...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with icons on HiDPI displays
« Reply #16 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline darmar

  • Multiple posting newcomer
  • *
  • Posts: 68
Re: Problem with icons on HiDPI displays
« Reply #17 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with icons on HiDPI displays
« Reply #18 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with icons on HiDPI displays
« Reply #19 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline darmar

  • Multiple posting newcomer
  • *
  • Posts: 68
Re: Problem with icons on HiDPI displays
« Reply #20 on: February 10, 2019, 12:39:20 pm »
Specialmart told me, thank in a commit message is OK.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with icons on HiDPI displays
« Reply #21 on: February 10, 2019, 01:49:01 pm »
Should I use 'Specialmart' or some real name?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline darmar

  • Multiple posting newcomer
  • *
  • Posts: 68
Re: Problem with icons on HiDPI displays
« Reply #22 on: February 10, 2019, 03:13:22 pm »
Specialmart is OK.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Problem with icons on HiDPI displays
« Reply #23 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline darmar

  • Multiple posting newcomer
  • *
  • Posts: 68
Re: Problem with icons on HiDPI displays
« Reply #24 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.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with icons on HiDPI displays
« Reply #25 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Problem with icons on HiDPI displays
« Reply #26 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
From 9fa06dff4ecceb602411b34e925f061089cf17d5 Mon Sep 17 00:00:00 2001
From: Tim S <stahta01@gmail.com>
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

« Last Edit: March 03, 2019, 10:47:10 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with icons on HiDPI displays
« Reply #27 on: March 04, 2019, 12:16:35 am »
Does switching to 16x16 icons work correctly? Do you see images in all four core toolbars?
« Last Edit: March 04, 2019, 02:32:01 am by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with icons on HiDPI displays
« Reply #28 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Problem with icons on HiDPI displays
« Reply #29 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
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org