ThemeServices return wrong state images for checkbox
Original Reporter info from Mantis: gaborboros @gaborboros-bgss
-
Reporter name: Gabor Boros
Original Reporter info from Mantis: gaborboros @gaborboros-bgss
- Reporter name: Gabor Boros
Description:
ThemeServices return wrong images for tbCheckBoxCheckedDisabled and tbCheckBoxMixedDisabled with KDE. Tried GNOME and Win32 (Qt and native) too and those works like a charm.
Steps to reproduce:
uses Themes, Types;
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
procedure DrawThemedButton(in_ThemedButton:TThemedButton;in_Pos:Integer);
var
Details:TThemedElementDetails;
R:TRect;
S:TSize;
begin
Details:=ThemeServices.GetElementDetails(in_ThemedButton);
S:=ThemeServices.GetDetailSize(Details);
R.Left:=in_Pos;
R.Right:=R.Left+S.cx;
R.Top:=0;
R.Bottom:=S.cy;
ThemeServices.DrawElement(Image1.Canvas.Handle,Details,R);
end;
var
i:TThemedButton;
tmpPos:Integer;
begin
Image1.Canvas.FillRect(Image1.ClientRect);
tmpPos:=0;
for i:=tbCheckBoxUncheckedNormal to tbCheckBoxMixedDisabled do
begin
DrawThemedButton(i,tmpPos);
Inc(tmpPos,25);
end;
end;
Mantis conversion info:
- Mantis ID: 26586
- OS: Ubuntu
- OS Build: 14.04.1
- Build: 46039
- Platform: Linux x86_64
- Version: 1.3 (SVN)
- Fixed in version: 1.3 (SVN)
- Fixed in revision: 46198 (#76de5178)
- Monitored by: » @gaborboros-bgss (Gabor Boros)
- Target version: 1.4