Make resizing of filter and model input more equal

This commit is contained in:
0xb00bface 2020-11-01 11:25:45 +01:00
parent 17b0a51d02
commit 3cb618ae42
1 changed files with 7 additions and 1 deletions

View File

@ -269,7 +269,9 @@ public class RecordedModelsTab extends Tab implements TabSelectionListener {
ObservableList<String> suggestions = FXCollections.observableArrayList();
sites.forEach(site -> suggestions.add(site.getClass().getSimpleName()));
model = new AutoFillTextField(new ObservableListSuggester(suggestions));
model.setPrefWidth(600);
model.minWidth(150);
model.prefWidth(600);
HBox.setHgrow(model, Priority.ALWAYS);
model.setPromptText("e.g. MyFreeCams:ModelName or an URL like https://chaturbate.com/modelname/");
model.onActionHandler(this::addModel);
model.setTooltip(new Tooltip("To add a model enter SiteName:ModelName\n" +
@ -291,8 +293,12 @@ public class RecordedModelsTab extends Tab implements TabSelectionListener {
filterContainer.setSpacing(0);
filterContainer.setPadding(new Insets(0));
filterContainer.setAlignment(Pos.CENTER_RIGHT);
filterContainer.minWidth(100);
filterContainer.prefWidth(150);
HBox.setHgrow(filterContainer, Priority.ALWAYS);
filter = new SearchBox(false);
filter.minWidth(100);
filter.prefWidth(150);
filter.setPromptText("Filter");
filter.textProperty().addListener( (observableValue, oldValue, newValue) -> {
String q = filter.getText();