summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-01 12:31:12 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-01 12:36:07 +0200
commit75da40a254a6d3c44b6d6fec6c4b0c7a96555acc (patch)
tree1ab46e56505516a976154678c0b92bccc80cbef3
parentfe9eb4c712a6d62f03529d1bfeab83d7bbaf7eec (diff)
downloadfpGUI-75da40a254a6d3c44b6d6fec6c4b0c7a96555acc.tar.xz
fpg_colorwheel: Improved the look of components while on Designer Form.
For speed reasons we paint a basic look of the components while busy in UI Designer.
-rw-r--r--src/gui/fpg_colorwheel.pas20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/gui/fpg_colorwheel.pas b/src/gui/fpg_colorwheel.pas
index 43ebb8a9..22ab15cc 100644
--- a/src/gui/fpg_colorwheel.pas
+++ b/src/gui/fpg_colorwheel.pas
@@ -197,12 +197,16 @@ begin
// but draw an outline
Canvas.SetLineStyle(1, lsDash);
Canvas.DrawRectangle(GetClientRect);
+ Canvas.SetLineStyle(1, lsSolid);
+ Canvas.Color := clUIDesignerGreen;
+ Canvas.FillArc(FMarginWidth, FMarginWidth, DrawWidth, DrawHeight, 0, 360);
Canvas.Color := clHilite1;
- Canvas.DrawArc(Width div 2, Height div 2, DrawWidth div 2 + 1,
- DrawHeight div 2 + 1, 45, 180);
+ Canvas.DrawArc(FMarginWidth, FMarginWidth, DrawWidth, DrawHeight, 45, 180);
Canvas.Color := clShadow1;
- Canvas.DrawArc(Width div 2, Height div 2, DrawWidth div 2 + 1,
- DrawHeight div 2 + 1, 225, 180);
+ Canvas.DrawArc(FMarginWidth, FMarginWidth, DrawWidth, DrawHeight, 225, 180);
+ Canvas.TextColor := clShadow1;
+ Canvas.DrawText(5, 5, Name + ': ' + ClassName);
+ DrawCursor;
Exit; //==>
end;
@@ -427,13 +431,19 @@ begin
begin
// when designing just draw
// a rectangle to indicate
+ Canvas.Color := clBlack;
Canvas.SetLineStyle(1, lsDash);
Canvas.DrawRectangle(GetClientRect);
if (Width < MarginWidth * 2) or (Height < MarginWidth * 2) then
Exit; //==>
r := GetClientRect;
- InflateRect(r, FMarginWidth, FMarginWidth);
+ InflateRect(r, -FMarginWidth, -FMarginWidth);
+ Canvas.Color := clShadow1;
+ Canvas.SetLineStyle(1, lsSolid);
Canvas.DrawRectangle(r);
+ Canvas.TextColor := clShadow1;
+ Canvas.DrawText(5, 5, Width, Height, Name + ': ' + ClassName, TextFlagsDflt + [txtWrap]);
+ DrawCursor;
exit;
end;