Skip to content

Commit

Permalink
Issue 2288 – Tree indentation does not scale correctly
Browse files Browse the repository at this point in the history
https://winscp.net/tracker/2288

Source commit: 043b0ba3da5deb0eeafb5e2f082680459142f338
  • Loading branch information
martinprikryl committed May 7, 2024
1 parent 23b48e9 commit 363f3e3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/windows/VCLCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,11 @@ friend void __fastcall ShowAsModal(TForm * Form, void *& Storage, bool BringToFr
friend void __fastcall HideAsModal(TForm * Form, void *& Storage);
friend void __fastcall ShowFormNoActivate(TForm * Form);
};
//---------------------------------------------------------------------
class TPublicTreeView : public TCustomTreeView
{
friend void __fastcall ChangeControlScale(TControl * Control, int M, int D);
};
//---------------------------------------------------------------------------
void __fastcall RealignControl(TControl * Control)
{
Expand Down Expand Up @@ -568,6 +573,13 @@ static void __fastcall ChangeControlScale(TControl * Control, int M, int D)
}
}

TCustomTreeView * CustomTreeView = dynamic_cast<TCustomTreeView *>(Control);
if (CustomTreeView != NULL)
{
TPublicTreeView * PublicTreeView = static_cast<TPublicTreeView *>(CustomTreeView);
PublicTreeView->Indent = MulDiv(PublicTreeView->Indent, M, D);
}

TCustomCombo * CustomCombo = dynamic_cast<TCustomCombo *>(Control);
if (CustomCombo != NULL)
{
Expand Down

0 comments on commit 363f3e3

Please sign in to comment.