Style fixes

This commit is contained in:
crschnick 2024-07-27 10:55:04 +00:00
parent 0ee5ee2d88
commit ccb018a522
3 changed files with 16 additions and 15 deletions

View file

@ -114,22 +114,31 @@ public class DataStoreChoiceComp<T extends DataStore> extends SimpleComp {
StoreViewState.get().getActiveCategory(),
selectedCategory)
.styleClass(Styles.LEFT_PILL);
var filter =
new FilterComp(filterText).styleClass(Styles.CENTER_PILL).hgrow();
var filter = new FilterComp(filterText).styleClass(Styles.CENTER_PILL).hgrow();
var addButton = Comp.of(() -> {
MenuButton m = new MenuButton(null, new FontIcon("mdi2p-plus-box-outline"));
m.setMaxHeight(100);
m.setMinHeight(0);
StoreCreationMenu.addButtons(m);
return m;
})
.accessibleTextKey("addConnection")
.padding(new Insets(-2))
.styleClass(Styles.RIGHT_PILL)
.grow(false, true);
.padding(new Insets(-5))
.styleClass(Styles.RIGHT_PILL);
var top = new HorizontalComp(List.of(category, filter.hgrow(), addButton))
var top = new HorizontalComp(List.of(category, filter, addButton))
.styleClass("top")
.apply(struc -> struc.get().setFillHeight(true))
.apply(struc -> {
var first = ((Region) struc.get().getChildren().get(0));
var second = ((Region) struc.get().getChildren().get(1));
var third = ((Region) struc.get().getChildren().get(1));
second.prefHeightProperty().bind(first.heightProperty());
second.minHeightProperty().bind(first.heightProperty());
second.maxHeightProperty().bind(first.heightProperty());
third.prefHeightProperty().bind(first.heightProperty());
})
.apply(struc -> {
// Ugly solution to focus the text field
// Somehow this does not work through the normal on shown listeners

View file

@ -3,7 +3,7 @@
}
.choice-comp-content > .top {
-fx-padding: 0.5em 1em 0.5em 1em;
-fx-padding: 0.4em;
-fx-background-color: -color-neutral-subtle;
-fx-border-width: 1 0 1 0;
-fx-border-color: -color-border-default;

View file

@ -1,8 +0,0 @@
.named-store-choice, .named-source-choice {
-fx-border-width: 1px;
-fx-border-color: -color-accent-fg;
-fx-background-color: transparent;
-fx-border-radius: 4px;
-fx-padding: 2px;
-fx-background-radius: 4px;
}