>
> For me the alignment looked ok there and also on Windows, although on
> Windows the LCL theme service draws too small boxes.
> The alignment must be calculated dynamically. Theme service already
> returns the size, the location can be derived from it.
> Maybe someone creates a patch, I have other things to do in near future.
>
Please review attached patch (commented-out code seems not needed).
Alignment is better on Windows now: checkboxes are vertically aligned now,
only text left position is different.
Sandro
Index: components/ideintf/objectinspector.pp
===================================================================
--- components/ideintf/objectinspector.pp (revisione 46889)
+++ components/ideintf/objectinspector.pp (copia locale)
@@ -2622,21 +2622,18 @@
if FCurrentEdit<>nil then
begin
// resize the edit component
- Dec(EditCompRect.Left);
- Dec(EditCompRect.Top);
- Inc(EditCompRect.Bottom);
+ if (FCurrentEdit is TEdit) or (FCurrentEdit is TComboBox) then
+ begin
+ Dec(EditCompRect.Left);
+ Dec(EditCompRect.Top);
+ Inc(EditCompRect.Bottom);
+ end;
//debugln('TOICustomPropertyGrid.AlignEditComponents A
',dbgsName(FCurrentEdit),' ',dbgs(EditCompRect));
if not CompareTopLeft(FCurrentEdit.BoundsRect,EditCompRect) then
begin
- if FCurrentEdit is TCheckBox then
- begin
- FCurrentEdit.Top := EditCompRect.Top;
- FCurrentEdit.Left := EditCompRect.Left;
- end
- else
- FCurrentEdit.BoundsRect:=EditCompRect;
- if FCurrentEdit is TComboBox then
-
TComboBox(FCurrentEdit).ItemHeight:=EditCompRect.Bottom-EditCompRect.Top-6;
+ FCurrentEdit.BoundsRect:=EditCompRect;
+// if FCurrentEdit is TComboBox then
+//
TComboBox(FCurrentEdit).ItemHeight:=EditCompRect.Bottom-EditCompRect.Top-6;
FCurrentEdit.Invalidate;
end;
end;
@@ -2690,7 +2687,7 @@
else
begin
inc(NameIconRect.Right, 2 + Ord(ShowGutter));
- inc(NameTextRect.Left, 3 + Ord(ShowGutter));
+ inc(NameTextRect.Left, 3 + Ord(ShowGutter));
end;
DrawState:=[];
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus