Thank you Vojtěch for the TCheckBoxThemed component. I tested it under Windows 8.1 and found a small difference in Caption vertical position.
Please compare attached images checkboxthemed1.png (before patch) vs checkboxthemed2.png (after patch) and review attached diff file. Please apply if OK under QT/GTK2. Sandro On 29 November 2014 at 21:32, Vojtěch Čihák <vojtech.ci...@atlas.cz> wrote: > I'll try it next week. > > > > Vojtěch > > ______________________________________________________________ > > Od: Juha Manninen <juha.mannine...@gmail.com> > > Komu: Lazarus mailing list <lazarus@lists.lazarus.freepascal.org> > > Datum: 29.11.2014 21:07 > > Předmět: Re: [Lazarus] OI Checkboxes > > > > > > On Friday, November 28, 2014, Vojtěch Čihák <vojtech.ci...@atlas.cz> > wrote: > > TCheckBoxThemed is done: >> > I added it to LazControls package. Thanks. > Would you like to implement the Boolean editor using your component? > Otherwise it will take time as I have other duties in near future. > It should be selectable with an IFDEF, UseCheckboxThemed or similar. > Object Inspector is in IDEIntf package which already has LazControls as a > dependency. > Juha > > > > ---------- > > -- > _______________________________________________ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- > _______________________________________________ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > >
Index: components/lazcontrols/checkboxthemed.pas =================================================================== --- components/lazcontrols/checkboxthemed.pas (revisione 47031) +++ components/lazcontrols/checkboxthemed.pas (copia locale) @@ -360,7 +360,7 @@ if ARightToLeft then inc(aFlags, DT_RTLREADING); with ThemeServices.GetTextExtent(ACanvas.Handle, aDetails, ACaption, aFlags, nil) do begin aTextSize.cx := Right; - aTextSize.cy := Bottom + 2 * cFocusBorder; + aTextSize.cy := Bottom; end; aCaptionPoint.Y := (ARect.Bottom - aTextSize.cy) div 2; aCheckBoxPoint.Y := (ARect.Bottom - CheckBoxSize.cy) div 2; @@ -399,6 +399,8 @@ { Paint FocusRect around Caption } if AFocused then begin dec(aHelpRect.Left, cFocusBorder); + dec(aHelpRect.Top, cFocusBorder); + inc(aHelpRect.Bottom, cFocusBorder); inc(aHelpRect.Right, cFocusBorder); LCLIntf.SetBkColor(ACanvas.Handle, ColorToRGB(clBtnFace)); LCLIntf.DrawFocusRect(ACanvas.Handle, aHelpRect);
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus