- This topic has 21 replies, 4 voices, and was last updated 8 years, 1 month ago by
Support.
-
AuthorPosts
-
March 2, 2017 at 12:07 pm #56223
HeDiBo
ParticipantUnfortunately it's not in third party grids this problem occurs.
This is an example of a TsListView in Notes Leather skin:
[attachment=8184:TsListView1.jpg]
This will be a shock: the same TsListView in Cappuccino skin:
[attachment=8185:TsListView2.jpg]
It's simply hideous.
March 2, 2017 at 12:51 pm #56226TAZ
ParticipantThis is interesting. According to my Cappuccino, grid lines are more pronounced which are not great but not bad. It would be cool to have grid line thickness but the result maybe the same. Using v11.26.
Perhaps the black background being used causes the grid lines to become really pronounced. One thing you could check is putting both images under a microscope and verify their thickness. Also, the light one's edges might blend more into the background than the dark's ones edges. You never know.
March 2, 2017 at 1:24 pm #56227Stephane Senecal
ParticipantFrom the code it seems to be using the system color for inactive borders.
As a suggestion, I think it would be better to take the background color of the list and make it darker unless it is a dark background, in that case make it lighter.
Or it could also be that we could set the grid line color at the same place where we can set the colors of odd and even rows in the skin editor.
Stephane Senecal
CIS Group
Delphi programmer since 2001March 2, 2017 at 4:27 pm #56232HeDiBo
Participant'TAZ' wrote:This is interesting. According to my Cappuccino, grid lines are more pronounced which are not great but not bad. It would be cool to have grid line thickness but the result maybe the same. Using v11.26.
Perhaps the black background being used causes the grid lines to become really pronounced. One thing you could check is putting both images under a microscope and verify their thickness. Also, the light one's edges might blend more into the background than the dark's ones edges. You never know.
Your picture is for a two column list. That looks not too bad.
My picture was for a 14 column list. That looks absolutely awful.
March 2, 2017 at 6:22 pm #56233TAZ
ParticipantYeah, I understand. My font size is 12 (larger in the normal sense) because of distance possibilities. If it was the font size that you are using, mine probably would look bad, too. It is all relative. I still would like the idea of adding grid line size.
March 4, 2017 at 4:25 pm #56244HeDiBo
ParticipantSince this is a general problem for skins that use grids. the handling of all dark skins has to be changed.
March 5, 2017 at 9:42 am #56253Support
KeymasterThe problem is that grid lines are drawn by the Windows system, used color is clBtnFace there.
I have no idea currently how it may be changed by the skin-engine. We can change clBtnFace color for application, but this color may be used in other places and this color will be incorrect there…
March 5, 2017 at 10:35 am #56257HeDiBo
Participant'Support' wrote:The problem is that grid lines are drawn by the Windows system, used color is clBtnFace there.
Maybe that's the answer. AC should paint the grid lines itself.
March 6, 2017 at 2:06 pm #56263Stephane Senecal
ParticipantI've seen on other website that suggest to paint over the lines each time they are drawn.
Alternatively, HeDiBo, you could change the TsListView for a TVirtualStringTree from VirtualTreeView, but it's a big change.
Stephane Senecal
CIS Group
Delphi programmer since 2001March 6, 2017 at 4:43 pm #56265HeDiBo
Participant'Support' wrote:The problem is that grid lines are drawn by the Windows system, used color is clBtnFace there.
Have a look at this picture:
[attachment=8198:Dark Grid.jpg]
It is a TsDBGrid shown with Cappuccino skin. Apparently darker lines are possible.
March 6, 2017 at 5:25 pm #56266Stephane Senecal
ParticipantTsDBGrid is a VCL control build from scratch. It is not based on Windows' LISTVIEW control. It (DBGrid) can do whatever it wants. Contrairy to the LISTVIEW control. You set colors and Windows paint them. But there is no color property for the grid lines.
Stephane Senecal
CIS Group
Delphi programmer since 2001March 6, 2017 at 10:42 pm #56268HeDiBo
Participant'Stephane wrote:TsDBGrid is a VCL control build from scratch. It is not based on Windows' LISTVIEW control. It (DBGrid) can do whatever it wants. Contrairy to the LISTVIEW control. You set colors and Windows paint them. But there is no color property for the grid lines.
The Listview has these events:
OnCustomDraw, OnCustomDrawItem, OnCustomDrawSubItem, OnAdvancedCustomDraw, OnAdvancedCustomDrawItem, and OnAdvancedCustomDrawSubItem
they are called regardless of the OwnerDraw property.
The CustomDraw procedure is a protected class and overridable. So, that's a nice point to custom draw the cells of the TsListView.
Also the TsListView manipulates the OnAdvancedCustomDrawItem event already. Looks like a good place to tend to the cells.
By the way, TsDBGrid is not built from scratch. It derives from the TDBGrid class. But the drawing of the cells is indeed taken over completely.
March 7, 2017 at 2:04 pm #56286Stephane Senecal
ParticipantBy “build from scratch”, I meant that all the drawing is done by the delphi code.
I just wanted to help you to go on with your project.
To AlphaSkins Support : Can you tell Mr. HeDiBo if he has any chances to get the feature he wants or he should think about replacing TsListView with something else?
Thank you.
Good Bye!
Stephane Senecal
CIS Group
Delphi programmer since 2001March 11, 2017 at 5:17 pm #56312Support
KeymasterI think, I have found a workaround. I will try to implement it in the nearest release (v12.01)
March 12, 2017 at 11:06 am #56313HeDiBo
Participant'Support' wrote:I think, I have found a workaround. I will try to implement it in the nearest release (v12.01)
That would be brilliant
March 14, 2017 at 5:15 pm #56324HeDiBo
Participant'Support' wrote:I think, I have found a workaround. I will try to implement it in the nearest release (v12.01)
It works well now in a TsListView.
However I still have a problem with third party components, that are set to adhere to “GRID”.
Example is TjvDBGrid.
Can you apply a similar approach as you did with TsListView?
March 15, 2017 at 1:29 pm #56325HeDiBo
Participant'Support' wrote:I think, I have found a workaround. I will try to implement it in the nearest release (v12.01)
I'm still having problems with the new gridlines in TsListView.
This is the result for the Cappuccino skin:
[attachment=8206:Dark Gridlines 30.jpg]
Because the gridlines are so dark now, you don't see them anymore.
This is the result if the grid lines are drawn in 100% Palette[pcEditText]:
[attachment=8207:Dark Gridlines 100.jpg]
I'm not saying the 100% EditText color is the one to use for all skins. But for dark skins it is much better.
March 17, 2017 at 2:07 pm #56327HeDiBo
ParticipantI did some testing and I noticed that you use a 77% setting in the Developer Express Grids.
I tried that, and I found that this is a universally correct setting:
Code:Palette[pcGrid] := BlendColors(Palette[pcEditText], Palette[pcEditBG], 77);Hope you can change this.
March 21, 2017 at 10:41 am #56332Support
KeymasterI'm planning to add a special field in the skin editor tool and each skin will have own grid color.
Your code will be used for skins where this color is undefined.
March 21, 2017 at 10:56 am #56333HeDiBo
Participant'Support' wrote:I'm planning to add a special field in the skin editor tool and each skin will have own grid color.
Your code will be used for skins where this color is undefined.
Would that work for third party grids too?
-
AuthorPosts
- You must be logged in to reply to this topic.