[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: RFR: JDK-8186188: TableColumHeader: initial auto-size broken if has graphic [v7]
From:       Marius Hanl <mhanl () openjdk ! org>
Date:       2024-03-27 23:20:49
Message-ID: rf1ywzjmJ7EDxuRmF-pOaDZ6XfEgHl6qJm2ZHxSu3Sc=.1959a49d-1413-4af7-b8c2-78e2b7044da0 () github ! com
[Download RAW message or body]

> This PR fixes the issue that the initial column autosizing is wrong under some \
> circumstances. The following things will break the initial autosizing:
> - Bold Column text (that is where I initially found this problem)
> - Another font / font size
> - Graphic
> 
> The reason is actually quite simple: The CSS is not (yet) applied initially, we \
> therefore ALWAYS take the default font into account + the graphic is not yet \
> layouted as well. 
> _It was not so easy to write tests for this, also for me the \
> `test_resizeColumnToFitContentHeader` is always failing locally. I don't know what \
>                 happens here, but he seems to not find a (Stub?) `Font` for me._
> **EDIT: Found out the cause and fixed it. I will check if I can write more tests \
> since it works now. :)** 
> The test I wrote now is checking if the css is applied after we triggered the \
> autosize, which is what we would expect here since we measure text. 
> I also copied the `TableColumnHeaderTest` and rewrote the tests for `TreeTableView` \
> as well, so we can catch any errors here as well since they both use different code \
> (although it is technically the same - C&P errors can happen very easy).

Marius Hanl has updated the pull request incrementally with one additional commit \
since the last revision:

  use snapped insets

-------------

Changes:
  - all: https://git.openjdk.org/jfx/pull/1405/files
  - new: https://git.openjdk.org/jfx/pull/1405/files/b4d03d44..9c516962

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=1405&range=06
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=1405&range=05-06

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jfx/pull/1405.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1405/head:pull/1405

PR: https://git.openjdk.org/jfx/pull/1405


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic