-
Notifications
You must be signed in to change notification settings - Fork 437
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
8218745: TableView: visual glitch at borders on horizontal scrolling #1330
base: master
Are you sure you want to change the base?
8218745: TableView: visual glitch at borders on horizontal scrolling #1330
Conversation
👋 Welcome back mhanl! A progress list of the required criteria for merging this PR into |
@Maran23 |
This will need careful review and testing. /reviewers 2 |
@kevinrushforth |
@johanvos : I presume you will want to review this? |
@@ -1505,32 +1505,32 @@ | |||
-fx-background-color: derive(-fx-control-inner-background,-5%); | |||
} | |||
|
|||
.list-view:focused > .virtual-flow > .clipped-container > .sheet > .list-cell:focused { | |||
.list-view:focused > .virtual-flow > .viewport > .clipped-container > .sheet > .list-cell:focused { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might require a CSR as it might break custom stylesheets that modify list/tree/table/views.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably. Was not sure since this is a very specific case which we never had before (as far as I can tell).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think a CSR would be in order. Thanks for bringing this up @andy-goryachev-oracle
The scrolling works correctly with the fix (tested TableView on macOS (scale=1 and 2) and win11 (scale=200%, 225%). I'll continue testing tomorrow. It might be a dumb question: would it be possible to avoid creating an intermediate container and keep the existing .css files? |
Not a dumb question, that is what I tried at first. See also my old PR: #630. I tried multiple things with the container and snapping, but never managed to fix all the issues with all scales. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, tested list/tree/table views on macOS 14.1.2 in light mode
/csr needed |
@kevinrushforth has indicated that a compatibility and specification (CSR) request is needed for this pull request. @Maran23 please create a CSR request, with the correct fix version, for at least one of the issues associated with this pull request. This pull request cannot be integrated until all the CSR request are approved. |
@Maran23 This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@Maran23 This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
/open |
@Maran23 This pull request is now open |
❗ This change is not yet ready to be integrated. |
@Maran23 This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
open for discussion still, but there will be a counter PR from me at one point. |
does it mean this PR is not ready, or do we have other issue(s)? Also, a CSR is needed for this PR to go forward. |
@Maran23 this pull request can not be integrated into git checkout 8218745-snapping-x-y-tableview-scroll-3
git fetch https://git.openjdk.org/jfx.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
@Maran23 This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
…snapping-x-y-tableview-scroll-3 # Conflicts: # modules/javafx.controls/src/test/java/test/javafx/scene/control/TableViewTest.java # modules/javafx.controls/src/test/java/test/javafx/scene/control/TreeTableViewTest.java
This PR fixes the border glitch/gap as explained in both linked tickets.
I noted that the
ScrollPane
control does not suffer from this problem, although the code is mostly the same as inVirtualFlow
. TheScrollPane
snaps the content correctly, no matter which scale. I carefully checked the code and it seems that the container structure inScrollPane
was explicitly written to handle this perfectly. There was definitely some thought on that.So to finally fix this issue, I rewrote the
VirtualFlow
container/scrolling code to be exactly the same as inScrollPane
(Skin).And this also fixes the issue, while behaving the same as before.
In the future it may makes sense to try to somewhat unify the code from
ScrollPane
andVirtualFlow
. I already have some ideas.Unfortunately though, one more container is introduced to
VirtualFlow
, so the css needs to be changed since it is very strictly written in the first place:Before:
.list-view:focused > .virtual-flow > .clipped-container > .sheet > .list-cell
After:
.list-view:focused > .virtual-flow > .viewport > .clipped-container > .sheet > .list-cell
To better understand this, the container structure (tree) is shown below:
setClip
-> clipRect (viewContent size)setLayoutX
setClip
-> clipRect (clippedContainer size)setLayoutX
(when scrolling)/issue add JDK-8146406
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1330/head:pull/1330
$ git checkout pull/1330
Update a local copy of the PR:
$ git checkout pull/1330
$ git pull https://git.openjdk.org/jfx.git pull/1330/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1330
View PR using the GUI difftool:
$ git pr show -t 1330
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1330.diff
Webrev
Link to Webrev Comment