Hi,

I am playing with Qt for gain experience.
If query checkbox images from ThemeServices the images order different with KDE than others. Is it a KDE or Qt or Lazarus bug or what?

Qt4 is a good choice usually or GTK2 is better from Lazarus POV?


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;


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

Reply via email to