Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog contentText does not wrap correctly always #5

Open
danielpeintner opened this issue Mar 18, 2021 · 2 comments
Open

Dialog contentText does not wrap correctly always #5

danielpeintner opened this issue Mar 18, 2021 · 2 comments

Comments

@danielpeintner
Copy link
Owner

danielpeintner commented Mar 18, 2021

This is how it should look like
grafik

See the ellipses in the case for
System.setProperty("glass.win.uiScale", "1.5");

grafik

@danielpeintner
Copy link
Owner Author

danielpeintner commented Mar 18, 2021

Code to reproduce

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

public class TestDialog extends Application {
    public static void main(String[] args) {
        System.setProperty("glass.win.uiScale", "1.5");
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {
        primaryStage.setTitle("DialogTest!");
        Button btn = new Button();
        btn.setText("Show Dialog");
        btn.setOnAction(event -> {
            Alert dialog = new Alert(Alert.AlertType.CONFIRMATION);
            dialog.setTitle("MyTitle");
            dialog.setHeaderText("MyHeader");
            dialog.setContentText("myContent 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30");
            // dialog.getDialogPane().setExpanded(true); // makes the 2nd text line appear but moves the buttons out of the scene
            dialog.showAndWait();
        });
        BorderPane bp = new BorderPane();
        bp.setCenter(btn);
        primaryStage.setScene(new Scene(bp, 300, 250));
        primaryStage.show();
    }
}

@danielpeintner danielpeintner changed the title Dialog does not wrap correctly Dialog contentText does not wrap correctly always Mar 18, 2021
@danielpeintner
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant