Skip to content

更新 JFXSpinner 默认样式#5803

Merged
Glavo merged 11 commits intoHMCL-dev:mainfrom
Glavo:spinner
Mar 18, 2026
Merged

更新 JFXSpinner 默认样式#5803
Glavo merged 11 commits intoHMCL-dev:mainfrom
Glavo:spinner

Conversation

@Glavo
Copy link
Member

@Glavo Glavo commented Mar 18, 2026

调整 JFXSpinner 的默认大小以及笔触宽度以匹配 MD3 样式。

考虑到 MD3 也不会在进度指示器内部显示进度,本 PR 还移除了 HMCL 中没有用到的 JFXSpinner 内部文本控件。

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors HMCL’s JFoenix spinner styling and implementation, simplifying CSS rules and streamlining the spinner skin while adjusting default sizing/appearance.

Changes:

  • Simplified root.css spinner-related selectors and adjusted “small” spinner radius.
  • Updated JFXSpinnerSkin to remove determinate percentage text rendering and to rely on TreeShowingProperty for animation start/stop.
  • Updated JFXSpinner defaults (radius) and replaced the styleable starting-angle property with a randomized starting angle.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
HMCL/src/main/resources/assets/css/root.css Removes multiple spinner size selectors and tweaks small spinner sizing rules.
HMCL/src/main/java/com/jfoenix/skins/JFXSpinnerSkin.java Simplifies skin nodes (removes percentage text), standardizes default stroke width, and caches starting angle.
HMCL/src/main/java/com/jfoenix/controls/JFXSpinner.java Adjusts default radius and changes starting angle behavior to be randomized.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

-fx-stroke-width: 5.0;
-jfx-radius: 9;
}

Comment on lines 102 to 104
}

private static final class StyleableProperties {
@Glavo Glavo merged commit 730d9b4 into HMCL-dev:main Mar 18, 2026
2 checks passed
@Glavo Glavo deleted the spinner branch March 18, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants