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

C++: For freestanding builds, default to the fluent style #5914

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

tronical
Copy link
Member

Freestanding implies the lack of windowing system presence and therefore the choice of say Cupertino when building on macOS is not good.

Fluent isn't quite a great choice right now either, as it's not very touch friendly, but it's a compromise :)

Freestanding implies the lack of windowing system presence and therefore the choice of say Cupertino when building on macOS is not good.

Fluent isn't quite a great choice right now either, as it's not very touch friendly, but it's a compromise :)
@tronical tronical requested a review from ogoffart August 23, 2024 09:39
Copy link
Member

@ogoffart ogoffart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the problem that this if uses the "host" plarform instead of the "target" platform.

The equivalent in rust

pub fn get_native_style(has_qt: bool, target: &str) -> &'static str {
uses the target platform.

I guess then that would be equivalent because fluent is the callback.

But we would still have the problem when cross building an UI for an embedded linux device, wouldn't we?

@tronical
Copy link
Member Author

Is the problem that this if uses the "host" plarform instead of the "target" platform.

Yes, when compiling with SLINT_FEATURE_FREESTANDING, we still pick the host platform.

The equivalent in rust

pub fn get_native_style(has_qt: bool, target: &str) -> &'static str {

uses the target platform.
I guess then that would be equivalent because fluent is the callback.

More specifically, it uses the target_os, which doesn't exist with SLINT_FEATURE_FREESTANDING (or no_std).

But we would still have the problem when cross building an UI for an embedded linux device, wouldn't we?

Cross-compiling for an embedded Linux device will hopefully not end up using SLINT_FEATURE_FREESTANDING/no_std but a cmake toolchain file and the existing selection will work.

@tronical tronical merged commit e488a36 into master Aug 23, 2024
51 checks passed
@tronical tronical deleted the simon/mcu-pkg-style branch August 23, 2024 11:25
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.

2 participants