TTMSFNCDatePicker color part 2

Good afternoon to all,
with this component there is one more "action" to fix (or i have to resolve).
Now by setting default style to false i can set the control color as desidered (for example gree).
When i "open" the calendar the control color switch back to default color (normaly seems gray). There's a way to change the control color when i click on it and open the calendar?
OS: Android 11 - 15

Thank's in advance
Bes regards
Daniele

Old posts

After investigation i got (better to say i hope to got) where the "problem is".
I can understand that this not so easy to fix but this piece of code must be check.

unit FMX.TMSFNCGraphics;
procedure TTMSFNCGraphics.DrawButton(ARect: TRectF; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0);
var
  r: TRectF;
begin
  r := ARect;
  Stroke.Kind := gskSolid;
  Stroke.Width := 1;
  Fill.Kind := gfkSolid;

  if AAdaptToStyle then
  begin
    if AEnabled then
    begin
      if not AFocused then
      begin
        Stroke.Color := TTMSFNCGraphics.DefaultButtonStrokeColor;
        Fill.Color := TTMSFNCGraphics.DefaultButtonFillColor;
      end
      else
      begin
          (* 
           when click on the control in order to show the calendar dropdown component,
           this code block force to redraw the control with the default color
           override custom color.
           In this case i force to redraw the control with RED color when the calendar is show.
           In order to consider customization need one more property, one more setting clolor 
           procedure and one  more check (for example):
         
           Property CustomColor : Boolean;
          
           TTMSFNCGraphics.CustomButtonFillColorFocused where set the custom color
         
           and 
           
           If Customcolor  Fill.Color := TTMSFNCGraphics.CustomButtonFillColorFocused
           else
           Fill.Color := TTMSFNCGraphics.DefaultButtonFillColorFocused;  

           Of course this will be made in all blocks where control is painted.

          *)
        Stroke.Color := TTMSFNCGraphics.DefaultButtonStrokeColorFocused;
        Fill.Color := TAlphaColors.red; //TTMSFNCGraphics.DefaultButtonFillColorFocused;
      end;
    end
    else
    begin
      Stroke.Color := TTMSFNCGraphics.DefaultButtonStrokeColorDisabled;
      Fill.Color := TTMSFNCGraphics.DefaultButtonFillColorDisabled;
    end;
  end
  else
  begin
  ....... code continue .....

I can't made any change because is "main source code" and at next relase will be lost.
Please consider this in one of new release.

Thank's for the attention

Best regards

Daniele

Hi,

Can you please check your private messages for an incremental source update on the TTMSFNCDatePicker?