new layout

This commit is contained in:
2026-04-30 10:24:10 +03:00
parent 1b2fbfe2c8
commit ece5a70041
2 changed files with 173 additions and 98 deletions
+7 -5
View File
@@ -83,6 +83,8 @@ begin
end;
procedure TFlatButton.Paint;
const
CORNER = 3;
var
R: TRect;
TW, TH: Integer;
@@ -90,21 +92,21 @@ var
begin
R := ClientRect;
// Фон
if FActive then BG := FClrActive
else if FHot then BG := FClrHot
else BG := FClrNorm;
// Фон со скруглёнными углами
Canvas.Brush.Color := BG;
Canvas.Brush.Style := bsSolid;
Canvas.Pen.Style := psClear;
Canvas.FillRect(R);
Canvas.Pen.Color := BG;
Canvas.Pen.Style := psSolid;
Canvas.RoundRect(R.Left, R.Top, R.Right, R.Bottom, CORNER * 2, CORNER * 2);
// Рамка
Canvas.Pen.Style := psSolid;
Canvas.Pen.Color := FClrBorder;
Canvas.Brush.Style := bsClear;
Canvas.Rectangle(R);
Canvas.RoundRect(R.Left, R.Top, R.Right - 1, R.Bottom - 1, CORNER * 2, CORNER * 2);
// Текст
if FActive then Canvas.Font.Color := FClrTextAct