diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-08 13:01:48 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-08 13:01:48 +0000 |
commit | 02117d94c83422011dc8d87b3f30329f54f6ec51 (patch) | |
tree | 6d85874535f61036014a026058426364909b8b5d /prototypes/fpgui2 | |
parent | 70f99df9962bd08c9982e0c2bed68d4314ca3e61 (diff) | |
download | fpGUI-02117d94c83422011dc8d87b3f30329f54f6ec51.tar.xz |
* Just playing with themes again.
Diffstat (limited to 'prototypes/fpgui2')
-rw-r--r-- | prototypes/fpgui2/tests/themetest.lpr | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/prototypes/fpgui2/tests/themetest.lpr b/prototypes/fpgui2/tests/themetest.lpr index 308c0064..6ef9a55e 100644 --- a/prototypes/fpgui2/tests/themetest.lpr +++ b/prototypes/fpgui2/tests/themetest.lpr @@ -422,6 +422,17 @@ begin State := 0; end; + //if Assigned(image) then + //begin + //try + //image.CreateMaskFromSample(0, 0); + //image.UpdateImage; + //except + //raise Exception.Create('Failed to create ImageMask in TThemeButton'); + //end; + //end; + PaintPartScaledImage(image, Canvas, 0, 0, 32, 21, Width, Height, 3, state); +(* x := 0; { left } Canvas.DrawImagePart(x, 0, image, state*32, 0, 3, 21); @@ -430,7 +441,7 @@ begin Canvas.DrawImagePart(i, 0, image, (state*32)+3, 0, 1, 21); { right } Canvas.DrawImagePart(i, 0, image, (state*32)+29, 0, 3, 21); - +*) if Focused and (not Embedded) then begin Canvas.SetColor(clText1); @@ -496,6 +507,7 @@ begin if x < 3 then x := 3; + Canvas.TextColor := TextColor; Canvas.DrawString(x + pofs, y + pofs, FText); Canvas.EndDraw; @@ -572,6 +584,7 @@ end; procedure TMainForm.CreateButtons; var bmp: TfpgImage; + vista: TThemeButton; begin btnClose := TfpgButton.Create(self); btnClose.Width := 75; @@ -597,7 +610,20 @@ begin bmp.CreateMaskFromSample(0, 0); bmp.UpdateImage; xpsilver.ThemeImage := bmp; - + + vista := TThemeButton.Create(self); + vista.Left := 20; + vista.Top := 145; + vista.Width := 100; + vista.Height := 26; + vista.TextColor := clWhite; + vista.FontDesc := 'Arial-10:bold'; + vista.Text := 'Vista'; + bmp := LoadImage_BMP(SetDirSeparators('../../../images/themes/vista/button.bmp')); + bmp.CreateMaskFromSample(0, 0); + bmp.UpdateImage; + vista.ThemeImage := bmp; + styledbutton := TStyledButton.Create(self); styledbutton.SetPosition(btnClose.Left-20, btnClose.Top-80, 75, 24); // styledbutton.Default := True; |