Skip to content
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

8314683: TextArea: scroll bar size and content padding #1469

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andy-goryachev-oracle
Copy link
Contributor

@andy-goryachev-oracle andy-goryachev-oracle commented May 31, 2024

Changing certain ScrollBar, ScrollPane, and TextArea sizes from em to px in modena.css to make them independent of the font size in that control.

After the change, the UI still looks good which can be tested by scaling default font size in a fairly wide range:

.root { -fx-font-size:100%; }

Using CSS Playground tool in the Monkey Tester at 50% and 200% font size:

Screenshot 2024-05-31 at 14 48 41

Screenshot 2024-05-31 at 14 49 34


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 2 Reviewers)

Issue

  • JDK-8314683: TextArea: scroll bar size and content padding (Bug - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1469

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 31, 2024

👋 Welcome back angorya! 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 May 31, 2024

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

@openjdk openjdk bot changed the title 8314683 TextArea: scroll bar size and content padding 8314683: TextArea: scroll bar size and content padding May 31, 2024
@andy-goryachev-oracle andy-goryachev-oracle marked this pull request as ready for review June 4, 2024 22:59
@openjdk openjdk bot added the rfr Ready for review label Jun 4, 2024
@mlbridge
Copy link

mlbridge bot commented Jun 4, 2024

Webrevs

@kevinrushforth
Copy link
Member

This PR presupposes that the scroll bar size and content padding should be changed to be independent of the font size. Since the current choice was a deliberate decision, the issue should be changed to an Enhancement, and we need to consider the possible drawbacks of such a change.

/reviewers 2 reviewers

@kevinrushforth kevinrushforth self-requested a review June 5, 2024 14:48
@kevinrushforth
Copy link
Member

@andy-goryachev-oracle Wait for me to review this.

@openjdk
Copy link

openjdk bot commented Jun 5, 2024

@kevinrushforth
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 2 Reviewers).

@andy-goryachev-oracle
Copy link
Contributor Author

This PR presupposes that the scroll bar size and content padding should be changed to be independent of the font size

I disagree. The size of the UI elements enveloping a content area should not depend on the font size of the font used in that particular content area. It should depend on the base font size, yes - i.e. it should scale with the scaling of the base font.

BTW, no other Control exhibits this behavior, as far as I know.

@kevinrushforth
Copy link
Member

This PR presupposes that the scroll bar size and content padding should be changed to be independent of the font size

I disagree. The size of the UI elements enveloping a content area should not depend on the font size of the font used in that particular content area. It should depend on the base font size, yes - i.e. it should scale with the scaling of the base font.

If I understand what you are saying, this change will make the size of the scroll bars and content padding be relative to the size of the root? In that case, yes this seems like a Bug (so no need to change the issue type). Can you update the issue title (in JBS and in this PR) to make this more clear?

@andy-goryachev-oracle
Copy link
Contributor Author

I must clarify: ideally, the size of all the UI elements should depend on the base font size, but currently does not (and I don't know exactly how to make it so).

And apparently I am wrong about saying that only TextArea has the issue. Here is a screenshot of an app with the root font size set at 50%, and combo box at 200%:

Screenshot 2024-06-05 at 08 29 21

It does not look right either, the UI elements should not get scaled in my opinion, only the text. I'd rather have a consistent size of UI elements in an application.

@kevinrushforth
Copy link
Member

It does not look right either, the UI elements should not get scaled in my opinion, only the text. I'd rather have a consistent size of UI elements in an application.

This will need further discussion.

@andy-goryachev-oracle andy-goryachev-oracle marked this pull request as draft June 5, 2024 17:12
@andy-goryachev-oracle
Copy link
Contributor Author

I agree. Back to Draft.

@openjdk openjdk bot removed the rfr Ready for review label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants