Fix: Lock AccountListItemSkin.btnRefresh width to prevent layout shifting#6369
Fix: Lock AccountListItemSkin.btnRefresh width to prevent layout shifting#6369KSSJW wants to merge 1 commit into
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request sets a preferred size of 30.0x30.0 on the spinnerRefresh component in AccountListItemSkin.java. It is recommended to define these dimensions in the CSS stylesheet under the .small-spinner-pane class instead of hardcoding them in Java to improve maintainability and ensure consistent layout behavior across other components using the same class.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| JFXButton btnRefresh = FXUtils.newToggleButton4(SVG.REFRESH); | ||
| SpinnerPane spinnerRefresh = new SpinnerPane(); | ||
| spinnerRefresh.getStyleClass().setAll("small-spinner-pane"); | ||
| spinnerRefresh.setPrefSize(30.0, 30.0); |
There was a problem hiding this comment.
Instead of hardcoding the preferred size of spinnerRefresh in Java code, it is more maintainable and consistent to define these dimensions in the CSS stylesheet under the .small-spinner-pane class (e.g., using -fx-pref-width: 30px; -fx-pref-height: 30px;). This ensures that all components using .small-spinner-pane (such as spinnerMove and spinnerUpload) behave consistently and avoid layout shifting without duplicating layout code in Java.
|
若更改 CSS |
修复了
AccountListItemSkin中刷新按钮在showSpinner后大小更改的问题问题复现
_20260711_131828.mp4