lcl: add more stock buttons

git-svn-id: trunk@19781 -
This commit is contained in:
paul 2009-05-03 12:58:48 +00:00
parent 14bd4ea660
commit a460f26890
4 changed files with 19 additions and 2 deletions

View File

@ -153,6 +153,9 @@ begin
idButtonAll: StockName := GTK_STOCK_APPLY;
idButtonIgnore: StockName := GTK_STOCK_DELETE;
idButtonRetry: StockName := GTK_STOCK_REFRESH;
idButtonOpen: StockName := GTK_STOCK_OPEN;
idButtonSave: StockName := GTK_STOCK_SAVE;
idButtonShield: StockName := GTK_STOCK_DIALOG_AUTHENTICATION;
idDialogWarning : StockName := GTK_STOCK_DIALOG_WARNING;
idDialogError: StockName := GTK_STOCK_DIALOG_ERROR;

View File

@ -354,12 +354,14 @@ begin
idButtonAll: AStdPixmap := QStyleSP_DialogApplyButton;
idButtonIgnore: AStdPixmap := QStyleSP_DialogDiscardButton;
idButtonRetry: AStdPixmap := QStyleSP_BrowserReload; // ?
idButtonOpen: AStdPixmap := QStyleSP_DialogOpenButton;
idButtonSave: AStdPixmap := QStyleSP_DialogSaveButton;
idButtonShield: AStdPixmap := QStyleSP_VistaShield;
idDialogWarning : AStdPixmap := QStyleSP_MessageBoxWarning;
idDialogError: AStdPixmap := QStyleSP_MessageBoxCritical;
idDialogInfo: AStdPixmap := QStyleSP_MessageBoxInformation;
idDialogConfirm: AStdPixmap := QStyleSP_MessageBoxQuestion;
idDialogShield: AStdPixmap := QStyleSP_VistaShield;
else
begin
Result := inherited GetStockImage(StockID, Image, Mask);

View File

@ -160,7 +160,7 @@ begin
idDialogError : IconHandle := LoadImage(0, IDI_ERROR, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE or LR_SHARED);
idDialogInfo : IconHandle := LoadImage(0, IDI_INFORMATION, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE or LR_SHARED);
idDialogConfirm: IconHandle := LoadImage(0, IDI_QUESTION, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE or LR_SHARED);
idDialogShield :
idDialogShield:
begin
FillChar(SHIconInfo, SizeOf(SHIconInfo), 0);
SHIconInfo.cbSize := SizeOf(SHIconInfo);
@ -169,6 +169,15 @@ begin
else
IconHandle := 0;
end;
idButtonShield:
begin
FillChar(SHIconInfo, SizeOf(SHIconInfo), 0);
SHIconInfo.cbSize := SizeOf(SHIconInfo);
if (SHGetStockIconInfo(SIID_SHIELD, SHGFI_ICON or SHGFI_SMALLICON, @SHIconInfo) = S_OK) then
IconHandle := SHIconInfo.hIcon
else
IconHandle := 0;
end;
else
IconHandle := 0;
end;

View File

@ -1601,6 +1601,9 @@ const
idButtonAll = idButtonBase + 10;
idButtonYesToAll = idButtonBase + 11;
idButtonNoToAll = idButtonBase + 12;
idButtonOpen = idButtonBase + 13;
idButtonSave = idButtonBase + 14;
idButtonShield = idButtonBase + 15;
idDialogBase = $FF;
idDialogWarning = idDialogBase + 1;