Author Topic: Toolbar icon size also applied to menu icons  (Read 6190 times)

Offline sodev

  • Regular
  • ***
  • Posts: 497
Toolbar icon size also applied to menu icons
« on: June 19, 2019, 12:52:33 am »
I recently updated my CodeBlocks from r11712 to r11742 and discovered some annoying bug or feature. I'm using CodeBlocks on a 55" 4K screen with no scaling applied, to better see the icons in the toolbar i picked a bigger size. Now in the current revision this size also gets applied to the icons in the menus which causes the entries with icons to become huge with lots of space around the labels while the entries without icons stay in the regular size.

This looks really weird and makes menus with many icons quite larger, in the help menu the resizing does not work correctly, the icons get cut off. Is this intended behavior? If it is, it would be nice if it could be switched off.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Toolbar icon size also applied to menu icons
« Reply #1 on: June 19, 2019, 08:00:30 am »
This is not the case on my windows 10 machine, so it seems to be a bug?

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: Toolbar icon size also applied to menu icons
« Reply #2 on: June 19, 2019, 08:32:54 am »
Oh, maybe i should have mentioned that im on Windows 10 too. Since you are not affected it might also be related to wxWidgets, after all i'm not using a release version but some git snapshot. When i'm at work again i can figure out the revision. But i'm quite sure i've build both CodeBlocks revisions with the same wxWidgets revision, but i will check that too.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Toolbar icon size also applied to menu icons
« Reply #3 on: June 19, 2019, 09:59:08 am »
I can confirm the issue.

Windows 10 Pro 1809 (64 bits) with wx3.1.2 (32 bits), C::B revision 11742.

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: Toolbar icon size also applied to menu icons
« Reply #4 on: June 19, 2019, 08:13:05 pm »
I used wxWidgets f668f5b36ff36e40b50876b86171082c1cd791f4 with both CodeBlocks revisions and everything is build as 32 bit.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Toolbar icon size also applied to menu icons
« Reply #5 on: June 20, 2019, 11:08:09 am »
Sorry... somehow i did not a fresh build...
I see this behavior too on windows 10 wx3.1.2 latest svn...

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Toolbar icon size also applied to menu icons
« Reply #6 on: June 20, 2019, 11:30:31 am »
All the images are managed now by cbArtProvider; It is constructed with the desired toolbar image size, and only returns this size to all callers.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Toolbar icon size also applied to menu icons
« Reply #7 on: June 24, 2019, 08:09:37 pm »
This was done on purpose, because I don't want to introduce too many option controls...
(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: Toolbar icon size also applied to menu icons
« Reply #8 on: June 29, 2019, 03:58:45 pm »
@sodev: Fixed in rev11754 let me know if it works correctly now for your setup.
(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 sodev

  • Regular
  • ***
  • Posts: 497
Re: Toolbar icon size also applied to menu icons
« Reply #9 on: July 01, 2019, 09:56:58 pm »
@oBFusCATed: Thanks, works almost, now only some icons are still using the scale factor. To be precise, in the Search menu the icon Incremental search and in the DoxyBlocks menu all icons but the last two.

Does this @-notation do something special here or can i spare it if you have answered last?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Toolbar icon size also applied to menu icons
« Reply #10 on: July 02, 2019, 12:19:42 am »
Ok, I'll fix those.
The @ is not doing anything special, but even if it did I don't receive notifications by mail. :)
(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: Toolbar icon size also applied to menu icons
« Reply #11 on: July 14, 2019, 06:50:49 pm »
@sodev: What icon size do you use on your TV? I'm thinking how to handle scaling automagically and probably I'll limit the available sizes to make things less confusing and automatic.
(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: Toolbar icon size also applied to menu icons
« Reply #12 on: July 14, 2019, 08:35:09 pm »
This is what I have in mind. Testing of the attached patch is welcome. I'll wait some time and commit it if there are no complaints! :)
(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 sodev

  • Regular
  • ***
  • Posts: 497
Re: Toolbar icon size also applied to menu icons
« Reply #13 on: July 15, 2019, 11:20:59 pm »
Looks like im lucky that im using 24x24 which is your Large value. Although im a fan of options i can click the automatic scale adjustments do work quite nice, i tested the range 100% - 200%.

You probably know about the missing icons in the file pane in higher scalings (only red squares for me there) and its not related to the patch anyway. Also not related to the patch is that the Normal size is too small in every scaling for me, the choice controls make the toolbars much higher and the icons end up on the top.

For some reason TortoiseSVN doesn't like the patch file format and applies nothing, using git did work though.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Toolbar icon size also applied to menu icons
« Reply #14 on: July 16, 2019, 07:59:00 am »
I know about the tree icons.

The space issue is caused by this: https://sourceforge.net/p/codeblocks/tickets/846/ (I'll find some time to fix it)
(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!]