View Issue Details

IDProjectCategoryView StatusLast Update
0029603LazarusPackagespublic2016-02-06 16:21
ReporterBart BroersmaAssigned ToBart Broersma 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi386OSWindowsOS VersionWin7
Product Version1.7 (SVN)Product Buildr51439 
Target Version1.6Fixed in Version1.6 
Summary0029603: ChecBoxThemed: Wrong caption alignment for taLeftJustify
DescriptionWith Alignment = taLeftJustify the caption of TChecBoxThemed aligns wrong (at least when compared to a normal checkbox).
Steps To ReproduceUnzip attached sample project
Build, run
Pres the button "Alignment" tot toggle the aligment of both the standard and the themed checkbox and observe the difference in the alignment of the caption.
See also attached screenshot.
Additional InformationThe yellow edit's are anchored to the checkboxes to mark their left and right border (just for conveience).
TagsNo tags attached.
Fixed in Revisionr51531
LazTarget1.6
Widgetset
Attached Files
  • cb.zip (66,634 bytes)
  • cbthemed.diff (761 bytes)
    Index: components/lazcontrols/checkboxthemed.pas
    ===================================================================
    --- components/lazcontrols/checkboxthemed.pas	(revision 51454)
    +++ components/lazcontrols/checkboxthemed.pas	(working copy)
    @@ -366,7 +366,7 @@
         aCheckBoxPoint.Y := (ARect.Bottom + ARect.Top - CheckBoxSize.cy) div 2;
         if ARightToLeft xor (AAlignment = taLeftJustify) then begin  { Caption is on the Left }
           aCheckBoxPoint.X := ARect.Right - CheckBoxSize.cx;
    -      aCaptionPoint.X := aCheckBoxPoint.X - cIndent - aTextSize.cx;
    +      aCaptionPoint.X := ARect.Left;
         end else begin  { Caption is on the Right }
           aCheckBoxPoint.X := ARect.Left;
           aCaptionPoint.X := aCheckBoxPoint.X + cIndent + CheckBoxSize.cx;
    
    cbthemed.diff (761 bytes)

Activities

Bart Broersma

2016-02-06 16:05

developer  

cb.zip (66,634 bytes)

Bart Broersma

2016-02-06 16:05

developer  

Bart Broersma

2016-02-06 16:17

developer  

cbthemed.diff (761 bytes)
Index: components/lazcontrols/checkboxthemed.pas
===================================================================
--- components/lazcontrols/checkboxthemed.pas	(revision 51454)
+++ components/lazcontrols/checkboxthemed.pas	(working copy)
@@ -366,7 +366,7 @@
     aCheckBoxPoint.Y := (ARect.Bottom + ARect.Top - CheckBoxSize.cy) div 2;
     if ARightToLeft xor (AAlignment = taLeftJustify) then begin  { Caption is on the Left }
       aCheckBoxPoint.X := ARect.Right - CheckBoxSize.cx;
-      aCaptionPoint.X := aCheckBoxPoint.X - cIndent - aTextSize.cx;
+      aCaptionPoint.X := ARect.Left;
     end else begin  { Caption is on the Right }
       aCheckBoxPoint.X := ARect.Left;
       aCaptionPoint.X := aCheckBoxPoint.X + cIndent + CheckBoxSize.cx;
cbthemed.diff (761 bytes)

Bart Broersma

2016-02-06 16:18

developer   ~0089816

Pathc attached.

Issue History

Date Modified Username Field Change
2016-02-06 16:05 Bart Broersma New Issue
2016-02-06 16:05 Bart Broersma File Added: cb.zip
2016-02-06 16:05 Bart Broersma File Added: cbthemed_taleftjustify.png
2016-02-06 16:06 Bart Broersma LazTarget - => 1.8
2016-02-06 16:06 Bart Broersma Description Updated View Revisions
2016-02-06 16:17 Bart Broersma File Added: cbthemed.diff
2016-02-06 16:18 Bart Broersma Note Added: 0089816
2016-02-06 16:21 Bart Broersma Fixed in Revision => r51531
2016-02-06 16:21 Bart Broersma LazTarget 1.8 => 1.6
2016-02-06 16:21 Bart Broersma Status new => resolved
2016-02-06 16:21 Bart Broersma Fixed in Version => 1.6
2016-02-06 16:21 Bart Broersma Resolution open => fixed
2016-02-06 16:21 Bart Broersma Assigned To => Bart Broersma
2016-02-06 16:21 Bart Broersma Target Version 1.8 => 1.6
2016-02-06 16:21 Bart Broersma Status resolved => closed