summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--images/themes/vista/button.bmpbin10134 -> 62210 bytes
-rw-r--r--prototypes/fpgui2/tests/themetest.lpr24
-rw-r--r--src/corelib/gdi/gfx_gdi.pas4
3 files changed, 8 insertions, 20 deletions
diff --git a/images/themes/vista/button.bmp b/images/themes/vista/button.bmp
index 4ce0a459..5093c350 100644
--- a/images/themes/vista/button.bmp
+++ b/images/themes/vista/button.bmp
Binary files differ
diff --git a/prototypes/fpgui2/tests/themetest.lpr b/prototypes/fpgui2/tests/themetest.lpr
index fe17a37b..c194e571 100644
--- a/prototypes/fpgui2/tests/themetest.lpr
+++ b/prototypes/fpgui2/tests/themetest.lpr
@@ -18,7 +18,7 @@ uses
gfx_extinterpolation,
gui_trackbar,
gui_style,
- gui_dialogs, fpgui_toolkit;
+ gui_dialogs;
type
{ Note:
@@ -49,7 +49,7 @@ type
destructor Destroy; override;
{ this property is only for demo purposes! }
property ThemeImage: TfpgImage read image write SetThemeImage;
- property Masked: Boolean read FMasked write FMasked;
+ property Masked: Boolean read FMasked write FMasked default False;
property ThemeBorder: Integer read FThemeBorder write FThemeBorder default 3;
end;
@@ -429,6 +429,7 @@ var
iy, y: integer;
w: integer;
pofs: integer;
+ ow, oh: integer;
begin
Canvas.BeginDraw;
// inherited HandlePaint;
@@ -448,16 +449,9 @@ 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, FThemeBorder, state, FMasked);
+ ow := image.Width div 5; // 5 states
+ oh := image.Height;
+ PaintPartScaledImage(image, Canvas, 0, 0, ow, oh, Width, Height, FThemeBorder, state, FMasked);
(*
x := 0;
{ left }
@@ -646,14 +640,12 @@ begin
vista := TThemeButton.Create(self);
vista.Left := 20;
vista.Top := 145;
- vista.Width := 100;
- vista.Height := 26;
+ vista.Width := 101; //75;
+ vista.Height := 41; //24;
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);
diff --git a/src/corelib/gdi/gfx_gdi.pas b/src/corelib/gdi/gfx_gdi.pas
index 9bf66d0c..601aa317 100644
--- a/src/corelib/gdi/gfx_gdi.pas
+++ b/src/corelib/gdi/gfx_gdi.pas
@@ -1338,14 +1338,10 @@ end;
procedure TfpgWindowImpl.DoSetWindowTitle(const atitle: string);
begin
- {$ifdef wince}
- Windows.SetWindowText(WinHandle, PWideChar(Utf8Decode(ATitle)));
- {$else}
if UnicodeEnabledOS then
Windows.SetWindowTextW(WinHandle, PWideChar(Utf8Decode(ATitle)))
else
Windows.SetWindowText(WinHandle, PChar(Utf8ToAnsi(ATitle)));
- {$endif}
end;
procedure TfpgWindowImpl.DoSetMouseCursor;