Skip to content
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

Update tree node icons #1168

Open
rowo360 opened this issue Dec 19, 2024 · 9 comments · May be fixed by #1169
Open

Update tree node icons #1168

rowo360 opened this issue Dec 19, 2024 · 9 comments · May be fixed by #1169
Assignees

Comments

@rowo360
Copy link
Contributor

rowo360 commented Dec 19, 2024

Describe the bug
I propose that we update the icons used in the tree view for the test outcomes.
Here's a screenshot to show the context:

These icons are available in four different styles: 'Default', 'Circles', 'Classic' and 'Visual Studio'. All of them should be updated.

An update is necessary because most of these icons do not have a transparent background. That missing transparent background gets visible when using these icons in the outcome filter toolbar. (Introduced for feature #1163)

As a consequence the icons for the style 'Circles' and 'Classic' must be converted from jpg to png files, because transparency is only supported in png format.

And finally I noticed that some icons in the 'Circles' and 'Classic' style are not displayed correctly on a 4k monitor. I didn't notice it on other displays, so it might be related to scaling. But ultimately it doesn't look pretty.

Expected behavior
All these icons should use a transparent background and should be displayed correctly on all kind of displays (incl. 4K)

Environment (please complete the following information):

  • TestCentric Version 2.0Beta
  • OS: Windows 11
  • Target Runtime for your test assembly: .NET Framework 4.8
@rowo360 rowo360 self-assigned this Dec 19, 2024
@rowo360
Copy link
Contributor Author

rowo360 commented Dec 19, 2024

When I zoom-in in depth into these 16x16 icons for 'Circles' and 'Classic', it reveals that the various pixels are not that homogenous as expected. That might be the reason that they are displayed unpretty on my 4k display.

I'm not a designer, but I could try to modify these icons by keeping the original look but taking care that they are displayed correctly. But I would first add some transparency at the borders, convert to png format and observe the result.

@CharliePoole
Copy link
Contributor

Not surprising. Those two were originally designed on a 640x480 display! And of course, I'm not a designer either. :-)

@rowo360
Copy link
Contributor Author

rowo360 commented Dec 21, 2024

I laughed out loud when I read your comment about 640x480 displays!

@rowo360
Copy link
Contributor Author

rowo360 commented Dec 21, 2024

Before starting a second career as a designer, I preferred to look at something technical:
That's why I read articles about High DPI, icon resolutions, WindowsForms and especially Treeview and ImageList.
There are lots of recommendations and also settings whose effects I could not immediately recognize.

But in the end I found the property ColorDepth of the ImageList, which is set to its default value Depth8Bit in our case. If I set this property to Depth32Bit, the artifacts on my 4k Display are immediately gone.
Here's a screenshot:

That make sense and are good news. If the system starts to scale those images and the color depth is limited then some artifacts might occur. That might even occur if I started to create new images, so I believe this ColorDepth setting is essential.

@rowo360
Copy link
Contributor Author

rowo360 commented Dec 21, 2024

Here's some additional consideration:
After reading the recommendations, I thought it might be worth to increase the image resolution - for example 32x32 pixel.
But I failed with this approach: the toolbar buttons (outcome filter toolbar) manages to handle this resolution properly, but the TreeView fails - either the entire item height is enlarged to display the entire image or the item height remains but then only a fraction of the image is shown. I didn't find any option that the image is scaled to fit in the available item height of a tree view.

Another idea might be to introduce 32x32 images only for the toolbar - but I don't see any benefit here.
So I propose that we stick with 16x16 pixel images.

@rowo360
Copy link
Contributor Author

rowo360 commented Dec 21, 2024

My idea now is to use the ColorDepth property and leave the icons unchanged, except for the transparency.
I'll check one-by-one, but I think that only a few images needs to be adapted in the 'Default' and 'Visual Studio' style. But all images in 'Circles' and 'Classic' are missing the transparency.

@rowo360
Copy link
Contributor Author

rowo360 commented Dec 21, 2024

I can also report that I have tried to create new images for the 'Circles' style - in case we prefer to adapt the images (maybe only the 'Circles' style which we need to adapt for transparency anyway)
But it's difficult to judge! First of all, the pictures look different, but do they look better? This probably also depends on personal views.
Here's a screenshot with the original 'Circle' icons on the left and 3 new ideas on the right.
(Solid is real solid now without any pixelate)

@rowo360
Copy link
Contributor Author

rowo360 commented Dec 21, 2024

A little bit off topic:
While reading this HighDPI stuff, it was mentioned that there are new features in this area with version ".Net framework 4.8". However I noticed that TestCentric is targeting ".Net framework 4.6.2". I see no important or necessary reason to change this, except to stay up to date. So I'm just mentioning it here... :-)

@CharliePoole
Copy link
Contributor

Most people will be running under 4.8 these days anyway, so it's possible. They will receive the benefit of any improvements unless those improvements require us to make some call that's not available under 4.6.2. If that's the case, we can upgrade our build at some point.

@rowo360 rowo360 linked a pull request Dec 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants