Grid lines too pronounced in dark skins

Viewing 20 posts - 1 through 20 (of 21 total)
  • Author
    Posts
  • #56223
    HeDiBo
    Participant

      Unfortunately 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.

      #56226
      TAZ
      Participant

        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.

        #56227
        Stephane Senecal
        Participant

          From 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 2001

          #56232
          HeDiBo
          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.

            #56233
            TAZ
            Participant

              Yeah, 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.

              #56244
              HeDiBo
              Participant

                Since this is a general problem for skins that use grids. the handling of all dark skins has to be changed.

                #56253
                Support
                Keymaster

                  The 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…

                  #56257
                  HeDiBo
                  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.

                    #56263
                    Stephane Senecal
                    Participant

                      I'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 2001

                      #56265
                      HeDiBo
                      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.

                        #56266
                        Stephane Senecal
                        Participant

                          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.

                          Stephane Senecal
                          CIS Group
                          Delphi programmer since 2001

                          #56268
                          HeDiBo
                          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.

                            #56286
                            Stephane Senecal
                            Participant

                              By “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 2001

                              #56312
                              Support
                              Keymaster

                                I think, I have found a workaround. I will try to implement it in the nearest release (v12.01)

                                #56313
                                HeDiBo
                                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 a7.gif

                                  #56324
                                  HeDiBo
                                  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. a3.gif

                                    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?

                                    #56325
                                    HeDiBo
                                    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.

                                      #56327
                                      HeDiBo
                                      Participant

                                        I 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.

                                        #56332
                                        Support
                                        Keymaster

                                          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.

                                          #56333
                                          HeDiBo
                                          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?

                                          Viewing 20 posts - 1 through 20 (of 21 total)
                                          • You must be logged in to reply to this topic.