This is not Linux-Qt related, this is Oxygen related. Other themes work OK. 
Hardcoding 1 or 2 pixels is IMO not good idea, it may cause troubles elsewhere.
I tested ThemeServices.GetDetailSize and it gives the same output for 
tbCheckBoxCheckedDisabled, tbCheckBoxCheckedNormal and tbCheckBoxCheckedHot (or 
..Unchecked... variants).

This code:

procedure TForm1.Button1Click(Sender: TObject);
var aDetail: TThemedElementDetails;
aRect: TRect;
aSize: TSize;
begin
aDetail:=ThemeServices.GetElementDetails(tbCheckBoxUncheckedNormal);
aSize:=ThemeServices.GetDetailSize(aDetail);
aRect:=Rect(5, 5, 5+aSize.cx, 5+aSize.cy);
writeln('Inactive ', aSize.cy);
ThemeServices.DrawElement(Image1.Canvas.Handle, aDetail, aRect);
aDetail:=ThemeServices.GetElementDetails(tbCheckBoxCheckedHot);
aSize:=ThemeServices.GetDetailSize(aDetail);
aRect:=Rect(25, 5, 25+aSize.cx, 5+aSize.cy);
writeln('Focused ', aSize.cy);
ThemeServices.DrawElement(Image1.Canvas.Handle, aDetail, aRect);
end;
gives output

Inactive 21
Focused 21

and paint checkboxes (see attachment).

However, I didn't see code of OICheckBoxes, so I cannot say where is problem.

Vojtěch
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus 
<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to