From 3b307d78f292984be9f0587885afb682aa905804 Mon Sep 17 00:00:00 2001 From: maxim Date: Sun, 25 Apr 2010 15:34:51 +0000 Subject: [PATCH] JCF2: fixed 'Clarify/Blocks' page layout git-svn-id: trunk@24920 - --- .../jcf2/Ui/Settings/frClarifyBlocks.lfm | 105 +++++++++++++----- .../jcf2/Ui/Settings/frClarifyBlocks.pas | 6 + 2 files changed, 81 insertions(+), 30 deletions(-) diff --git a/components/jcf2/Ui/Settings/frClarifyBlocks.lfm b/components/jcf2/Ui/Settings/frClarifyBlocks.lfm index 0624ed77d8..3d16f25e36 100644 --- a/components/jcf2/Ui/Settings/frClarifyBlocks.lfm +++ b/components/jcf2/Ui/Settings/frClarifyBlocks.lfm @@ -3,22 +3,34 @@ inherited fClarifyBlocks: TfClarifyBlocks Width = 334 ClientHeight = 336 ClientWidth = 334 + OnResize = FrameResize + TabOrder = 0 DesignLeft = 699 DesignTop = 227 object Label1: TLabel[0] - Left = 8 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Owner + Left = 6 Height = 14 - Top = 4 + Top = 6 Width = 148 + BorderSpacing.Around = 6 Caption = 'Block styles: use a new line at:' ParentColor = False end object rgBlockBegin: TRadioGroup[1] - Left = 8 - Height = 89 - Top = 30 - Width = 149 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Label1 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = rgBlock + Left = 6 + Height = 81 + Top = 26 + Width = 151 + Anchors = [akTop, akLeft, akRight] AutoFill = True + AutoSize = True + BorderSpacing.Around = 6 Caption = 'Block with begin' ChildSizing.LeftRightSpacing = 6 ChildSizing.TopBottomSpacing = 6 @@ -28,8 +40,8 @@ inherited fClarifyBlocks: TfClarifyBlocks ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 71 - ClientWidth = 145 + ClientHeight = 63 + ClientWidth = 147 Items.Strings = ( 'Always' 'Leave as is' @@ -38,11 +50,20 @@ inherited fClarifyBlocks: TfClarifyBlocks TabOrder = 0 end object rgBlock: TRadioGroup[2] + AnchorSideTop.Control = Label1 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + AnchorSideBottom.Control = rgBlockBegin + AnchorSideBottom.Side = asrBottom Left = 163 - Height = 89 - Top = 30 - Width = 162 + Height = 81 + Top = 26 + Width = 165 + Anchors = [akTop, akRight, akBottom] AutoFill = True + BorderSpacing.Top = 6 + BorderSpacing.Right = 6 Caption = 'Block without begin' ChildSizing.LeftRightSpacing = 6 ChildSizing.TopBottomSpacing = 6 @@ -52,8 +73,8 @@ inherited fClarifyBlocks: TfClarifyBlocks ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 71 - ClientWidth = 158 + ClientHeight = 63 + ClientWidth = 161 Items.Strings = ( 'Always' 'Leave as is' @@ -62,11 +83,21 @@ inherited fClarifyBlocks: TfClarifyBlocks TabOrder = 1 end object rgEndElse: TRadioGroup[3] + AnchorSideLeft.Control = rgBlock + AnchorSideTop.Control = rgBlock + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + AnchorSideBottom.Control = rgElseIf + AnchorSideBottom.Side = asrBottom Left = 163 - Height = 89 - Top = 127 - Width = 162 + Height = 81 + Top = 113 + Width = 165 + Anchors = [akTop, akLeft, akRight, akBottom] AutoFill = True + BorderSpacing.Top = 6 + BorderSpacing.Right = 6 Caption = 'Between end and else' ChildSizing.LeftRightSpacing = 6 ChildSizing.TopBottomSpacing = 6 @@ -76,8 +107,8 @@ inherited fClarifyBlocks: TfClarifyBlocks ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 71 - ClientWidth = 158 + ClientHeight = 63 + ClientWidth = 161 Items.Strings = ( 'Always' 'Leave as is' @@ -86,11 +117,18 @@ inherited fClarifyBlocks: TfClarifyBlocks TabOrder = 3 end object rgElseIf: TRadioGroup[4] - Left = 8 - Height = 89 - Top = 127 - Width = 149 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = rgBlockBegin + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = rgBlock + Left = 6 + Height = 81 + Top = 113 + Width = 151 + Anchors = [akTop, akLeft, akRight] AutoFill = True + AutoSize = True + BorderSpacing.Around = 6 Caption = 'Between else and if' ChildSizing.LeftRightSpacing = 6 ChildSizing.TopBottomSpacing = 6 @@ -100,8 +138,8 @@ inherited fClarifyBlocks: TfClarifyBlocks ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 71 - ClientWidth = 145 + ClientHeight = 63 + ClientWidth = 147 Items.Strings = ( 'Always' 'Leave as is' @@ -110,11 +148,18 @@ inherited fClarifyBlocks: TfClarifyBlocks TabOrder = 2 end object rgElseBegin: TRadioGroup[5] - Left = 8 - Height = 89 - Top = 222 - Width = 149 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = rgElseIf + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = rgBlock + Left = 6 + Height = 81 + Top = 200 + Width = 151 + Anchors = [akTop, akLeft, akRight] AutoFill = True + AutoSize = True + BorderSpacing.Around = 6 Caption = 'Else begin' ChildSizing.LeftRightSpacing = 6 ChildSizing.TopBottomSpacing = 6 @@ -124,8 +169,8 @@ inherited fClarifyBlocks: TfClarifyBlocks ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 71 - ClientWidth = 145 + ClientHeight = 63 + ClientWidth = 147 Items.Strings = ( 'Always' 'Leave as is' diff --git a/components/jcf2/Ui/Settings/frClarifyBlocks.pas b/components/jcf2/Ui/Settings/frClarifyBlocks.pas index bef177ac8a..eb055dde24 100644 --- a/components/jcf2/Ui/Settings/frClarifyBlocks.pas +++ b/components/jcf2/Ui/Settings/frClarifyBlocks.pas @@ -45,6 +45,7 @@ type Label1: TLabel; rgElseIf: TRadioGroup; rgElseBegin: TRadioGroup; + procedure FrameResize(Sender:TObject); public constructor Create(AOwner: TComponent); override; @@ -62,6 +63,11 @@ implementation uses JcfSettings, SettingsTypes, JcfHelp, jcfuiconsts; +procedure TfClarifyBlocks.FrameResize(Sender:TObject); +begin + rgBlock.Width := (Width-18) div 2; +end; + constructor TfClarifyBlocks.Create(AOwner: TComponent); begin inherited;