mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-08-23 09:46:36 +00:00
Style fixes
This commit is contained in:
@@ -31,8 +31,11 @@ import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyCodeCombination;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.input.MouseButton;
|
||||
import javafx.scene.layout.Background;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.Region;
|
||||
|
||||
import javafx.scene.paint.Color;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Value;
|
||||
import org.kordamp.ikonli.javafx.FontIcon;
|
||||
@@ -68,9 +71,13 @@ public class StoreCategoryComp extends SimpleComp {
|
||||
|
||||
var expandIcon = Bindings.createObjectBinding(
|
||||
() -> {
|
||||
if (category.getCategory().getParentCategory() == null) {
|
||||
return new LabelGraphic.IconGraphic("mdi2f-folder-text-outline");
|
||||
}
|
||||
|
||||
var exp = category.getExpanded().get()
|
||||
&& category.getChildren().getList().size() > 0;
|
||||
return new LabelGraphic.IconGraphic(exp ? "mdal-keyboard_arrow_down" : "mdal-keyboard_arrow_right");
|
||||
return new LabelGraphic.IconGraphic(exp ? "mdi2m-menu-down-outline" : "mdi2m-menu-right-outline");
|
||||
},
|
||||
category.getExpanded(),
|
||||
category.getChildren().getList());
|
||||
@@ -80,8 +87,8 @@ public class StoreCategoryComp extends SimpleComp {
|
||||
.apply(struc -> AppFontSizes.sm(struc.get()))
|
||||
.apply(struc -> {
|
||||
struc.get().setAlignment(Pos.CENTER);
|
||||
struc.get().setPadding(new Insets(-2, 0, 0, 0));
|
||||
struc.get().setFocusTraversable(false);
|
||||
HBox.setMargin(struc.get(), new Insets(0, 0, 2.6, 0));
|
||||
})
|
||||
.disable(Bindings.isEmpty(category.getChildren().getList()))
|
||||
.styleClass("expand-button")
|
||||
@@ -127,7 +134,7 @@ public class StoreCategoryComp extends SimpleComp {
|
||||
var focus = new SimpleBooleanProperty();
|
||||
var h = new HorizontalComp(List.of(
|
||||
expandButton,
|
||||
Comp.hspacer(1),
|
||||
Comp.hspacer(category.getCategory().getParentCategory() == null ? 3 : 0),
|
||||
Comp.of(() -> name).hgrow(),
|
||||
Comp.hspacer(2),
|
||||
count,
|
||||
@@ -162,6 +169,7 @@ public class StoreCategoryComp extends SimpleComp {
|
||||
var children =
|
||||
new ListBoxViewComp<>(l, l, storeCategoryWrapper -> new StoreCategoryComp(storeCategoryWrapper), false);
|
||||
children.styleClass("children");
|
||||
children.minHeight(0);
|
||||
|
||||
var hide = Bindings.createBooleanBinding(
|
||||
() -> {
|
||||
@@ -180,6 +188,8 @@ public class StoreCategoryComp extends SimpleComp {
|
||||
category.getColor().subscribe((c) -> {
|
||||
DataColor.applyStyleClasses(c, struc.get());
|
||||
});
|
||||
|
||||
AppFontSizes.sm(struc.get());
|
||||
});
|
||||
|
||||
return v.createRegion();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
}
|
||||
|
||||
.category-button .name {
|
||||
-fx-padding: 0.25em;
|
||||
-fx-padding: 0.25em 0.1em;
|
||||
}
|
||||
|
||||
.category-button .text-field {
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
}
|
||||
|
||||
.root:dark .store-entry-grid:incomplete .name {
|
||||
-fx-text-fill: #b2271a;
|
||||
-fx-text-fill: #aa473c;
|
||||
}
|
||||
|
||||
.root:light .store-entry-grid:incomplete .name {
|
||||
-fx-text-fill: #851908;
|
||||
-fx-text-fill: #88352b;
|
||||
}
|
||||
|
||||
.store-entry-grid .user-icon .ikonli-font-icon {
|
||||
|
||||
Reference in New Issue
Block a user