View Issue Details

IDProjectCategoryView StatusLast Update
0021740LazarusLCLpublic2012-04-24 14:43
ReporterDavid Jenkins Assigned ToZeljan Rikalo  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version0.9.30.5 (SVN) 
Summary0021740: SetControlViewStyle called with Width > Height check in wrong order
DescriptionIt appears from tests that Height and Width checks in the TCarbonTrackBar.CreateWidget and TCarbonScrollBar.SetParams calls to SetControlViewStyle are in the wrong order.

SetControlViewStyle wants to measure the non-changing size of the control (for a horizontal trackbar the non-deviating widget height instead of the width that can vary with control size). If the width is greater than the height than the height is the widget size and the width is the control size. So it appears from investigation as well the Boolean ought to be

LCLObject.Width > LCLObject.Height

instead of the other way around.


Patch against rev 36681 attached
TagsNo tags attached.
Fixed in Revision36960
LazTarget-
WidgetsetCarbon
Attached Files

Activities

2012-04-13 17:03

 

carbonbars.pp.patch (947 bytes)   
--- /Users/djenkins/laz-changes/CarbonBarBug/carbonbars.pp	2012-04-10 16:16:02.000000000 
+++ /Users/djenkins/laz-changes/CarbonBarBug/carbonbars.pp.ss	2012-04-10 16:17:18.000000000 
@@ -309,7 +309,7 @@
 begin
   inherited BoundsChanged;
   SetControlViewStyle(Widget, StdTrackBarTinySize, StdTrackBarSmallSize, StdTrackBarNormalSize,
-    LCLObject.Height > LCLObject.Width);
+    LCLObject.Width > LCLObject.Height);
 end;
 
 {------------------------------------------------------------------------------
@@ -450,7 +450,7 @@
 procedure TCarbonScrollBar.BoundsChanged;
 begin
   inherited BoundsChanged;
-  SetControlViewStyle(Widget, StdScrollBarTinySize, StdScrollBarSmallSize, StdScrollBarNormalSize, LCLObject.Height > LCLObject.Width);
+  SetControlViewStyle(Widget, StdScrollBarTinySize, StdScrollBarSmallSize, StdScrollBarNormalSize, LCLObject.Width > LCLObject.Height);
 end;
 
 function TCarbonScrollBar.SetScrollInfo(SBStyle: Integer;
carbonbars.pp.patch (947 bytes)   

2012-04-19 21:15

 

svn_patch-21740 (987 bytes)   
Index: lcl/interfaces/carbon/carbonbars.pp
===================================================================
--- lcl/interfaces/carbon/carbonbars.pp	(revision 36681)
+++ lcl/interfaces/carbon/carbonbars.pp	(working copy)
@@ -309,7 +309,7 @@
 begin
   inherited BoundsChanged;
   SetControlViewStyle(Widget, StdTrackBarTinySize, StdTrackBarSmallSize, StdTrackBarNormalSize,
-    LCLObject.Height > LCLObject.Width);
+    LCLObject.Width > LCLObject.Height);
 end;
 
 {------------------------------------------------------------------------------
@@ -450,7 +450,7 @@
 procedure TCarbonScrollBar.BoundsChanged;
 begin
   inherited BoundsChanged;
-  SetControlViewStyle(Widget, StdScrollBarTinySize, StdScrollBarSmallSize, StdScrollBarNormalSize, LCLObject.Height > LCLObject.Width);
+  SetControlViewStyle(Widget, StdScrollBarTinySize, StdScrollBarSmallSize, StdScrollBarNormalSize, LCLObject.Width > LCLObject.Height);
 end;
 
 function TCarbonScrollBar.SetScrollInfo(SBStyle: Integer;
svn_patch-21740 (987 bytes)   

Zeljan Rikalo

2012-04-21 17:25

developer   ~0058846

Please test and close if ok.

Issue History

Date Modified Username Field Change
2012-04-13 17:03 David Jenkins New Issue
2012-04-13 17:03 David Jenkins File Added: carbonbars.pp.patch
2012-04-13 17:03 David Jenkins Widgetset => Carbon
2012-04-19 21:15 David Jenkins File Added: svn_patch-21740
2012-04-21 17:25 Zeljan Rikalo Fixed in Revision => 36960
2012-04-21 17:25 Zeljan Rikalo LazTarget => -
2012-04-21 17:25 Zeljan Rikalo Status new => resolved
2012-04-21 17:25 Zeljan Rikalo Resolution open => fixed
2012-04-21 17:25 Zeljan Rikalo Assigned To => Zeljan Rikalo
2012-04-21 17:25 Zeljan Rikalo Note Added: 0058846
2012-04-24 14:43 David Jenkins Status resolved => closed