Skip to content

8340344: The first item in TreeView is not aligned in the beginning #1715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Ziad-Mid
Copy link
Contributor

@Ziad-Mid Ziad-Mid commented Feb 19, 2025

Changed default disclosure width to 20 to fix the misalignment of items when having children in some of the treeitems


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8340344: The first item in TreeView is not aligned in the beginning (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1715/head:pull/1715
$ git checkout pull/1715

Update a local copy of the PR:
$ git checkout pull/1715
$ git pull https://git.openjdk.org/jfx.git pull/1715/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1715

View PR using the GUI difftool:
$ git pr show -t 1715

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1715.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 19, 2025

👋 Welcome back Ziad-Mid! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Feb 19, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@@ -207,7 +207,7 @@ public final DoubleProperty indentProperty() {
boolean disclosureVisible = disclosureNode != null && treeItem != null && ! treeItem.isLeaf();

final double defaultDisclosureWidth = maxDisclosureWidthMap.containsKey(tree) ?
maxDisclosureWidthMap.get(tree) : 18; // JDK-8119169: default width of default disclosure node
maxDisclosureWidthMap.get(tree) : 20; // JDK-8119169: default width of default disclosure node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably not a good solution: I think the root cause is not in that the default value is incorrect, but in that two different values are used in the same view (i.e. that it first uses the default value, then the value computed from the disclosure node, if I read the code correctly).

Could you please investigate?

I've linked the JBS ticket mentioned in the comment, take a look at the discussion there https://bugs.openjdk.org/browse/JDK-8119169 , especially the comment about variable width disclosure node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants