mkpaz / atlantafx

Modern JavaFX CSS theme collection with additional controls.
https://mkpaz.github.io/atlantafx
MIT License
791 stars 64 forks source link

Editable ComboBox renders non default states incorrectly #98

Closed PavelTurk closed 1 month ago

PavelTurk commented 3 months ago

This is code:

public class JavaFxTest7 extends Application {

    @Override
    public void start(Stage stage) {
        Application.setUserAgentStylesheet(new Dracula().getUserAgentStylesheet());
        var comboBox = new ComboBox<String>();
        comboBox.setEditable(true);
        comboBox.setItems(FXCollections.observableArrayList(List.of("first", "second")));
        comboBox.pseudoClassStateChanged(Styles.STATE_DANGER, true);
        Scene scene = new Scene(new VBox(comboBox), 400, 200);
        stage.setScene(scene);
        stage.show();
    }

    public static void main(String[] args) {
        launch();
    }
}

And this is result:

Screenshot from 2024-05-17 15-34-29