Moonlight skin issue #2

Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #34770
    Hamilton
    Participant

    I don't know if you could truly describe this as an issue but I'll throw it out there..

    In my app I use DevExpress grids and want to enable themed row bands and selection highlight. There is no automated way of doing this (that I'm aware of) so what I am doing is taking the skin manager global and highlight color and font color and applying those to the grid manually. This works fine for the other skins I'm using but for Moonlight I end up with the same colour for the alternate row as I have for the selection. It seems strange that the highlight would ever be the same as the global settings and I wonder if this part of the skin is setup properly.

    The code I'm using to get the colors is as follows:

    sSkinManager1.GetGlobalColor;

    sSkinManager1.GetGlobalFontColor;

    sSkinManager1.GetHighLightColor(False);

    sSkinManager1.GetHighLightFontColor(False);

    I don't want to manually edit my skin here as it breaks forward compatibility with other changes that might occur and I cannot update the skin every 2 weeks when a new version of AlphaControls becomes available so what I'd really appreciate is either a change in the skin provided (if that won't break things) or suggestions on how I might better implement my banded and selection row colours.

    TIA.

    #46672
    Support
    Keymaster

    I'm sorry, I not quite understand a problem. You have received wrong colors?

    #46678
    HeDiBo
    Participant
    'Support' wrote:

    I'm sorry, I not quite understand a problem. You have received wrong colors?

    I think the complaint is that in the Moonlight skin the colors for Highlight and for Global appear to be the same.

    #46679
    Support
    Keymaster
    #46731
    Hamilton
    Participant

    Hi Serge,

    I'm sorry but I've given you some wrong information in my previous post, sorry I had some incorrect comments against the code for the grid and I had didn't realize it didn't worked as documented, and as a consequence your fix doesn't do what I want it to do.. Apologies, allow me to explain what I meant to say..

    1) My #1 preference would be if the AC skinning of cxGrids from DevExpress included supplying the color for the banded rows. In the grid, this involves setting the DBGridListView.Styles.ContentOdd property. Currently the skinning of the grid does successfully skin the title bar and selected row (see below), and perhaps some other properties as well.

    2) The AC skinning of cxGrids sets the color of the highlighted row but not the banded rows. I'm currently coding around this manually by including a cxStyleRepository in my project and setting the colors the selected row as follows:

    cxStyle4 .Color := sSkinManager1.GetHighLightColor(False);

    cxStyle4 .Font.Color := sSkinManager1.GetHighLightFontColor(False);

    The other code I included that uses GetGlobalColor is *wrong*, I'm actually using the GlobalColor to show the selected row when the grid doesn't have focus, which isn't relevant to this post..

    Anyway with all of the other themes I'm using in my project (including BlueGlass, Golden, iOS4, NextAlpha, Office2010 Blue, Opus and Web) the color of the selected row is different to the value returned by GetHighlightColor and thus I end up with a nicely banded grid with a distinct color for the selected row. With Moonlight, GetHighlightColor returns the same color as is used by the grid for the selected row, and you can't always see what row is selected.

    TLDR: For the moonlight theme, GetHighLightColor returns the same color as the cxGrid uses for the selected row. All other themes that I've tested don't work like this. Any chance this could be changed? Or better yet, implement skinning of cxGrids at a lower level so I don't have to do it manually 😛

    TIA and apologies once more for the incorrect info posted in the OP.

    #46736
    Hamilton
    Participant

    Screenshot attached.

    #46782
    Support
    Keymaster

    Hello

    As I understand – you want to have odd and even colors? But cxGrid uses them automatically, special defining of such colors is not needed.

    Quote:
    For the moonlight theme, GetHighLightColor returns the same color as the cxGrid uses for the selected row.

    I think, you can receive combinations of colors by using MixColors function, example :

    Code:
    function TcxACLookAndFeelPainter.DefaultVGridLineColor: TColor;
    begin
    if Skinned then Result := MixColors(DefaultManager.GetActiveEditFontColor, DefaultManager.GetActiveEditColor, 0.3) else Result := inherited DefaultVGridLineColor;
    end;

    function TcxACLookAndFeelPainter.DefaultVGridBandLineColor: TColor;
    begin
    if Skinned then Result := MixColors(DefaultManager.GetActiveEditFontColor, DefaultManager.GetActiveEditColor, 0.3) else Result := inherited DefaultVGridBandLineColor;
    end;

    #46795
    Hamilton
    Participant

    EDIT: Thx Serge looking at this now.

    #46796
    Hamilton
    Participant

    Hi Serge,

    I've worked this out now. The code to set the banding may have been introduced before the component supported this or may have just been an oversight. What complicated the investigation is that the default theme for the app is WEB and for that skin the banding doesn't show as the two colours are too close. If you look *very* closely at the screen shot on my previous post the grid that doesn't look like it has a band is using the WEB skin; it actually does have a band it is just extremely faint. Perhaps an update to the WEB skin could improve this.

    Thanks for the help.

    Regards,

    Hamilton

    #46799
    Support
    Keymaster

    Can you send me this test-application? I will check a skin with this program after changing.

    #46840
    Hamilton
    Participant

    Hi Serge,

    Please find the test program attached. After extracting the contents from the zip you'll just need to enter your skin path then you should be good to go. I've put the current BlueGlass and WEB skins in the default folder as placeholders.

    Cheers,

    Hamilton

    #46857
    Support
    Keymaster

    Thank you, please try version 7.52

    #46863
    Hamilton
    Participant

    Hi Serge,

    My initial impression was that the banding is subtle but distinct; however after using the grid for longer I think if there is a lot of data then the banding is too subtle. The attached image compares the same grid with Office2010Blue and WEB themes. To my eye, in the column with the “Test2” values you can see the banding fairly well for both skins but if you have a grid that contains more data like the final column then you cannot see the rows at all. IMO the banding should be a few shades darker. What do you think?

    Regards,

    Hamilton

    #46925
    Support
    Keymaster

    Look what I have with your demo.

    Why we have different colors?

    #46929
    Hamilton
    Participant

    Hi Serge,

    I tried the test app here on 3 PC's using the latest skins from AC 7.53 and the banding is not as pronounced on any of them as it is on your screen shots. The attached images show

    1. How the Office2010 Blue and WEB skins look on my PC.

    2. How the WEB skin looks on my PC with your screen shot in the background.

    The second image is the interesting one – it really highlights how different what I'm seeing is based on what you've produced, and it rules out the vagaries of monitor colors I think because on my monitor I can see the bands in your screen shot quite clearly. It's as if the skin in the distributable is different to what you're using internally but I'm sure you would have checked that so I'm not sure what else it could be.

    Regards,

    Hamilton

    #46932
    Support
    Keymaster

    Which version of the cxGrid do you uses?

    #46933
    Hamilton
    Participant

    DevExpress 6.57, Delphi 2010 with all updates. I plan to update to the latest version of DevExpress when they have fixed the compatibility problems with XE2.

    Unless you recompiled the code I provided for the test app we should be able to exclude these versions as variables? And if you did recompile would you consider running the .exe I supplied and let me know if the colors are the same?

    #46934
    Support
    Keymaster

    So, you uses an old acLFPainter6.pas file?

    Try this updated unit in your application.

    #46952
    Hamilton
    Participant

    Cheers Serge that fixes the problem. The changes to the “DefaultContentOddColor” method do make the bands more distinct with the WEB skin as well as several others I had noticed had faint bands before. I also had a quick look through all the skins and I can't see that the change has 'broken' anything so this seems good to include in the next release. Thanks again.

    Regards,

    Hamilton

    #46981
    Hamilton
    Participant

    The updated code has been released in v7.54; it looks good so I'll close this issue.

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