diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d31509a20..09e4e9c2d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -53,7 +53,7 @@ jobs: - name: Set default style if: matrix.os == 'windows-latest' run: | - echo "SIXTYFPS_STYLE=ugly" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "SIXTYFPS_STYLE=fluent" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append echo "SIXTYFPS_NO_QT=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Setup Node.js uses: actions/setup-node@v1 @@ -182,7 +182,7 @@ jobs: - name: Set default style if: matrix.os == 'windows-latest' run: | - echo "SIXTYFPS_STYLE=ugly" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "SIXTYFPS_STYLE=fluent" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append echo "SIXTYFPS_NO_QT=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Cache cargo registry uses: actions/cache@v2 diff --git a/.github/workflows/embedded_build.yaml b/.github/workflows/embedded_build.yaml index 9fb24611a..aa336db61 100644 --- a/.github/workflows/embedded_build.yaml +++ b/.github/workflows/embedded_build.yaml @@ -22,7 +22,7 @@ jobs: - aarch64-unknown-linux-gnu env: SIXTYFPS_NO_QT: 1 - SIXTYFPS_STYLE: ugly + SIXTYFPS_STYLE: fluent steps: - uses: actions/checkout@v2 - name: Set up Docker Buildx diff --git a/CHANGELOG.md b/CHANGELOG.md index ea6a5c95e..4b6a660cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. the `self` element now refer to the correct element instead of the root. - Rust: defaults to the native style if Qt is available - Rust: deprecated `SharedVector::as_slice_mut()`. Use `SharedVector::as_mut_slice()` instead. + - The default non-native widget style is now the new "fluent" style. ### Added diff --git a/sixtyfps_compiler/tests/syntax_tests.rs b/sixtyfps_compiler/tests/syntax_tests.rs index 37413557c..69d4a6d53 100644 --- a/sixtyfps_compiler/tests/syntax_tests.rs +++ b/sixtyfps_compiler/tests/syntax_tests.rs @@ -163,7 +163,7 @@ fn process_file_source( let mut compiler_config = sixtyfps_compilerlib::CompilerConfiguration::new( sixtyfps_compilerlib::generator::OutputFormat::Interpreter, ); - compiler_config.style = Some("ugly".into()); + compiler_config.style = Some("fluent".into()); let compile_diagnostics = if !parse_diagnostics.has_error() { let (_, build_diags) = spin_on::spin_on(sixtyfps_compilerlib::compile_syntax_node( syntax_node.clone(), diff --git a/sixtyfps_compiler/typeloader.rs b/sixtyfps_compiler/typeloader.rs index db4516507..a84fc22e9 100644 --- a/sixtyfps_compiler/typeloader.rs +++ b/sixtyfps_compiler/typeloader.rs @@ -91,12 +91,12 @@ impl<'a> TypeLoader<'a> { let is_wasm = cfg!(target_arch = "wasm32") || std::env::var("TARGET").map_or(false, |t| t.starts_with("wasm")); if !is_wasm { - diag.push_diagnostic_with_span("SIXTYFPS_STYLE not defined, defaulting to 'ugly', see https://github.com/sixtyfpsui/sixtyfps/issues/83 for more info".to_owned(), + diag.push_diagnostic_with_span("SIXTYFPS_STYLE not defined, defaulting to 'fluent', see https://github.com/sixtyfpsui/sixtyfps/issues/83 for more info".to_owned(), Default::default(), crate::diagnostics::DiagnosticLevel::Warning ); } - Cow::from("ugly") + Cow::from("fluent") }); let builtin_library = @@ -471,7 +471,7 @@ fn test_dependency_loading() { let mut compiler_config = CompilerConfiguration::new(crate::generator::OutputFormat::Interpreter); compiler_config.include_paths = vec![incdir]; - compiler_config.style = Some("ugly".into()); + compiler_config.style = Some("fluent".into()); let mut main_test_path = test_source_path.clone(); main_test_path.push("dependency_test_main.60"); @@ -506,7 +506,7 @@ fn test_load_from_callback_ok() { let mut compiler_config = CompilerConfiguration::new(crate::generator::OutputFormat::Interpreter); - compiler_config.style = Some("ugly".into()); + compiler_config.style = Some("fluent".into()); compiler_config.open_import_fallback = Some(Rc::new(move |path| { let ok_ = ok_.clone(); Box::pin(async move { @@ -548,7 +548,7 @@ X := XX {} fn test_manual_import() { let mut compiler_config = CompilerConfiguration::new(crate::generator::OutputFormat::Interpreter); - compiler_config.style = Some("ugly".into()); + compiler_config.style = Some("fluent".into()); let global_registry = TypeRegister::builtin(); let mut build_diagnostics = BuildDiagnostics::default(); let mut loader = TypeLoader::new(global_registry, &compiler_config, &mut build_diagnostics); diff --git a/sixtyfps_runtime/interpreter/dynamic_component.rs b/sixtyfps_runtime/interpreter/dynamic_component.rs index 51d7aa134..cc3b2a148 100644 --- a/sixtyfps_runtime/interpreter/dynamic_component.rs +++ b/sixtyfps_runtime/interpreter/dynamic_component.rs @@ -639,7 +639,7 @@ pub async fn load( compiler_config.style = Some(if sixtyfps_rendering_backend_default::HAS_NATIVE_STYLE { "native".to_owned() } else { - "ugly".to_owned() + "fluent".to_owned() }); } diff --git a/sixtyfps_runtime/rendering_backends/default/build.rs b/sixtyfps_runtime/rendering_backends/default/build.rs index b639b3eab..81ff91edc 100644 --- a/sixtyfps_runtime/rendering_backends/default/build.rs +++ b/sixtyfps_runtime/rendering_backends/default/build.rs @@ -39,6 +39,6 @@ fn main() { // and we want to write to a common directory, so write in the build/ dir let target_path = Path::new(&out_dir).parent().unwrap().parent().unwrap().join("SIXTYFPS_DEFAULT_STYLE.txt"); - std::fs::write(target_path, if has_native_style { b"native\n" as &[u8] } else { b"ugly\n" }) + std::fs::write(target_path, if has_native_style { b"native\n" as &[u8] } else { b"fluent\n" }) .unwrap(); } diff --git a/tools/lsp/main.rs b/tools/lsp/main.rs index 0d1c71ac7..60140522c 100644 --- a/tools/lsp/main.rs +++ b/tools/lsp/main.rs @@ -51,7 +51,7 @@ struct Cli { )] include_paths: Vec, - /// The style name for the preview ('native' or 'ugly') + /// The style name for the preview ('native', 'fluent' or 'ugly') #[structopt(long, name = "style name", default_value)] style: String, @@ -178,7 +178,7 @@ fn main_loop(connection: &Connection, params: serde_json::Value) -> Result<(), E let mut compiler_config = CompilerConfiguration::new(sixtyfps_compilerlib::generator::OutputFormat::Interpreter); compiler_config.style = - Some(if cli_args.style.is_empty() { "ugly".into() } else { cli_args.style }); + Some(if cli_args.style.is_empty() { "fluent".into() } else { cli_args.style }); compiler_config.include_paths = cli_args.include_paths; let mut document_cache = DocumentCache::new(&compiler_config); diff --git a/tools/online_editor/index.html b/tools/online_editor/index.html index 91f8a0749..e7c051de9 100644 --- a/tools/online_editor/index.html +++ b/tools/online_editor/index.html @@ -24,8 +24,8 @@