Skip to content

TVTHeader.AutoScale() never decreases height. #1206

Closed
@pyscripter

Description

@pyscripter

Both VT and Header AutoScale may only increase height, but never decrease it.

In my application (PyScripter), I have an option to change the UI content font size. When a user increases font size both default node height and header height* are automatically adjusting (increasing), which is good, but if a user decreases font size, the node height and header height stay at their previous high values and do not look good.

Is there a reason for this behaviour? I would think that if toAutoChangeScale is set, you let VT manage the node and header heights for better or worse.

Changes needed

in TVTHeader.AutoScale remove the lines below:

    //Get the maximum of the scaled original value and the minimum needed header height.
    lMaxHeight := Max(lMaxHeight, FHeight);

In TBaseVirtualTree.AutoScale change the > to <>.

Metadata

Metadata

Assignees

Labels

Open for DiscussionThere are several possibilites to address the issue and anyone is invited for comments.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions