Markdown fixes

This commit is contained in:
crschnick 2024-05-21 15:15:01 +00:00
parent f19aed4e0e
commit 56087fec1c
4 changed files with 5 additions and 5 deletions

View file

@ -50,6 +50,8 @@ public class MarkdownEditorComp extends Comp<MarkdownEditorComp.Structure> {
pane.setPickOnBounds(false);
AnchorPane.setTopAnchor(editButton, 10.0);
AnchorPane.setRightAnchor(editButton, 10.0);
markdown.prefWidthProperty().bind(pane.prefWidthProperty());
markdown.prefHeightProperty().bind(pane.prefHeightProperty());
return new Structure(pane, markdown, editButton);
}

View file

@ -73,7 +73,7 @@ public class StoreNotesComp extends Comp<StoreNotesComp.Structure> {
private Popover createPopover(AtomicReference<Popover> ref, Property<String> prop) {
var n = wrapper.getNotes();
var md = new MarkdownEditorComp(prop, "notes-" + wrapper.getName().getValue()).createStructure();
var md = new MarkdownEditorComp(prop, "notes-" + wrapper.getName().getValue()).prefWidth(600).prefHeight(600).createStructure();
var dialog = new DialogComp() {
@Override
@ -112,8 +112,6 @@ public class StoreNotesComp extends Comp<StoreNotesComp.Structure> {
popover.setHeaderAlwaysVisible(true);
popover.setDetachable(true);
popover.setTitle(wrapper.getName().getValue());
popover.setMaxWidth(400);
popover.setHeight(600);
popover.showingProperty().addListener((observable, oldValue, newValue) -> {
if (!newValue) {
n.setValue(new StoreNotes(n.getValue().getCommited(), n.getValue().getCommited()));

View file

@ -31,7 +31,7 @@ public class UpdateAvailableAlert {
alert.setTitle(AppI18n.get("updateReadyAlertTitle"));
alert.setAlertType(Alert.AlertType.NONE);
var markdown =
new MarkdownComp(u.getBody() != null ? u.getBody() : "", s -> "&nbsp;" + s).createRegion();
new MarkdownComp(u.getBody() != null ? u.getBody() : "", s -> s).createRegion();
alert.getButtonTypes().clear();
var updaterContent = uh.createInterface();
if (updaterContent != null) {

View file

@ -46,7 +46,7 @@ public class UpdateChangelogAlert {
alert.setAlertType(Alert.AlertType.NONE);
alert.initModality(Modality.NONE);
var markdown = new MarkdownComp(update.getRawDescription(), s -> "&nbsp;" + s).createRegion();
var markdown = new MarkdownComp(update.getRawDescription(), s -> s).createRegion();
alert.getDialogPane().setContent(markdown);
alert.getButtonTypes().add(new ButtonType(AppI18n.get("ok"), ButtonBar.ButtonData.OK_DONE));