mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Controls alignment
This commit is contained in:
parent
448e3d2d75
commit
f54be93165
4 changed files with 15 additions and 1 deletions
|
|
@ -154,6 +154,8 @@ begin
|
|||
begin
|
||||
cbDateTimeFormat.Items.Insert(0, DefaultDateTimeFormat);
|
||||
end;
|
||||
AlignControlsEx(gbSorting, cbCaseSensitivity, lblCaseSensitivity);
|
||||
AlignControlsEx(gbFormatting, cbFileSizeFormat, lblFileSizeFormat);
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsFilesViews.Load;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ implementation
|
|||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
DCStrUtils, uGlobs, uLng;
|
||||
DCStrUtils, uGlobs, uLng, uDCUtils;
|
||||
|
||||
const
|
||||
KeyAction_None = 0;
|
||||
|
|
@ -73,6 +73,7 @@ begin
|
|||
ParseLineToList(rsOptLetters, cbNoModifier.Items);
|
||||
cbAlt.Items.Assign(cbNoModifier.Items);
|
||||
cbCtrlAlt.Items.Assign(cbNoModifier.Items);
|
||||
AlignControlsEx(gbTyping, cbNoModifier, lblNoModifier);
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsKeyboard.Load;
|
||||
|
|
|
|||
|
|
@ -392,6 +392,7 @@ begin
|
|||
miImportTCINI.free;
|
||||
miImportTCBAR.free;
|
||||
{$ENDIF}
|
||||
AlignControlsEx(pnlEditControls, cbInternalCommand, lblInternalCommand);
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsToolbarBase.LoadCurrentButton;
|
||||
|
|
|
|||
|
|
@ -238,6 +238,7 @@ procedure UpdateColor(Control: TControl; Checked: Boolean);
|
|||
function findScaleFactorByFirstForm: Double;
|
||||
function findScaleFactorByControl( control: TControl ): Double;
|
||||
procedure EnableControl(Control: TControl; Enabled: Boolean);
|
||||
procedure AlignControlsEx(AContainer: TWinControl; AComboBox: TComboBox; ALabel: TLabel);
|
||||
procedure SetComboWidthToLargestElement(AComboBox: TCustomComboBox; iExtraWidthToAdd: integer = 0);
|
||||
|
||||
procedure SplitCmdLineToCmdParams(sCmdLine : String; var sCmd, sParams : String);
|
||||
|
|
@ -1304,6 +1305,15 @@ begin
|
|||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure AlignControlsEx(AContainer: TWinControl; AComboBox: TComboBox; ALabel: TLabel);
|
||||
var
|
||||
Delta: Integer;
|
||||
begin
|
||||
Delta:= AComboBox.Height - ALabel.Height;
|
||||
AContainer.ChildSizing.VerticalSpacing:= AContainer.ChildSizing.VerticalSpacing + Delta;
|
||||
AContainer.ChildSizing.TopBottomSpacing:= AContainer.ChildSizing.TopBottomSpacing + Delta;
|
||||
end;
|
||||
|
||||
{ SetComboWidthToLargestElement }
|
||||
// Set the width of a TComboBox to fit to the largest element in it.
|
||||
procedure SetComboWidthToLargestElement(AComboBox: TCustomComboBox; iExtraWidthToAdd: integer = 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue