Skip to content

Conversation

@Eng-Fouad
Copy link
Member

Resolves #75

@CodeSimcoe This is a draft implementation. What do you think?

@Eng-Fouad
Copy link
Member Author

I think it is better to remove adding/applying stylesheets by FxViewRepository/@FxView entirely, because stylesheets can be added to FXML file directly:

/fxml/login.fxml:

<BorderPane xmlns:fx="http://javafx.com/fxml" stylesheets="@/style/login.css">
    <center>
        <Label styleClass="small-label" />

This way IntelliJ will also support navigating to the css file when clicking on the style class on FXML file, and it won't highlight style classes with yellow:

111

@CodeSimcoe WDYT?

@Eng-Fouad Eng-Fouad marked this pull request as ready for review October 10, 2024 11:56
@Eng-Fouad Eng-Fouad requested a review from a team as a code owner October 10, 2024 11:56
@CodeSimcoe
Copy link
Contributor

I think it is better to remove adding/applying stylesheets by FxViewRepository/@FxView entirely, because stylesheets can be added to FXML file directly:

/fxml/login.fxml:

<BorderPane xmlns:fx="http://javafx.com/fxml" stylesheets="@/style/login.css">
    <center>
        <Label styleClass="small-label" />

This way IntelliJ will also support navigating to the css file when clicking on the style class on FXML file, and it won't highlight style classes with yellow:

111

@CodeSimcoe WDYT?

That's a good point indeed.
We shall support live reload though

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

Successfully merging this pull request may close these issues.

Inject @FXMLLoader with a qualifier to bind it to a specific view

2 participants