mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 05:44:52 +00:00
Make fluent the new default style
It's not ugly :-)
This commit is contained in:
parent
1fca971fa8
commit
01c3347d19
9 changed files with 15 additions and 14 deletions
4
.github/workflows/ci.yaml
vendored
4
.github/workflows/ci.yaml
vendored
|
@ -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
|
||||
|
|
2
.github/workflows/embedded_build.yaml
vendored
2
.github/workflows/embedded_build.yaml
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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()
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ struct Cli {
|
|||
)]
|
||||
include_paths: Vec<std::path::PathBuf>,
|
||||
|
||||
/// 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);
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
|
||||
<label for="style_combo">Style:</label>
|
||||
<select id="style_combo">
|
||||
<option value="ugly">ulgy</option>
|
||||
<option value="fluent">fluent</option>
|
||||
<option value="ugly">ulgy</option>
|
||||
</select>
|
||||
</p>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue