优化更新弹窗的颜色 (#4903)

This commit is contained in:
Glavo
2025-12-02 21:14:10 +08:00
committed by GitHub
parent a1e75e48da
commit 669a9dfc57
5 changed files with 12 additions and 10 deletions

View File

@@ -181,6 +181,7 @@ public final class StyleSheets {
addColor(builder, scheme, ColorRole.ON_SURFACE_VARIANT, 0.38);
addColor(builder, scheme, ColorRole.SURFACE_CONTAINER_LOW, 0.8);
addColor(builder, scheme, ColorRole.SECONDARY_CONTAINER, 0.8);
addColor(builder, scheme, ColorRole.INVERSE_SURFACE, 0.8);
builder.append("}\n");
return toStyleSheetUri(builder.toString(), blueCss);

View File

@@ -19,8 +19,8 @@ package org.jackhuang.hmcl.ui;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXDialogLayout;
import com.jfoenix.controls.JFXSpinner;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.ScrollPane;
import org.jackhuang.hmcl.Metadata;
import org.jackhuang.hmcl.task.Schedulers;
@@ -48,7 +48,7 @@ public final class UpgradeDialog extends JFXDialogLayout {
maxHeightProperty().bind(Controllers.getScene().heightProperty().multiply(0.7));
setHeading(new Label(i18n("update.changelog")));
setBody(new ProgressIndicator());
setBody(new JFXSpinner());
String url = CHANGELOG_URL + remoteVersion.getChannel().channelName + ".html";

View File

@@ -188,16 +188,13 @@ public final class MainPage extends StackPane implements DecoratorPage {
StackPane.setAlignment(hBox, Pos.CENTER_LEFT);
StackPane.setMargin(hBox, new Insets(9, 12, 9, 16));
{
Label lblIcon = new Label();
lblIcon.setGraphic(SVG.UPDATE.createIcon(20));
TwoLineListItem prompt = new TwoLineListItem();
prompt.setSubtitle(i18n("update.bubble.subtitle"));
prompt.setPickOnBounds(false);
prompt.titleProperty().bind(BindingMapping.of(latestVersionProperty()).map(latestVersion ->
latestVersion == null ? "" : i18n("update.bubble.title", latestVersion.getVersion())));
hBox.getChildren().setAll(lblIcon, prompt);
hBox.getChildren().setAll(SVG.UPDATE.createIcon(20), prompt);
}
JFXButton closeUpdateButton = new JFXButton();

View File

@@ -56,4 +56,5 @@
-monet-on-surface-variant-transparent-38: #45465161;
-monet-surface-container-low-transparent-80: #F5F2FACC;
-monet-secondary-container-transparent-80: #D0D5FDCC;
-monet-inverse-surface-transparent-80: #303036CC;
}

View File

@@ -355,14 +355,17 @@
}
.bubble {
-fx-background-color: rgba(0, 0, 0, 0.5);
-fx-background-color: -monet-inverse-surface-transparent-80;
-fx-background-radius: 2px;
-fx-text-fill: white;
}
.bubble > HBox > .two-line-list-item > .first-line > .title,
.bubble > HBox > .two-line-list-item > HBox > .subtitle {
-fx-text-fill: white;
-fx-text-fill: -monet-inverse-on-surface;
}
.bubble .svg {
-fx-fill: -monet-inverse-on-surface;
}
.sponsor-pane {
@@ -1638,7 +1641,7 @@
}
.html-hyperlink {
-fx-fill: blue;
-fx-fill: -monet-primary;
}
.html-h1 {