Caption in TsFloatButton not skinned

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #37821
    HeDiBo
    Participant

    Only if Style = fbsDefault is the caption somewhat skinned (but font stroke is very thin). Otherwise In dark skins the caption is not readable (black on dark).

    #57878
    Support
    Keymaster

    Can you show a screenshot, please?

    #57886
    HeDiBo
    Participant
    'Support' wrote:

    Can you show a screenshot, please?

    Run my test application and select Cappuccino as skin. In AC 13.12 it should work.

    [attachment=8740:acTestFB.zip]

    #57910
    Support
    Keymaster

    Thank you, I see

    How you think, which color should be used in text there, if background may have any color?

    Maybe you have an idea how to do it better.

    #57917
    HeDiBo
    Participant
    'Support' wrote:

    Thank you, I see

    How you think, which color should be used in text there, if background may have any color?

    Maybe you have an idea how to do it better.

    Add the properties CustomColorFont and CaptionLikeLabel.

    The first one, allows the programmer to choose the color, depending on the background known to him.

    The CaptionLikeLabel property makes the caption behave like a normal label, with the same behavior as far as font color is concerned.

    You could implement both, by implementing Caption internally as a bound label, bound to the image. The default would be then be a bound label, with property UseSkinColor disabled.

    Hope this helps 💖

    #57960
    HeDiBo
    Participant
    'Support' wrote:

    Thank you, I see

    How you think, which color should be used in text there, if background may have any color?

    Maybe you have an idea how to do it better.

    No change in 13.14 huh.gif

    #57983
    Support
    Keymaster

    Hello!

    1. Each item has the Font property which may be used by developer for a color specifying.

    Also, if CustomFont property is True, then may be specified font colors for different states of the item, in the PaintOptions property.

    This way allows to set required custom color.

    2. Caption of a FloatButton can't have behavior of label, because FloatButton hasn't a parent control and parent background color is unknown.

    FloatButton may be placed at any part of screen and parent background may be absent at all. This question is opened.

    #57995
    HeDiBo
    Participant
    'Support' wrote:

    Hello!

    1. Each item has the Font property which may be used by developer for a color specifying.

    Also, if CustomFont property is True, then may be specified font colors for different states of the item, in the PaintOptions property.

    This way allows to set required custom color.

    2. Caption of a FloatButton can't have behavior of label, because FloatButton hasn't a parent control and parent background color is unknown.

    FloatButton may be placed at any part of screen and parent background may be absent at all. This question is opened.

    What you're saying is: the Caption property of a Floating Button is mostly useless. In that case, eliminate it altogether. Now the user is lured into thinking it will work as a normal Caption. I still think my solution is good, because it honors all your predicaments but also adds a nice feature, being skin aware.

    #57996
    Support
    Keymaster

    Yes, Caption is mostly useless if button style is Transparent.

    There is no background in this case and color of background under the control may be any.

    Caption may be used as usual if button style is normal or round.

    I don't know how to implement your second suggestion – if there is no parent, then color may be any and I don't know which color will be better for text.Maybe you have an idea how to receive a better font color there.Main purpose of fully transparent button – is showing of images, I think.

    #58000
    HeDiBo
    Participant
    'Support' wrote:

    Yes, Caption is mostly useless if button style is Transparent.

    There is no background in this case and color of background under the control may be any.

    That is true, however the designer knows where the button is going yo be placed. Most of the time this is on a fixed place. If you give the possibility to color the caption just like a TsLabel would be colored, you're done. That's why I called this property CaptionLikeLabel.

    'Support' wrote:
    Caption may be used as usual if button style is normal or round.

    Even in that case, the color of the caption is wrong in dark skins.

    'Support' wrote:
    … if there is no parent, then color may be any and I don't know which color will be better for text. Maybe you have an idea how to receive a better font color there.

    I do not want to decide that, let the designer choose the CaptionLikeLabel property, and the color will be the text color according to the current skin.

    'Support' wrote:
    Main purpose of fully transparent button – is showing of images, I think.

    This is an example in my project of a transparent Floating Button with a caption:[attachment=8766:FloatBtn.jpg]

    Hope this clarifies things 😎

    #58004
    Support
    Keymaster

    I think, will be better to make a label color as default instead of black color.

    Because this caption always used like Label if button is transparent.

    Otherwise, font may be assigned by developer.

    #58005
    HeDiBo
    Participant
    'Support' wrote:

    I think, will be better to make a label color as default instead of black color.

    Because this caption always used like Label if button is transparent.

    Otherwise, font may be assigned by developer.

    I'm not sure what you mean, but I trust you're fine judgment on this 👌

    #58041
    HeDiBo
    Participant

    It works fine now a3.gif

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