Page 1 of 5

Project Tree improvements

Posted: Sun Sep 07, 2014 4:15 am
by rrTea
It would probably be easier to read if the comments in the Project Tree were a bit lighter. Also if the type and the name were swapped, it'd reduce the "stairs" effect that one bumps into when going through the list. I'm attaching an example.

Edit: cropped the image

Posted: Sun Sep 07, 2014 5:39 pm
by VilleK
Seems like a good idea. I'm going to implement this unless someone has good arguments against it.

Posted: Mon Sep 08, 2014 11:49 am
by VilleK
Turned out that I've tried to do this before (painting comments in gray) but the built in Treeview in Delphi makes it difficult. And I don't want to change to a 3rd party treeview component just for this. I'll have to put it on hold until I can find a solution.

Posted: Mon Sep 08, 2014 12:15 pm
by jph_wacheski
implementation aside, looks like a good readability improvement,. .

Posted: Wed Sep 10, 2014 8:16 am
by VilleK
I've made an attempt of fixing this now. You can try it here:

http://www.zgameeditor.org/files/ZGameEditor_beta.zip

It is only the comments that are gray, I haven't switched name/types because some components show a property value as part of the caption. I.e. "PlaySound Sound1" could either mean "play sound1" or "a PlaySound component named Sound1". If the name comes first there is no such ambiguity.

Posted: Wed Sep 10, 2014 7:49 pm
by Rado1
I do not like the latest change too much because comments become gray and are worse to read. I use comments very frequently to keep order in larger projects, so they are important. Instead of gray I would suggest to use another color, but should be sufficiently visible (in all themes).

Posted: Thu Sep 11, 2014 2:56 am
by rrTea
Rado1 is right, in its current implementation the readability is a problem.

I think adding another color would end up messy because the icons in the project tree are pretty colorful already.

It seems to me that the problem is not using gray (gray per se is not an instant readability killer as long as the contrast is high enough, speaking as a designer) but rather something else: the comments are a bit too close in brightness / tone to the rest of the text. …in fact I went and checked it and the rest of the text is off, not the comments! For some reason they are not black but dark grey. See for yourself.

Posted: Thu Sep 11, 2014 7:52 am
by VilleK
Here the text definitely is RGB 0,0,0. I checked in a paint program. This is with default "Windows" style selected in ZGE. Are you sure you didn't check a pixel at the edges of the text? They could be antialised at the edges.

If we pick another color for the comments it has to be one that works with other styles too (with "Golden graphite" background is black etc).

I've used system color clGrayText now which is supposed to change with styles but I notice in golden graphite it takes the same color as the other text.

Posted: Thu Sep 11, 2014 8:05 am
by rrTea
Oh that's right, I'm using a theme (Turquoise Gray). Yes I'm pretty sure I didn't check a pixel at the edges since I'm not using AAed text. I didn't know themes can change even the color of the text in the Project Tree.

This particular theme works really well for me (I prefer the text to be slightly lighter, just so the contrast is not too stark) but I'll probably tweak it a bit if the new rendering of comments ends up approved.

Posted: Thu Sep 11, 2014 10:07 am
by Rado1
Some styles look good (e.g. Carbon), but the Windows style is not very good if the Windows Classic theme is used, see the screenshot.

Posted: Thu Sep 11, 2014 11:36 am
by VilleK
Change color "clInactiveCaptionText" which seems to offer better contrast in most styles. Please download and check it out.

http://www.zgameeditor.org/files/ZGameEditor_beta.zip

Posted: Thu Sep 11, 2014 11:50 am
by Rado1
Hi Ville, the current version is even worse that the previous one on windows Classic; see the screenshot.

Posted: Thu Sep 11, 2014 12:03 pm
by VilleK
Strange, here it looks like this:

Posted: Thu Sep 11, 2014 12:05 pm
by Rado1
But I use Windows Classic (similar to Windows 98 ) theme and you are using one of the Aero themes.

Posted: Fri Sep 12, 2014 9:35 am
by VilleK
So final color is dependent on both Window style and Delphi style. Tricky to get something that will always guarantee good contrast then.

I've made another attempt. Please download and try again.