Skip to content

Commit

Permalink
取消了标题栏区域的裁剪式滑条
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackDeluxeCat committed Dec 30, 2023
1 parent 1055b16 commit ac03605
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/mi2u/ui/elements/Mindow2.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,8 @@ public void minimize(){
}

public void setupTitle(){
titleBar.add(new ScrollPane(titlePane){
@Override
public float getPrefWidth(){
return 0f;
}
}).scrollX(true).scrollY(false).with(sp -> {
sp.update(() -> {
Element e = Core.scene.hit(Core.input.mouseX(), Core.input.mouseY(), true);
if(e != null && e.isDescendantOf(sp)){
sp.requestScroll();
}else if(sp.hasScroll()){
Core.scene.setScrollFocus(null);
}
});
sp.setFadeScrollBars(true);
sp.setupFadeScrollBars(0.3f, 0f);
}).growX().right().get().hovered(() -> titleCfg = false);
titlePane.touchable = Touchable.enabled;
titleBar.add(new MCollapser(titlePane, false).setCollapsed(() -> minimized)).growX().get().hovered(() -> titleCfg = false);
titleBar.image().width(2f).growY().color(Color.white);

var toast = new Table();
Expand Down

0 comments on commit ac03605

Please sign in to comment.