mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Path label auto size
This commit is contained in:
parent
f38056a8dc
commit
c2c981cfe2
2 changed files with 22 additions and 12 deletions
|
|
@ -194,6 +194,7 @@ type
|
|||
MousePos: TPoint; var Handled: Boolean);
|
||||
procedure dgPanelMouseWheelDown(Sender: TObject; Shift: TShiftState;
|
||||
MousePos: TPoint; var Handled: Boolean);
|
||||
procedure lblLPathChangeBounds(Sender: TObject);
|
||||
procedure lblLPathMouseEnter(Sender: TObject);
|
||||
procedure lblLPathMouseLeave(Sender: TObject);
|
||||
procedure pnlHeaderResize(Sender: TObject);
|
||||
|
|
@ -1504,6 +1505,11 @@ begin
|
|||
Result := pnlFile.IsItemValid(GetActiveItem);
|
||||
end;
|
||||
|
||||
procedure TFrameFilePanel.lblLPathChangeBounds(Sender: TObject);
|
||||
begin
|
||||
pnlFile.UpdatePathLabel;
|
||||
end;
|
||||
|
||||
procedure TFrameFilePanel.lblLPathMouseEnter(Sender: TObject);
|
||||
begin
|
||||
lblLPath.Font.Color:=clRed;
|
||||
|
|
@ -1658,6 +1664,7 @@ begin
|
|||
|
||||
pnlHeader.OnResize := @pnlHeaderResize;
|
||||
|
||||
lblLPath.OnChangeBounds:=@lblLPathChangeBounds;
|
||||
lblLPath.OnMouseEnter:=@lblLPathMouseEnter;
|
||||
lblLPath.OnMouseLeave:=@lblLPathMouseLeave;
|
||||
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ type
|
|||
procedure MarkFile(frp:PFileRecItem; bMarked:Boolean);
|
||||
procedure InvertAllFiles;
|
||||
procedure UpdateCountStatus;
|
||||
procedure UpdatePathLabel;
|
||||
procedure cdUpLevel;
|
||||
procedure cdDownLevel(frp:PFileRecItem);
|
||||
procedure cdRootLevel;
|
||||
|
|
@ -168,15 +169,7 @@ var
|
|||
pfri:PFileRecItem;
|
||||
bAnyRow:Boolean;
|
||||
begin
|
||||
case fPanelMode of
|
||||
pmDirectory:
|
||||
flblPath.Caption:=' '+MinimizeFilePath(ActiveDir, flblPath.Canvas, flblPath.Width);
|
||||
pmArchive,
|
||||
pmVFS:
|
||||
flblPath.Caption:=' ' + ActiveDir;
|
||||
else
|
||||
Raise Exception.Create('fix me:UpdatePanel:bad panelmode');
|
||||
end;
|
||||
UpdatePathLabel;
|
||||
|
||||
if fPanel.FixedRows <> Integer(gTabHeader) then
|
||||
begin
|
||||
|
|
@ -353,7 +346,6 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TFilePanel.LoadPanel;
|
||||
begin
|
||||
// DebugLn('TFilePanel.LoadPanel');
|
||||
|
|
@ -387,7 +379,6 @@ begin
|
|||
// DebugLn('TFilePanel.LoadPanel DONE');
|
||||
end;
|
||||
|
||||
|
||||
procedure TFilePanel.SortByCol(iCol:Integer);
|
||||
begin
|
||||
Sorting.Clear;
|
||||
|
|
@ -547,7 +538,6 @@ end;
|
|||
procedure TFilePanel.MarkAllFiles(bMarked:Boolean);
|
||||
var
|
||||
i:Integer;
|
||||
|
||||
begin
|
||||
for i:=0 to fFileList.Count-1 do
|
||||
begin
|
||||
|
|
@ -615,6 +605,19 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TFilePanel.UpdatePathLabel;
|
||||
begin
|
||||
case fPanelMode of
|
||||
pmDirectory:
|
||||
flblPath.Caption:=' '+MinimizeFilePath(ActiveDir, flblPath.Canvas, flblPath.Width);
|
||||
pmArchive,
|
||||
pmVFS:
|
||||
flblPath.Caption:=' ' + ActiveDir;
|
||||
else
|
||||
Raise Exception.Create('fix me:UpdatePanel:bad panelmode');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFilePanel.cdUpLevel;
|
||||
var
|
||||
i:Integer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue