summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-04-16 17:02:13 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-04-16 17:02:13 +0200
commitcd2ba1d3d29e3fb5a62791a7d46dbf744ff3cff0 (patch)
treeee5e01055296c71839b99f3536b541b1deabb9b3 /src
parentfea8a8494f264c243c39bf47b282673a74d418b5 (diff)
downloadfpGUI-cd2ba1d3d29e3fb5a62791a7d46dbf744ff3cff0.tar.xz
edtbtn + UI Designer: Tweaked the designer look a bit more.
I found that I often set preset values [Filename, Directory] and would actually like to see those values in the designer form. Now I hide the Classname and output the property content in a differnt color - this is still distinguishable from a standard Edit + Button. I use different colors for the text (not sure what else will look better)
Diffstat (limited to 'src')
-rw-r--r--src/gui/fpg_editbtn.pas24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/gui/fpg_editbtn.pas b/src/gui/fpg_editbtn.pas
index ed151af6..501ac05a 100644
--- a/src/gui/fpg_editbtn.pas
+++ b/src/gui/fpg_editbtn.pas
@@ -226,9 +226,17 @@ begin
Canvas.Clear(clBoxColor);
fpgStyle.DrawControlFrame(Canvas, 0, 0, Width - Height, Height);
fpgStyle.DrawButtonFace(Canvas, Width - Height, 0, Height, Height, [btfIsEmbedded]);
- Canvas.TextColor := clShadow1;
Canvas.SetFont(fpgApplication.DefaultFont);
- Canvas.DrawText(0, 0, Width - Height, Height, ClassName, [txtHCenter, txtVCenter]);
+ if Filename <> '' then
+ begin
+ Canvas.TextColor := clText3;
+ Canvas.DrawText(4, 0, Width - Height, Height, Filename, [txtLeft, txtVCenter]);
+ end
+ else
+ begin
+ Canvas.TextColor := clShadow1;
+ Canvas.DrawText(0, 0, Width - Height, Height, ClassName, [txtHCenter, txtVCenter]);
+ end;
img := fpgImages.GetImage('stdimg.folderfile'); // don't free the img instance - we only got a reference
if img <> nil then
Canvas.DrawImage(Width-Height+((Height-img.Width) div 2), (Height-img.Height) div 2, img);
@@ -328,9 +336,17 @@ begin
Canvas.Clear(clBoxColor);
fpgStyle.DrawControlFrame(Canvas, 0, 0, Width - Height, Height);
fpgStyle.DrawButtonFace(Canvas, Width - Height, 0, Height, Height, [btfIsEmbedded]);
- Canvas.TextColor := clShadow1;
Canvas.SetFont(fpgApplication.DefaultFont);
- Canvas.DrawText(0, 0, Width - Height, Height, ClassName, [txtHCenter, txtVCenter]);
+ if Directory <> '' then
+ begin
+ Canvas.TextColor := clText3;
+ Canvas.DrawText(4, 0, Width - Height, Height, Directory, [txtLeft, txtVCenter]);
+ end
+ else
+ begin
+ Canvas.TextColor := clShadow1;
+ Canvas.DrawText(0, 0, Width - Height, Height, ClassName, [txtHCenter, txtVCenter]);
+ end;
img := fpgImages.GetImage('stdimg.folder'); // don't free the img instance - we only got a reference
if img <> nil then
Canvas.DrawImage(Width-Height+((Height-img.Width) div 2), (Height-img.Height) div 2, img);