Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.jackhuang.hmcl.ui.Controllers;
import org.jackhuang.hmcl.ui.FXUtils;
import org.jackhuang.hmcl.ui.SVG;
import org.jackhuang.hmcl.ui.SVGContainer;
import org.jackhuang.hmcl.ui.construct.*;
import org.jackhuang.hmcl.ui.decorator.DecoratorPage;
import org.jackhuang.hmcl.util.*;
Expand Down Expand Up @@ -440,15 +441,24 @@ private static final class AddonItem extends StackPane {
switch (dataItem.versionType()) {
case Alpha:
content.addTag(i18n("addon.channel.alpha"));
graphicPane.getChildren().setAll(SVG.ALPHA_CIRCLE.createIcon(24));
SVGContainer alphaIcon = SVG.ALPHA_CIRCLE.createIcon(24);
alphaIcon.getStyleClass().add("addon-channel-icon");
alphaIcon.getStyleClass().add("alpha");
graphicPane.getChildren().setAll(alphaIcon);
break;
case Beta:
content.addTag(i18n("addon.channel.beta"));
graphicPane.getChildren().setAll(SVG.BETA_CIRCLE.createIcon(24));
SVGContainer betaIcon = SVG.BETA_CIRCLE.createIcon(24);
betaIcon.getStyleClass().add("addon-channel-icon");
betaIcon.getStyleClass().add("beta");
graphicPane.getChildren().setAll(betaIcon);
break;
case Release:
content.addTag(i18n("addon.channel.release"));
graphicPane.getChildren().setAll(SVG.RELEASE_CIRCLE.createIcon(24));
SVGContainer releaseIcon = SVG.RELEASE_CIRCLE.createIcon(24);
releaseIcon.getStyleClass().add("addon-channel-icon");
releaseIcon.getStyleClass().add("release");
graphicPane.getChildren().setAll(releaseIcon);
break;
}
Comment thread
KSSJW marked this conversation as resolved.
Outdated

Expand Down
12 changes: 12 additions & 0 deletions HMCL/src/main/resources/assets/css/root.css
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,18 @@
-fx-alignment: center;
}

.addon-channel-icon.alpha .svg {
-fx-fill: #ff496e;
}

.addon-channel-icon.beta .svg {
-fx-fill: #ffa347;
}

.addon-channel-icon.release .svg {
-fx-fill: #1bd96a;
}

/*******************************************************************************
* *
* Main Page *
Expand Down
Loading