Skip to content

Conversation

@neveler
Copy link
Contributor

@neveler neveler commented Dec 27, 2025

更新启动按钮分隔符颜色

描述

原本启动按钮这里使用的是 StackPane 配合裁切实现的,现在已改用 HBox 实现通过设置 -fx-border-width 实现分隔符效果,使用 -fx-border-color 控制分隔符颜色。

预览

dark light
before image image
after image image

@3gf8jv4dv
Copy link
Contributor

我尝试了一下,在某些场景下,线会消失:

  • 鼠标指针放在左侧启动按钮上,按住不动,指针移到按钮外后松开
  • 点击右侧箭头按钮

这些操作后,如果鼠标指针再次放回按钮上,线会恢复。

@neveler
Copy link
Contributor Author

neveler commented Dec 27, 2025

这些操作后,如果鼠标指针再次放回按钮上,线会恢复。

现在应该可以了

@3gf8jv4dv
Copy link
Contributor

现在应该可以了

试了下,问题解决了。

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 the launch button separator implementation from a StackPane with manual clipping to a cleaner HBox with CSS-controlled spacing. The separator color is now controlled through the HBox background color (-monet-on-surface-variant) that shows through the spacing gap.

Key Changes:

  • Replaced StackPane with HBox for the launch pane container
  • Moved all sizing and positioning logic from Java code to CSS
  • Removed the Rectangle separator element in favor of HBox spacing to create the visual separator

Reviewed changes

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

File Description
root.css Added comprehensive CSS rules for .launch-pane, .launch-button, and .menu-button classes, including sizing, spacing, and border radius properties; removed obsolete Rectangle styles
MainPage.java Refactored launch pane from StackPane to HBox, removed manual sizing/positioning code, simplified menuButton graphic creation, and removed unused Rectangle import

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

@Glavo
Copy link
Member

Glavo commented Jan 1, 2026

本 PR 的修改让按钮的圆角稍微小了一点点。

@neveler
Copy link
Contributor Author

neveler commented Jan 1, 2026

本 PR 的修改让按钮的圆角稍微小了一点点。

83ca893

@Glavo Glavo merged commit 7c0faf2 into HMCL-dev:main Jan 1, 2026
2 checks passed
@neveler neveler deleted the fork/p3 branch January 1, 2026 13:41
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.

3 participants