mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Take horizontal scrollbar into account when get text height
This commit is contained in:
parent
708737bb79
commit
18bbf79534
1 changed files with 7 additions and 3 deletions
|
|
@ -427,7 +427,8 @@ procedure Register;
|
|||
implementation
|
||||
|
||||
uses
|
||||
LCLType, LCLVersion, Graphics, Forms, LCLProc, Clipbrd, LConvEncoding, UnicodeUtils, LCLIntf
|
||||
LCLType, LCLVersion, Graphics, Forms, LCLProc, Clipbrd, LConvEncoding,
|
||||
UnicodeUtils, LCLIntf
|
||||
{$IF DEFINED(UNIX)}
|
||||
, BaseUnix, Unix
|
||||
{$ELSEIF DEFINED(WINDOWS)}
|
||||
|
|
@ -1497,10 +1498,13 @@ end;
|
|||
|
||||
function TViewerControl.GetClientHeightInLines: Integer;
|
||||
begin
|
||||
// TODO: Take horizontal scrollbar into account
|
||||
if FViewerMode <> vmText then
|
||||
Result:= 0
|
||||
else // Take horizontal scrollbar into account
|
||||
Result:= GetSystemMetrics(SM_CYHSCROLL);
|
||||
|
||||
if FTextHeight > 0 then
|
||||
Result := (ClientRect.Bottom - ClientRect.Top) div FTextHeight
|
||||
Result := (ClientRect.Bottom - ClientRect.Top - Result) div FTextHeight
|
||||
// or Self.Height div FTextHeight?
|
||||
else
|
||||
Result := 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue