Hi!
I have found some Glow-Button-Behavior which doesn't look good for me.
I think it is better when you see what I mean.
I have made some Funktions to set the Button-Style for myself.
You can also see the "problem" if you don't use them but it is easier to see
when using it so let's have an example with them:
1) Create a new project (VCL, Delphi) with RAD Studio 10.2 Tokyo (just to be sure the problem can be seen this way).
2) Add "AdvGlowButton" to the upper uses.
3) Insert the Button-Style-Funktions:
Procedure SetGlowButtonCheckAppearance(button : TAdvGlowButton);
Begin
button.Appearance.Color := clWhite;
button.Appearance.ColorDisabled := clWhite;
button.Appearance.ColorDisabledTo := clWhite;
button.Appearance.ColorHot := clWhite;
button.Appearance.ColorHotTo := clWhite;
button.Appearance.ColorMirror := clWhite;
button.Appearance.ColorMirrorDisabled := clWhite;
button.Appearance.ColorMirrorDisabledTo := clWhite;
button.Appearance.ColorMirrorHot := clWhite;
button.Appearance.ColorMirrorHotTo := clWhite;
button.Appearance.ColorMirrorTo := clWhite;
button.Appearance.ColorTo := clWhite;
button.Appearance.ColorChecked := clBlue;
button.Appearance.ColorCheckedTo := clBlue;
button.Appearance.ColorDown := clBlue;
button.Appearance.ColorDownTo := clBlue;
button.Appearance.ColorMirrorChecked := clBlue;
button.Appearance.ColorMirrorCheckedTo := clBlue;
button.Appearance.ColorMirrorDown := clBlue;
button.Appearance.ColorMirrorDownTo := clBlue;
button.Appearance.SystemFont := False;
button.Rounded := False;
End;
Procedure CheckGlowButtonDown(button : TAdvGlowButton);
var
TheTextColor : TColor;
TheBorderColor : TColor;
Begin
if (button.Down) then
Begin
TheTextColor := clWhite;
TheBorderColor := clBlue;
End Else
Begin
TheTextColor := clBlack;
TheBorderColor := clSilver;
End;
// TextColor
button.Font.Color := TheTextColor;
button.Appearance.TextColor := TheTextColor;
button.Appearance.TextColorChecked := TheTextColor;
button.Appearance.TextColorDown := TheTextColor;
button.Appearance.TextColorHot := TheTextColor;
// BorderColor
button.Appearance.BorderColor := TheBorderColor;
button.Appearance.BorderColorChecked := TheBorderColor;
button.Appearance.BorderColorCheckedHot := TheBorderColor;
button.Appearance.BorderColorDisabled := TheBorderColor;
button.Appearance.BorderColorDown := TheBorderColor;
button.Appearance.BorderColorFocused := TheBorderColor;
button.Appearance.BorderColorHot := TheBorderColor;
End;
Than make a FromCreate like this:
procedure TForm1.FormCreate(Sender: TObject);
var
iPos : Integer;
btnTemp : TAdvGlowButton;
begin
for iPos := 0 to 10 do
Begin
btnTemp := TAdvGlowButton.Create(Self);
btnTemp.Parent := Self;
btnTemp.Name := 'btn_Temp_' + IntToStr(iPos);
btnTemp.ParentFont := True;
btnTemp.Width := ClientWidth - 10;
btnTemp.Height := 25;
btnTemp.Left := 5;
btnTemp.Top := 5 + iPos * (25 + 5);
btnTemp.Caption := btnTemp.Name;
btnTemp.GroupIndex := 0;
btnTemp.Style := bsButton;
SetGlowButtonCheckAppearance(btnTemp);
CheckGlowButtonDown(btnTemp);
End;
end;
Ready!
If you click on one Button and let the mouse right there, the button stays dark-blue.
When you move the mouse to another Button and click on the same button again
the blue color disappears instantly after Mouse-Up.
You can see this behavior on the other buttons too.
I would like to see the second behavior with the first click.
I hope you can reproduce the problem, think the same about the "first-click-behavior"
and can find the issue quickly.
So, thanks for reading so far and have a great day.
Greetings from Germany
Peter Nomden