lcl: toolbutton remove offset from pushed glyph. Neither win32 nor Gtk2 do that. Needed for consequent painting of glyph and text.

git-svn-id: trunk@50898 -
This commit is contained in:
ondrej 2015-12-18 09:40:58 +00:00
parent a974fc4459
commit 4c66be7f26

View File

@ -390,17 +390,7 @@ begin
// draw icon
if (ImgList<>nil) then
begin
// Down=True causes the details to be in Checked state (rather than Pushed)
// That caused downed checkbuttons to draw an image without offset. see bug rep #16975
if ThemeServices.IsPushed(Details) or ThemeServices.IsChecked(Details) then
begin
inc(IconPos.X);
inc(IconPos.Y);
end;
ImgList.Draw(Canvas, IconPos.X, IconPos.Y, ImgIndex, Enabled);
end;
// draw text
if (TextSize.cx > 0) then