Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions HMCL/src/main/java/org/jackhuang/hmcl/ui/FXUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,13 @@ public static Rectangle setOverflowHidden(Region region) {
return rectangle;
}

public static Rectangle setOverflowHidden(Region region, int radius) {
Comment thread
CiiLu marked this conversation as resolved.
Outdated
Rectangle rectangle = setOverflowHidden(region);
rectangle.setArcWidth(radius);
rectangle.setArcHeight(radius);
return rectangle;
}

public static Rectangle setOverflowHidden(Region region, double arc) {
Rectangle rectangle = setOverflowHidden(region);
rectangle.setArcWidth(arc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public ToolbarListPageSkin(P skinnable) {
toolbar.setAlignment(Pos.CENTER_LEFT);
toolbar.setPickOnBounds(false);
toolbar.getChildren().setAll(toolbarButtons);
FXUtils.setOverflowHidden(toolbar, 8);
Comment thread
CiiLu marked this conversation as resolved.
root.getContent().add(toolbar);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
import javafx.scene.control.SkinBase;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.*;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.util.Duration;
import org.jackhuang.hmcl.setting.Profile;
import org.jackhuang.hmcl.setting.Profiles;
Expand Down Expand Up @@ -241,6 +244,8 @@ public GameListSkin(GameList skinnable) {

toolbarPane.setContent(toolbarNormal, ContainerAnimations.FADE);

FXUtils.setOverflowHidden(toolbarPane, 8);
Comment thread
CiiLu marked this conversation as resolved.

root.getContent().add(toolbarPane);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ final class ModListPageSkin extends SkinBase<ModListPage> {
else
changeToolbar(toolbarSelecting);
});

FXUtils.setOverflowHidden(toolbarPane, 8);
Comment thread
CiiLu marked this conversation as resolved.

root.getContent().add(toolbarPane);

// Clear selection when pressing ESC
Expand Down