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

Offline BlueHazzard

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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with icons on HiDPI displays
« Reply #31 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.
(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 #32 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?
(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 #33 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.
(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 #34 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.
« Last Edit: March 16, 2019, 09:58:26 am by darmar »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with icons on HiDPI displays
« Reply #35 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.
(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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Problem with icons on HiDPI displays
« Reply #36 on: March 18, 2019, 12:32:56 am »
Can test it on win 10 and mint 18 this week

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with icons on HiDPI displays
« Reply #37 on: March 18, 2019, 12:44:42 am »
Good. I've pushed some fixes for windows. I have to test them on linux/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 BlueHazzard

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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with icons on HiDPI displays
« Reply #39 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.
(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 #40 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.
(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 BlueHazzard

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

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Problem with icons on HiDPI displays
« Reply #42 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), 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:
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Problem with icons on HiDPI displays
« Reply #43 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.
« Last Edit: April 08, 2019, 11:59:44 am by Miguel Gimenez »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Problem with icons on HiDPI displays
« Reply #44 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?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.