mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 21:09:27 +02:00
anchordocking: default close button if theme does not support it
git-svn-id: trunk@31704 -
This commit is contained in:
parent
441839dd38
commit
e0b91a2f5e
@ -1683,14 +1683,18 @@ end;
|
||||
procedure TAnchorDockMaster.CreateCloseButtonBitmap;
|
||||
var
|
||||
BitmapHandle,MaskHandle: HBITMAP;
|
||||
OrigBitmap: TBitmap;
|
||||
OrigBitmap: TCustomBitmap;
|
||||
begin
|
||||
if fCloseBtnBitmap<>nil then exit;
|
||||
ThemeServices.GetStockImage(idButtonClose,BitmapHandle,MaskHandle);
|
||||
OrigBitmap:=TBitmap.Create;
|
||||
OrigBitmap.Handle:=BitmapHandle;
|
||||
if MaskHandle<>0 then
|
||||
OrigBitmap.MaskHandle:=MaskHandle;
|
||||
|
||||
if ThemeServices.GetStockImage(idButtonClose,BitmapHandle,MaskHandle) then begin
|
||||
OrigBitmap:=TBitmap.Create;
|
||||
OrigBitmap.Handle:=BitmapHandle;
|
||||
if MaskHandle<>0 then
|
||||
OrigBitmap.MaskHandle:=MaskHandle;
|
||||
end
|
||||
else
|
||||
OrigBitmap := GetDefaultButtonIcon(idButtonClose);
|
||||
DockMaster.fCloseBtnBitmap:=TBitmap.Create;
|
||||
with DockMaster.fCloseBtnBitmap do begin
|
||||
SetSize(HeaderButtonSize,HeaderButtonSize);
|
||||
|
@ -1456,7 +1456,7 @@ begin
|
||||
if fCompilerMessages.Count = 0 then fCompilerMessages.SetDefault;
|
||||
UseMsgFile := aXMLConfig.GetValue(p+'CompilerMessages/UseMsgFile/Value', False);
|
||||
MsgFileName := aXMLConfig.GetValue(p+'CompilerMessages/MsgFileName/Value', '');
|
||||
if UseMsgFile and FileExists(MsgFileName) then
|
||||
if UseMsgFile and FileExistsCached(MsgFileName) then
|
||||
fCompilerMessages.LoadMsgFile(MsgFileName);
|
||||
|
||||
for i := 0 to fCompilerMessages.Count - 1 do begin
|
||||
|
Loading…
Reference in New Issue
Block a user