From b12575a4c434052885cf8be6f242ba6e3039a148 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Fri, 13 Oct 2023 19:23:09 +0200 Subject: [PATCH] janitor: Go over our spell checking setup * Extend the cspell word list * Remove those extensions from individual source files * white-list licenses and such as we should not meddle with those * Fix spelling --- .../install-linux-dependencies/action.yaml | 4 +-- FAQ.md | 12 +++---- api/cpp/docs/cmake.md | 4 +-- api/cpp/include/slint-platform.h | 2 +- api/cpp/include/slint_image.h | 2 +- api/cpp/lib.rs | 2 +- api/cpp/platform.rs | 2 +- api/rs/build/lib.rs | 4 +-- cspell.json | 36 ++++++++++++++++--- .../src/language/widgets/standardtableview.md | 5 +-- docs/reference/src/language/widgets/switch.md | 3 +- docs/triage.md | 5 +-- editors/vscode/src/extension.ts | 2 +- editors/vscode/src/wasm_preview.ts | 4 +-- examples/7guis/tempconv.slint | 2 +- examples/bash/laptop.svg.license | 2 +- .../ui/blocks/kiosk_overlay.slint | 6 ++-- .../ui/pages/menu_page/settings.slint | 20 +++++------ examples/energy-monitor/ui/theme.slint | 34 +++++++++--------- .../energy-monitor/ui/widgets/bar_tiles.slint | 20 +++++------ .../energy-monitor/ui/widgets/check_box.slint | 4 +-- .../ui/widgets/icon_button.slint | 4 +-- examples/energy-monitor/ui/widgets/item.slint | 6 ++-- .../energy-monitor/ui/widgets/list_view.slint | 10 +++--- .../ui/widgets/navigation.slint | 6 ++-- .../ui/widgets/radio_button.slint | 6 ++-- .../energy-monitor/ui/widgets/switch.slint | 8 ++--- .../ui/widgets/tab_widget.slint | 10 +++--- examples/energy-monitor/ui/widgets/tile.slint | 14 ++++---- .../ui/widgets/value_display.slint | 10 +++--- examples/gallery/ui/pages/about_page.slint | 2 +- examples/printerdemo/rust/main.rs | 2 +- examples/printerdemo_old/ui/printerdemo.slint | 4 +-- internal/backends/qt/build.rs | 2 +- internal/backends/qt/key_generated.rs | 2 +- internal/backends/qt/qt_widgets.rs | 2 +- internal/backends/qt/qt_window.rs | 2 +- internal/backends/winit/lib.rs | 2 +- internal/common/enums.rs | 2 +- internal/compiler/langtype.rs | 2 +- internal/compiler/llr.rs | 2 +- internal/compiler/passes/binding_analysis.rs | 6 ++-- internal/compiler/passes/resolving.rs | 4 +-- .../tests/syntax/analysis/binding_loop1.slint | 2 +- .../tests/syntax/basic/parse_error.slint | 4 +-- .../typeloader/incpath/should_fail4.slint | 2 +- .../cupertino-base/std-widgets-base.slint | 3 +- .../widgets/cupertino-base/styling.slint | 4 +-- .../widgets/cupertino-base/tabwidget.slint | 4 +-- .../widgets/cupertino-base/textedit.slint | 4 +-- .../fluent-base/std-widgets-base.slint | 3 +- .../material-base/std-widgets-base.slint | 2 +- .../compiler/widgets/qt/std-widgets.slint | 2 -- internal/core/graphics/image.rs | 4 +-- internal/core/model/adapters.rs | 10 +++--- internal/core/platform.rs | 2 +- internal/core/renderer.rs | 2 +- .../core/software_renderer/draw_functions.rs | 2 +- internal/core/textlayout/fragments.rs | 2 +- internal/core/textlayout/shaping.rs | 4 +-- internal/core/window.rs | 2 +- internal/interpreter/dynamic_item_tree.rs | 2 -- internal/interpreter/highlight.rs | 2 -- internal/renderers/femtovg/images.rs | 2 +- internal/renderers/skia/d3d_surface.rs | 2 +- scripts/prepare_vscode_nightly.sh | 4 +-- tests/cases/callbacks/handler.slint | 28 +++++++-------- tests/cases/callbacks/handler_with_arg.slint | 28 +++++++-------- tests/cases/examples/box_shadow_use.slint | 2 +- tests/cases/input/clip_mouse.slint | 2 +- tests/cases/layout/horizontal_for.slint | 2 +- tests/cases/layout/vertical_if.slint | 2 +- .../properties/animation_from_click.slint | 6 ++-- .../cases/properties/property_animation.slint | 6 ++-- tests/cases/subcomponents/no_children.slint | 2 +- tests/cases/subcomponents/repeaters.slint | 2 +- tests/cases/types/brush.slint | 8 ++--- tests/cases/types/structs2.slint | 2 +- tests/cases/types/structs_keyword.slint | 2 +- .../software/basic/linear-gradients.slint | 2 +- tools/figma_import/src/rendered.rs | 2 +- tools/lsp/lsp_ext.rs | 2 +- tools/slintpad/src/lsp.ts | 2 -- tools/slintpad/src/preview_widget.ts | 2 +- 84 files changed, 236 insertions(+), 219 deletions(-) diff --git a/.github/actions/install-linux-dependencies/action.yaml b/.github/actions/install-linux-dependencies/action.yaml index 5f8323e9b4e..38614ca5831 100644 --- a/.github/actions/install-linux-dependencies/action.yaml +++ b/.github/actions/install-linux-dependencies/action.yaml @@ -16,7 +16,7 @@ inputs: required: false default: "no" old-ubuntu: - description: "This is running on an older verison of Ubuntu" + description: "This is running on an older version of Ubuntu" required: false default: "no" @@ -34,7 +34,7 @@ runs: run: | sudo apt-get update sudo apt-get install libseat-dev libsystemd-dev - shell: bash + shell: bash - name: Install C++ compiler if: ${{ (runner.os == 'Linux') && (inputs.force-gcc-10 == 'true') }} run: | diff --git a/FAQ.md b/FAQ.md index 1d64784e86d..12744508dca 100644 --- a/FAQ.md +++ b/FAQ.md @@ -3,7 +3,7 @@ # Frequently Asked Questions: - [General](#general) - - [Why does Slint use a domain specific langauage?](#why-does-slint-use-a-domain-specific-langauage) + - [Why does Slint use a domain specific language?](#why-does-slint-use-a-domain-specific-language) - [Will there be API bindings to integrate with my favorite programming language?](#will-there-be-api-bindings-to-integrate-with-my-favorite-programming-language) - [Licensing](#licensing) - [Royalty-free license](#royalty-free-license) @@ -11,7 +11,7 @@ - [What obligations do I need to fulfil to use the Royalty-free license?](#what-obligations-do-i-need-to-fulfil-to-use-the-royalty-free-license) - [Are there any limitations with the Royalty-free license?](#are-there-any-limitations-with-the-royalty-free-license) - [Scenario: What happens if my application is open-source (e.g. under MIT), forked by a different person and then redistributed?](#scenario-what-happens-if-my-application-is-open-source-eg-under-mit-forked-by-a-different-person-and-then-redistributed) - - [How are modifications to Slint itself covered under this licence?](#how-are-modifications-to-slint-itself-covered-under-this-licence) + - [How are modifications to Slint itself covered under this license?](#how-are-modifications-to-slint-itself-covered-under-this-license) - [If Slint were to be taken over by a larger company or the current owners were to have a change of heart, can they revoke existing licenses?](#if-slint-were-to-be-taken-over-by-a-larger-company-or-the-current-owners-were-to-have-a-change-of-heart-can-they-revoke-existing-licenses) - [GPLv3](#gplv3) - [If I link my program with Slint GPLv3, does it mean that I have to license my program under the GPLv3, too?](#if-i-link-my-program-with-slint-gplv3-does-it-mean-that-i-have-to-license-my-program-under-the-gplv3-too) @@ -27,7 +27,7 @@ ## General -### Why does Slint use a domain specific langauage? +### Why does Slint use a domain specific language? From our long experience of building UI toolkits, we have learnt that a domain specific, declarative language is best suited to describe UIs. The Slint language @@ -73,12 +73,12 @@ There are 2 limitations: 1. You are not permitted to distribute or make Slint publicly available alone and without integration into an application. For this purpose you may use the Software under the GNU General Public License, version 3. 2. You are not permitted the use Slint within Embedded Systems. An Embedded System is a computer system designed to perform a specific task within a larger mechanical or electrical system. For the purposes of this license, mobile phones are not considered to be Embedded Systems. - + #### Scenario: What happens if my application is open-source (e.g. under MIT), forked by a different person and then redistributed? The license does not restrict users on how they license their application. In the above scenario, the user may choose to use MIT-license for their application, which can be forked by a different person and then redistributed. If the forked application also uses Slint, then the person forking the application can also use the Royalty-free license as long as the obligations are fulfilled. Alternatively, the person may use one of the other Slint license options such as commercial or GPLv3. -#### How are modifications to Slint itself covered under this licence? +#### How are modifications to Slint itself covered under this license? The license does not restrict 'if' and 'how' the modifications to Slint should be distributed. Say for example, Alice uses Slint under this new license to develop application A and modifies Slint in some way. She may choose to release the modifications to Slint under any license of her choice including any of the open source licenses. Alternatively she may decide not to release the modifications. @@ -120,7 +120,7 @@ Under GPLv3. While the different software modules can remain under any license c Alice can add a note that Bob can distribute BobApp under a proprietary license if he either acquires a Slint proprietary license or removes the dependency to Slint. -## Miscelleneous +## Miscellaneous ### Do you provide Support? diff --git a/api/cpp/docs/cmake.md b/api/cpp/docs/cmake.md index a2fa500fa88..dc1372c1e17 100644 --- a/api/cpp/docs/cmake.md +++ b/api/cpp/docs/cmake.md @@ -1,5 +1,5 @@ - + # Installing Or Building With CMake @@ -43,7 +43,7 @@ First you need to install the prerequisites: * Install Rust by following the [Rust Getting Started Guide](https://www.rust-lang.org/learn/get-started). If you already have Rust installed, make sure that it's at least version 1.60 or newer. You can check which version you have installed - by running `rustc --version`. Once this is done, you should have the ```rustc``` compiler and the ```cargo``` build system installed in your path. + by running `rustc --version`. Once this is done, you should have the `rustc` compiler and the `cargo` build system installed in your path. * **[cmake](https://cmake.org/download/)** (3.21 or newer) * A C++ compiler that supports C++20 (e.g., **MSVC 2019 16.6** on Windows) diff --git a/api/cpp/include/slint-platform.h b/api/cpp/include/slint-platform.h index a1de3c6d663..b26b40b2b2d 100644 --- a/api/cpp/include/slint-platform.h +++ b/api/cpp/include/slint-platform.h @@ -82,7 +82,7 @@ class AbstractRenderer /// /// If the implementation of this bi-directional message passing protocol is incomplete, the user /// may experience unexpected behavior, or the intention of the developer calling functions on the -/// Window API may not be fullfilled. +/// Window API may not be fulfilled. /// /// Your WindowAdapter subclass must hold a renderer (either a SoftwareRenderer or a SkiaRenderer). /// In the renderer() method, you must return a reference to it. diff --git a/api/cpp/include/slint_image.h b/api/cpp/include/slint_image.h index a5f2a4c531f..fa4926fce9f 100644 --- a/api/cpp/include/slint_image.h +++ b/api/cpp/include/slint_image.h @@ -145,7 +145,7 @@ struct Image /// /// Safety: /// - /// This function is unsafe because invalid texture ids may lead to undefind behavior in OpenGL + /// This function is unsafe because invalid texture ids may lead to undefined behavior in OpenGL /// drivers. A valid texture id is one that was created by the same OpenGL context that is /// current during any of the invocations of the callback set on /// [`Window::set_rendering_notifier()`]. OpenGL contexts between instances of [`slint::Window`] diff --git a/api/cpp/lib.rs b/api/cpp/lib.rs index 5fa2e93dbd5..97c750098f9 100644 --- a/api/cpp/lib.rs +++ b/api/cpp/lib.rs @@ -152,7 +152,7 @@ mod allocator { if align <= core::mem::size_of::() { malloc(layout.size()) as *mut u8 } else { - // Ideally we'd use alligned_alloc, but that function caused heap corruption with esp-idf + // Ideally we'd use aligned_alloc, but that function caused heap corruption with esp-idf let ptr = malloc(layout.size() + align) as *mut u8; let shift = align - (ptr as usize % align); let ptr = ptr.add(shift); diff --git a/api/cpp/platform.rs b/api/cpp/platform.rs index c32beabaf90..cc1e4d060fe 100644 --- a/api/cpp/platform.rs +++ b/api/cpp/platform.rs @@ -181,7 +181,7 @@ struct CppPlatform { window_factory: unsafe extern "C" fn(PlatformUserData, *mut WindowAdapterRcOpaque), #[cfg(not(feature = "std"))] duration_since_start: unsafe extern "C" fn(PlatformUserData) -> u64, - // silent the warning depite `Clipboard` is a `#[non_exhaustive]` enum from another crate. + // silent the warning despite `Clipboard` is a `#[non_exhaustive]` enum from another crate. #[allow(improper_ctypes_definitions)] set_clipboard_text: unsafe extern "C" fn(PlatformUserData, &SharedString, Clipboard), #[allow(improper_ctypes_definitions)] diff --git a/api/rs/build/lib.rs b/api/rs/build/lib.rs index c21841861f7..3304afb9282 100644 --- a/api/rs/build/lib.rs +++ b/api/rs/build/lib.rs @@ -221,8 +221,8 @@ impl Write for CodeFormatter { fn formatter_test() { fn format_code(code: &str) -> String { let mut res = Vec::new(); - let mut formater = CodeFormatter::new(&mut res); - formater.write_all(code.as_bytes()).unwrap(); + let mut formatter = CodeFormatter::new(&mut res); + formatter.write_all(code.as_bytes()).unwrap(); String::from_utf8(res).unwrap() } diff --git a/cspell.json b/cspell.json index 8cb3a7068de..e18ba487421 100644 --- a/cspell.json +++ b/cspell.json @@ -33,8 +33,7 @@ "uninit", "unmap", "unsync", - "vsync", - "winit" + "vsync" ], "ignoreRegExpList": [ "/#\\[cfg\\b.+\\]/", @@ -61,60 +60,89 @@ } ], "words": [ + "aarch", + "accesskit", + "antialiasing", + "armv", "Bezier", "cbindgen", "cmake", "colspan", + "combobox", "datastructures", "dealloc", "flickable", "focusable", // common term in UI (css, dom, toolkits) + "fullscreen", + "gles", "Goffart", "gradians", + "grayscale", + "groupbox", "Hausmann", "Helvetica", + "inout", "layouting", // This would be worth renaming in the ItemVTable to layout_info "linebreak", + "lineedit", "listview", "lvalue", "microcontroller", "microcontrollers", "MSVC", + "napi", "ogoffart", "opengl", + "opengles", "pixmap", + "riscv", "rowspan", "rustc", "rvalue", + "scrollview", "SDK", "sixtyfps", + "skia", "slint", "slintpad", - "SPDX", + "spdx", + "spinbox", "streetsidesoftware", "struct", "structs", + "tableview", "tabwidget", "testcase", "textedit", "tmpobj", "toolchain", + "toolkit", + "touchpad", "tronical", + "typeloader", + "uefi", "uncompiled", + "unerase", "unmapping", // present participle of unmap "untracked", "viewbox", "vtable", + "vulkan", "wasm", "webassembly", "windowrc", // use in slint_windowrc_foo FFI functions - "xtask" + "winit", + "xtask", + "xtensa" ], "ignorePaths": [ "api/cpp/docs/conf.py", "Cargo.toml", "CHANGELOG.md", "cspell.json", + "LICENSES", + "examples/*/lang/**", + "internal/backends/qt/QtThirdPartySoftware_Listing.txt", ".github/workflows/*.yaml" ], "ignoreRegExpList": [ diff --git a/docs/reference/src/language/widgets/standardtableview.md b/docs/reference/src/language/widgets/standardtableview.md index 3f3609644cc..71c363b3a95 100644 --- a/docs/reference/src/language/widgets/standardtableview.md +++ b/docs/reference/src/language/widgets/standardtableview.md @@ -1,8 +1,9 @@ + ## `StandardTableView` The `StandardTableView` represents a table of data with columns and rows. Cells -are organised in a model where each row is a model of +are organized in a model where each row is a model of \[[`StandardListViewItem`](../builtins/structs.md#standardlistviewitem)\]. ### Properties @@ -23,7 +24,7 @@ Same as [`ListView`](#listview), and in addition: ### Functions -- **`set-current-row(int)`: Sets the current row by index and brings it into view. +- **`set-current-row(int)`**: Sets the current row by index and brings it into view. ### Example diff --git a/docs/reference/src/language/widgets/switch.md b/docs/reference/src/language/widgets/switch.md index 1ea976cc1bb..ba52462bbdb 100644 --- a/docs/reference/src/language/widgets/switch.md +++ b/docs/reference/src/language/widgets/switch.md @@ -1,4 +1,5 @@ + ## `Switch` A `Switch` is a representation of a physical switch that allows users to turn things on or off. Consider using a `CheckBox` instead if you want the user to select or deselect values, for example in a list with multiple options. @@ -7,7 +8,7 @@ A `Switch` is a representation of a physical switch that allows users to turn th - **`checked`**: (_inout_ _bool_): Whether the switch is checked or not (default: false). - **`enabled`**: (_in_ _bool_): Defaults to true. When false, the switch can't be pressed (default: true). -- **`has-focus`**: (_out_ _bool_): Set to true when the switch has keyboard focue (default: false). +- **`has-focus`**: (_out_ _bool_): Set to true when the switch has keyboard focus (default: false). - **`text`** (_in_ _string_): The text written next to the switch. ### Callbacks diff --git a/docs/triage.md b/docs/triage.md index 17723c3ab50..a8fba8be4dc 100644 --- a/docs/triage.md +++ b/docs/triage.md @@ -1,4 +1,5 @@ + ## Introduction This document will outline the process of triaging GitHub issues and provide an explanation of GitHub labels. @@ -6,7 +7,7 @@ This document will outline the process of triaging GitHub issues and provide an ## GitHub Labels Labels that start with `a:` are area labels. -Area labels help categorise issues based on their scope. Each issue should ideally have at least one area label. +Area labels help categorize issues based on their scope. Each issue should ideally have at least one area label. The description of the area label ends with a code that indicates the maintainer or backup maintainer of that area. For example, if a label description ends with `(mX,bY)`, it means person X is the maintainer, and person Y is the backup maintainer for that area. @@ -57,7 +58,7 @@ Filter for all the issues not assigned to an area: curl -H 'Accept: application/vnd.github.v3+json' "https://api.github.com/repos/slint-ui/slint/labels?per_page=100&page=1" | jq -r '.[].name' | grep "^a:" | sed 's/^\(.*\)$/-label:\\\"\1\\\"/' | xargs echo ``` -Filter of all issues for which X is a maintainer (replace the X in `"mX"` with the right letter name, or `bX` for the backup) +Filter of all issues for which X is a maintainer (replace the X in `"mX"` with the right letter name, or `bX` for the backup) ```sh curl -H 'Accept: application/vnd.github.v3+json' "https://api.github.com/repos/slint-ui/slint/labels?per_page=100&page=1" | jq -r '.[] | select(.description | contains("mX")) | .name' | awk '{printf "\"%s\",", $0}' | sed 's/^\(.*\),$/label:\1\n/' diff --git a/editors/vscode/src/extension.ts b/editors/vscode/src/extension.ts index 0a7800ffd5a..a50ef83102c 100644 --- a/editors/vscode/src/extension.ts +++ b/editors/vscode/src/extension.ts @@ -3,7 +3,7 @@ // This file is the entry point for the vscode extension (not the browser one) -// cSpell: ignore aarch armv codespaces gnueabihf vsix +// cSpell: ignore codespaces gnueabihf vsix import * as path from "path"; import { existsSync } from "fs"; diff --git a/editors/vscode/src/wasm_preview.ts b/editors/vscode/src/wasm_preview.ts index 24fcab05236..e22c9639016 100644 --- a/editors/vscode/src/wasm_preview.ts +++ b/editors/vscode/src/wasm_preview.ts @@ -1,8 +1,6 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// cSpell: ignore winit - import { Uri, TextDocumentShowOptions } from "vscode"; import * as vscode from "vscode"; import { BaseLanguageClient } from "vscode-languageclient"; @@ -245,7 +243,7 @@ function getPreviewHtml(slint_wasm_preview_url: Uri): string { try { slint.run_event_loop(); } catch (e) { - // ignore winit event loop exception + // ignore event loop exception } current_instance = (async () => { let new_instance = await component.create("slint_canvas"); diff --git a/examples/7guis/tempconv.slint b/examples/7guis/tempconv.slint index f2f7fbbac1c..e92474e380d 100644 --- a/examples/7guis/tempconv.slint +++ b/examples/7guis/tempconv.slint @@ -15,7 +15,7 @@ component TempConv inherits Window { } } Text { - text: "°Celcius = "; + text: "°Celsius = "; vertical-alignment: center; } f := LineEdit { diff --git a/examples/bash/laptop.svg.license b/examples/bash/laptop.svg.license index 57851ab564f..8849d0ab65f 100644 --- a/examples/bash/laptop.svg.license +++ b/examples/bash/laptop.svg.license @@ -1,3 +1,3 @@ -SPDX-FileCopyrightText: 2021 Goole Noto Font +SPDX-FileCopyrightText: 2021 Google Noto Font SPDX-License-Identifier: OFL-1.1 diff --git a/examples/energy-monitor/ui/blocks/kiosk_overlay.slint b/examples/energy-monitor/ui/blocks/kiosk_overlay.slint index 5f98936f34a..7de99d201f8 100644 --- a/examples/energy-monitor/ui/blocks/kiosk_overlay.slint +++ b/examples/energy-monitor/ui/blocks/kiosk_overlay.slint @@ -25,10 +25,10 @@ export component KioskOverlay { i-text := Text { x: parent.width - self.width - 5px; y: 5px; - font-size: Theme.typo.desciption.size; - font-weight: Theme.typo.desciption.weight; + font-size: Theme.typo.description.size; + font-weight: Theme.typo.description.weight; text: "Kiosk"; - color: Theme.palette.limon-green; + color: Theme.palette.lemon-green; opacity: 0.5; } } diff --git a/examples/energy-monitor/ui/pages/menu_page/settings.slint b/examples/energy-monitor/ui/pages/menu_page/settings.slint index 12d7c930908..f0e7a40f586 100644 --- a/examples/energy-monitor/ui/pages/menu_page/settings.slint +++ b/examples/energy-monitor/ui/pages/menu_page/settings.slint @@ -9,10 +9,10 @@ import { IconButton, CheckBox, RadioButton, Switch, ScrollView, Item, ItemGroupB export global SettingsAdapter { callback check-radio-option(int /* index */); - // fuctions - in-out property fuction-one-checked: true; + // functions + in-out property function-one-checked: true; in-out property kiosk-mode-checked; - in-out property fuction-three-checked; + in-out property function-three-checked; // radio options in-out property radio-option-one-checked: true; @@ -39,10 +39,10 @@ export component Settings inherits Page { callback close(); callback check-radio-option <=> SettingsAdapter.check-radio-option; - // fuctions - in-out property fuction-one-checked <=> SettingsAdapter.fuction-one-checked; + // functions + in-out property function-one-checked <=> SettingsAdapter.function-one-checked; in-out property kiosk-mode-checked <=> SettingsAdapter.kiosk-mode-checked; - in-out property fuction-three-checked <=> SettingsAdapter.fuction-three-checked; + in-out property function-three-checked <=> SettingsAdapter.function-three-checked; // radio options in-out property radio-option-one-checked <=> SettingsAdapter.radio-option-one-checked; @@ -75,7 +75,7 @@ export component Settings inherits Page { text: "Function One"; i-function-one-check-box := CheckBox { - checked <=> root.fuction-one-checked; + checked <=> root.function-one-checked; } clicked => { @@ -181,12 +181,12 @@ export component Settings inherits Page { Item { text: "Function Three"; - i-fuction-three := Switch { - checked <=> root.fuction-three-checked; + i-function-three := Switch { + checked <=> root.function-three-checked; } clicked => { - i-fuction-three.clicked(); + i-function-three.clicked(); } } } diff --git a/examples/energy-monitor/ui/theme.slint b/examples/energy-monitor/ui/theme.slint index 243e4ff5ad8..038dad2f3be 100644 --- a/examples/energy-monitor/ui/theme.slint +++ b/examples/energy-monitor/ui/theme.slint @@ -7,8 +7,8 @@ export struct Palette { pure-black: brush, dark-deep-blue: brush, shark-gray: brush, - limon-green: brush, - limon-green-op10: brush, + lemon-green: brush, + lemon-green-op10: brush, white: brush, dimmer: brush, @@ -24,7 +24,7 @@ export struct Palette { slint-blue-800: brush, slint-blue-900: brush, - // limon green + // lime green lime-green-50: brush, lime-green-100: brush, lime-green-200: brush, @@ -37,9 +37,9 @@ export struct Palette { lime-green-900: brush, // gradients - limon-green-gradient: brush, - limon-green-light-gradient: brush, - limon-green-radial-gradient: brush, + lemon-green-gradient: brush, + lemon-green-light-gradient: brush, + lemon-green-radial-gradient: brush, slint-blue-gradient: brush, heliotrope-gradient: brush, dark-left-gradient: brush, @@ -79,8 +79,8 @@ export struct Typo { header-item: Font, header-item-light: Font, value: Font, - desciption: Font, - desciption-light: Font, + description: Font, + description-light: Font, value-big: Font, } @@ -91,8 +91,8 @@ export global Theme { pure-black: #000000, dark-deep-blue: #040708, shark-gray: #2C2F36, - limon-green: #DEFB3A, - limon-green-op10: #defb3a1a, + lemon-green: #DEFB3A, + lemon-green-op10: #defb3a1a, white: #FFFFFF, dimmer: #0000007b, @@ -108,7 +108,7 @@ export global Theme { slint-blue-800: #0019F2, slint-blue-900: #000AEF, - // limon gren + // lime green lime-green-50: #FBFFE6, lime-green-100: #F4FDC0, lime-green-200: #EBFC93, @@ -121,9 +121,9 @@ export global Theme { lime-green-900: #D9D9D9, // gradients - limon-green-gradient: @linear-gradient(135deg, #defb3a75 0%, #defb3a00 100%), - limon-green-light-gradient: @linear-gradient(135deg, #DEFB3A 0%, #defb3a33 100%), - limon-green-radial-gradient: @radial-gradient(circle, #DEFB3A20 0%, #DEFB3A00 100%), + lemon-green-gradient: @linear-gradient(135deg, #defb3a75 0%, #defb3a00 100%), + lemon-green-light-gradient: @linear-gradient(135deg, #DEFB3A 0%, #defb3a33 100%), + lemon-green-radial-gradient: @radial-gradient(circle, #DEFB3A20 0%, #DEFB3A00 100%), slint-blue-gradient: @linear-gradient(135deg, #6c4bff76 0%, #6C4BFF00 100%), heliotrope-gradient: @linear-gradient(180deg, #896fff 0%, #39316B 100%), dark-left-gradient: @linear-gradient(90deg, #040708 0%, #04070875 50%, #04070800 100%), @@ -176,11 +176,11 @@ export global Theme { size: 26px, weight: 500 }, - desciption: { + description: { size: 14px, weight: 400 }, - desciption-light: { + description-light: { size: 14px, weight: 200 }, @@ -189,4 +189,4 @@ export global Theme { weight: 200 }, }; -} \ No newline at end of file +} diff --git a/examples/energy-monitor/ui/widgets/bar_tiles.slint b/examples/energy-monitor/ui/widgets/bar_tiles.slint index 939bc6c4fcf..e7c2fa7370a 100644 --- a/examples/energy-monitor/ui/widgets/bar_tiles.slint +++ b/examples/energy-monitor/ui/widgets/bar_tiles.slint @@ -24,8 +24,8 @@ component ValueLabel { vertical-stretch: 0; horizontal-alignment: right; text: root.text; - font-size: Theme.typo.desciption-light.size; - font-weight: Theme.typo.desciption-light.weight; + font-size: Theme.typo.description-light.size; + font-weight: Theme.typo.description-light.weight; } Text { @@ -33,14 +33,14 @@ component ValueLabel { vertical-stretch: 0; horizontal-alignment: left; text: "°"; - font-size: Theme.typo.desciption-light.size; - font-weight: Theme.typo.desciption-light.weight; + font-size: Theme.typo.description-light.size; + font-weight: Theme.typo.description-light.weight; } } } component BarTile { - in property title <=> i-tiitle.text; + in property title <=> i-title.text; in property icon <=> i-icon.source; in property max; in property min; @@ -54,12 +54,12 @@ component BarTile { VerticalLayout { spacing: 7px; - i-tiitle := Text { + i-title := Text { color: Theme.palette.white; vertical-stretch: 0; horizontal-alignment: center; - font-size: Theme.typo.desciption.size; - font-weight: Theme.typo.desciption.weight; + font-size: Theme.typo.description.size; + font-weight: Theme.typo.description.weight; } i-icon := Image { @@ -88,7 +88,7 @@ component BarTile { min_width: 12px; border-radius: 6px; - background: Theme.palette.limon-green-light-gradient; + background: Theme.palette.lemon-green-light-gradient; } } } @@ -138,4 +138,4 @@ export component BarTiles { ] } } -} \ No newline at end of file +} diff --git a/examples/energy-monitor/ui/widgets/check_box.slint b/examples/energy-monitor/ui/widgets/check_box.slint index 96190c9a830..92822fcb900 100644 --- a/examples/energy-monitor/ui/widgets/check_box.slint +++ b/examples/energy-monitor/ui/widgets/check_box.slint @@ -36,8 +36,8 @@ export component CheckBox { states [ checked when checked : { i-container.border-width: 0; - i-container.background: Theme.palette.limon-green; + i-container.background: Theme.palette.lemon-green; i-check-icon.opacity: 1.0; } ] -} \ No newline at end of file +} diff --git a/examples/energy-monitor/ui/widgets/icon_button.slint b/examples/energy-monitor/ui/widgets/icon_button.slint index 821d3e2567a..139f2f1e4dd 100644 --- a/examples/energy-monitor/ui/widgets/icon_button.slint +++ b/examples/energy-monitor/ui/widgets/icon_button.slint @@ -31,7 +31,7 @@ export component IconButton { opacity: 0.25; } pressed when i-touch-area.pressed : { - i-icon.colorize: Theme.palette.limon-green; + i-icon.colorize: Theme.palette.lemon-green; } ] -} \ No newline at end of file +} diff --git a/examples/energy-monitor/ui/widgets/item.slint b/examples/energy-monitor/ui/widgets/item.slint index c77499ea399..a5852ac7337 100644 --- a/examples/energy-monitor/ui/widgets/item.slint +++ b/examples/energy-monitor/ui/widgets/item.slint @@ -31,8 +31,8 @@ export component Item { i-text := Text { horizontal-stretch: 1; color: Theme.palette.white; - font-size: Theme.typo.desciption.size; - font-weight: Theme.typo.desciption.weight; + font-size: Theme.typo.description.size; + font-weight: Theme.typo.description.weight; vertical-alignment: center; } @@ -71,4 +71,4 @@ export component ItemGroupBox { } } } -} \ No newline at end of file +} diff --git a/examples/energy-monitor/ui/widgets/list_view.slint b/examples/energy-monitor/ui/widgets/list_view.slint index 5933e0284a4..863ee4a1cbb 100644 --- a/examples/energy-monitor/ui/widgets/list_view.slint +++ b/examples/energy-monitor/ui/widgets/list_view.slint @@ -31,8 +31,8 @@ component ListViewItem { i-text := Text { horizontal-stretch: 1; color: Theme.palette.white; - font-size: Theme.typo.desciption.size; - font-weight: Theme.typo.desciption.weight; + font-size: Theme.typo.description.size; + font-weight: Theme.typo.description.weight; vertical-alignment: center; } @@ -40,7 +40,7 @@ component ListViewItem { horizontal-stretch: 0; visible: false; source: Images.check; - colorize: Theme.palette.limon-green; + colorize: Theme.palette.lemon-green; } } @@ -52,7 +52,7 @@ component ListViewItem { states [ selected when selected : { - i-container.border-color: Theme.palette.limon-green; + i-container.border-color: Theme.palette.lemon-green; i-icon.visible: true; } ] @@ -88,4 +88,4 @@ export component ListView { selected-index = index; selection-changed(index); } -} \ No newline at end of file +} diff --git a/examples/energy-monitor/ui/widgets/navigation.slint b/examples/energy-monitor/ui/widgets/navigation.slint index 4760cf43e8c..6f6c9dccf25 100644 --- a/examples/energy-monitor/ui/widgets/navigation.slint +++ b/examples/energy-monitor/ui/widgets/navigation.slint @@ -26,7 +26,7 @@ export component Navigation { TouchArea { clicked => { - toogle-show-navigation(); + toggle-show-navigation(); root.clicked(); } } @@ -93,7 +93,7 @@ export component Navigation { } } - function toogle-show-navigation() { + function toggle-show-navigation() { show-navigation = !self.show-navigation; } @@ -108,4 +108,4 @@ export component Navigation { public function hide() { show-navigation = false; } -} \ No newline at end of file +} diff --git a/examples/energy-monitor/ui/widgets/radio_button.slint b/examples/energy-monitor/ui/widgets/radio_button.slint index 60bd708ec33..982dc64789b 100644 --- a/examples/energy-monitor/ui/widgets/radio_button.slint +++ b/examples/energy-monitor/ui/widgets/radio_button.slint @@ -31,8 +31,8 @@ export component RadioButton { states [ checked when checked : { - i-container.border-color: Theme.palette.limon-green; - i-indicator.background: Theme.palette.limon-green; + i-container.border-color: Theme.palette.lemon-green; + i-indicator.background: Theme.palette.lemon-green; } ] -} \ No newline at end of file +} diff --git a/examples/energy-monitor/ui/widgets/switch.slint b/examples/energy-monitor/ui/widgets/switch.slint index 8c8eaf53d1c..8efa5f1d16e 100644 --- a/examples/energy-monitor/ui/widgets/switch.slint +++ b/examples/energy-monitor/ui/widgets/switch.slint @@ -45,10 +45,10 @@ export component Switch { states [ checked when checked : { - i-container.background: Theme.palette.limon-green-op10; - i-container.border-color: Theme.palette.limon-green; - i-indicator.background: Theme.palette.limon-green; + i-container.background: Theme.palette.lemon-green-op10; + i-container.border-color: Theme.palette.lemon-green; + i-indicator.background: Theme.palette.lemon-green; i-indicator.x: i-container.width - i-indicator.width - 2 * i-container.border-width; } ] -} \ No newline at end of file +} diff --git a/examples/energy-monitor/ui/widgets/tab_widget.slint b/examples/energy-monitor/ui/widgets/tab_widget.slint index 51811052351..20f84ea242d 100644 --- a/examples/energy-monitor/ui/widgets/tab_widget.slint +++ b/examples/energy-monitor/ui/widgets/tab_widget.slint @@ -48,11 +48,11 @@ component Tab { animate opacity { duration: Theme.durations.medium; } } - i-inidator := Rectangle { + i-initiator := Rectangle { width: 0; y: 0; height: 1px; - background: Theme.palette.limon-green; + background: Theme.palette.lemon-green; visible: selected; animate width { duration: Theme.durations.medium; } @@ -62,8 +62,8 @@ component Tab { states [ selected when selected : { - i-inidator.width: root.width; - i-title.color: Theme.palette.limon-green; + i-initiator.width: root.width; + i-title.color: Theme.palette.lemon-green; i-gradient.opacity: 1.0; } ] @@ -102,4 +102,4 @@ export component TabWidget { } } } -} \ No newline at end of file +} diff --git a/examples/energy-monitor/ui/widgets/tile.slint b/examples/energy-monitor/ui/widgets/tile.slint index 09a6e7cc681..8e3430ece73 100644 --- a/examples/energy-monitor/ui/widgets/tile.slint +++ b/examples/energy-monitor/ui/widgets/tile.slint @@ -27,7 +27,7 @@ export component Tile { x: (parent.width - self.width) / 2; min-width: 52px; height: 43px; - colorize: Theme.palette.limon-green; + colorize: Theme.palette.lemon-green; image-fit: contain; } @@ -42,16 +42,16 @@ export component Tile { i-text := Text { horizontal-alignment: center; color: Theme.palette.white; - font-size: Theme.typo.desciption.size; - font-weight: Theme.typo.desciption.weight; + font-size: Theme.typo.description.size; + font-weight: Theme.typo.description.weight; } i-sub-text := Text { horizontal-alignment: center; - color: Theme.palette.limon-green; - font-size: Theme.typo.desciption-light.size; - font-weight: Theme.typo.desciption-light.weight; + color: Theme.palette.lemon-green; + font-size: Theme.typo.description-light.size; + font-weight: Theme.typo.description-light.weight; } } } -} \ No newline at end of file +} diff --git a/examples/energy-monitor/ui/widgets/value_display.slint b/examples/energy-monitor/ui/widgets/value_display.slint index da0588b8c64..83069676e89 100644 --- a/examples/energy-monitor/ui/widgets/value_display.slint +++ b/examples/energy-monitor/ui/widgets/value_display.slint @@ -17,7 +17,7 @@ component ValueDelegate { Rectangle { min_width: 1px; - background: alternative-colors ? Theme.palette.slint-blue-300 : Theme.palette.limon-green; + background: alternative-colors ? Theme.palette.slint-blue-300 : Theme.palette.lemon-green; horizontal-stretch: 0; } @@ -26,7 +26,7 @@ component ValueDelegate { horizontal-stretch: 1; i-title := Text { - color: alternative-colors ? Theme.palette.slint-blue-300 : Theme.palette.limon-green; + color: alternative-colors ? Theme.palette.slint-blue-300 : Theme.palette.lemon-green; font-size: Theme.typo.label.size; font-weight: Theme.typo.label.weight; } @@ -46,7 +46,7 @@ component ValueDelegate { i-unit := Text { y: Theme.spaces.small; vertical-alignment: center; - color: alternative-colors ? Theme.palette.slint-blue-300 : Theme.palette.limon-green; + color: alternative-colors ? Theme.palette.slint-blue-300 : Theme.palette.lemon-green; font-size: Theme.typo.label-light.size; font-weight: Theme.typo.label-light.weight; } @@ -85,7 +85,7 @@ export component ValueDisplay { width: 100%; height: 100%; border-radius: 4px; - background: alternative-colors ? Theme.palette.slint-blue-gradient : Theme.palette.limon-green-gradient; + background: alternative-colors ? Theme.palette.slint-blue-gradient : Theme.palette.lemon-green-gradient; } if(model.length > 0 && !vertical) : HorizontalLayout { @@ -116,4 +116,4 @@ export component ValueDisplay { active: root.active; } } -} \ No newline at end of file +} diff --git a/examples/gallery/ui/pages/about_page.slint b/examples/gallery/ui/pages/about_page.slint index 62e3e57a29e..044c283942d 100644 --- a/examples/gallery/ui/pages/about_page.slint +++ b/examples/gallery/ui/pages/about_page.slint @@ -7,7 +7,7 @@ import { Page } from "page.slint"; export component AboutPage inherits Page { title: "About"; - description: "Are you curious now? Check out the docs and gettings start from the Github repository and the website https://slint.dev and try it yourself."; + description: "Are you curious now? Check out the docs and getting starteds from the Github repository and the website https://slint.dev and try it yourself."; AboutSlint {} } diff --git a/examples/printerdemo/rust/main.rs b/examples/printerdemo/rust/main.rs index 0133930dbce..72d6cdbaab4 100644 --- a/examples/printerdemo/rust/main.rs +++ b/examples/printerdemo/rust/main.rs @@ -9,7 +9,7 @@ use std::rc::Rc; slint::include_modules!(); -/// Returns the current time formated as a string +/// Returns the current time formatted as a string fn current_time() -> slint::SharedString { #[cfg(not(target_arch = "wasm32"))] return chrono::Local::now().format("%H:%M:%S %d/%m/%Y").to_string().into(); diff --git a/examples/printerdemo_old/ui/printerdemo.slint b/examples/printerdemo_old/ui/printerdemo.slint index 807079b986b..805d313d464 100644 --- a/examples/printerdemo_old/ui/printerdemo.slint +++ b/examples/printerdemo_old/ui/printerdemo.slint @@ -62,7 +62,7 @@ export component MainWindow inherits Window { title: "Slint printer demo"; background: white; - /// Note that this property is overwriten in the .cpp and .rs code. + /// Note that this property is overwritten in the .cpp and .rs code. /// The data is only in this file so it looks good in the viewer in-out property <[InkLevel]> ink-levels: [ {color: #0ff, level: 60%}, @@ -158,7 +158,7 @@ export component MainWindow inherits Window { } invisible when root.active-page > 0 && root.active-page != idx + 1 : { color: transparent; - // FIXME: should probaby hide the entire item under with z-ordering + // FIXME: should probably hide the entire item under with z-ordering img.y: 1000000000px; text.color: #0000; } diff --git a/internal/backends/qt/build.rs b/internal/backends/qt/build.rs index 63176e49141..0f8cc376545 100644 --- a/internal/backends/qt/build.rs +++ b/internal/backends/qt/build.rs @@ -1,7 +1,7 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// cSpell: ignore combobox groupbox lineedit listviewitem scrollview spinbox stylemetrics +// cSpell: ignore listviewitem stylemetrics fn main() { println!("cargo:rerun-if-env-changed=SLINT_NO_QT"); diff --git a/internal/backends/qt/key_generated.rs b/internal/backends/qt/key_generated.rs index 16435834392..4e9ac941b3d 100644 --- a/internal/backends/qt/key_generated.rs +++ b/internal/backends/qt/key_generated.rs @@ -5,7 +5,7 @@ ```sh bindgen /usr/include/qt/QtCore/qnamespace.h --whitelist-type Qt::Key --whitelist-type Qt::KeyboardModifier --whitelist-type Qt::AlignmentFlag --whitelist-type Qt::TextFlag --whitelist-type Qt::FillRule --whitelist-type Qt::CursorShape -o internal/backends/qt/key_generated.rs -- -I /usr/include/qt -xc++ ``` -then add licence header and this doc +then add license header and this doc */ #![allow(unused)] #![allow(non_camel_case_types)] diff --git a/internal/backends/qt/qt_widgets.rs b/internal/backends/qt/qt_widgets.rs index bb8afdb169f..c317f0e036b 100644 --- a/internal/backends/qt/qt_widgets.rs +++ b/internal/backends/qt/qt_widgets.rs @@ -219,7 +219,7 @@ cpp! {{ // For our hacks to work, we need to have some invisible parent widget. static QWidget globalParent; ptr->setParent(&globalParent); - // Let Qt thinks the widget is visible even if it isn't so update() from animation is forwared + // Let Qt thinks the widget is visible even if it isn't so update() from animation is forwarded ptr->setAttribute(Qt::WA_WState_Visible, true); // Hack so update() send a UpdateLater event ptr->setAttribute(Qt::WA_WState_InPaintEvent, true); diff --git a/internal/backends/qt/qt_window.rs b/internal/backends/qt/qt_window.rs index 437568019ba..56414d3706c 100644 --- a/internal/backends/qt/qt_window.rs +++ b/internal/backends/qt/qt_window.rs @@ -1,7 +1,7 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// cSpell: ignore antialiasing frameless qbrush qpointf qreal qwidgetsize svgz +// cSpell: ignore frameless qbrush qpointf qreal qwidgetsize svgz use cpp::*; use euclid::approxeq::ApproxEq; diff --git a/internal/backends/winit/lib.rs b/internal/backends/winit/lib.rs index d5876506da9..619db4a2cae 100644 --- a/internal/backends/winit/lib.rs +++ b/internal/backends/winit/lib.rs @@ -131,7 +131,7 @@ pub const HAS_NATIVE_STYLE: bool = false; #[doc(hidden)] pub mod native_widgets {} -#[doc = concat!("This struct implements the Slint Platform trait. Use this in conjuction with [`slint::platform::set_platform`](https://slint.dev/releases/", env!("CARGO_PKG_VERSION"), "/docs/rust/slint/platform/fn.set_platform.html) to initialize.")] +#[doc = concat!("This struct implements the Slint Platform trait. Use this in conjunction with [`slint::platform::set_platform`](https://slint.dev/releases/", env!("CARGO_PKG_VERSION"), "/docs/rust/slint/platform/fn.set_platform.html) to initialize.")] /// Slint to use winit for all windowing system interaction. /// /// ```rust,no_run diff --git a/internal/common/enums.rs b/internal/common/enums.rs index 8f7b2e4ee3c..5623610a3eb 100644 --- a/internal/common/enums.rs +++ b/internal/common/enums.rs @@ -3,7 +3,7 @@ //! This module contains all enums exposed in the .slint language. -// cSpell: ignore combobox evenodd grabbable horizontalbox horizontallayout nesw spinbox standardbutton standardtableview verticalbox verticallayout +// cSpell: ignore evenodd grabbable horizontalbox horizontallayout nesw standardbutton standardtableview verticalbox verticallayout /// Call a macro with every enum exposed in the .slint language /// diff --git a/internal/compiler/langtype.rs b/internal/compiler/langtype.rs index 1114f631eec..7c0305ae981 100644 --- a/internal/compiler/langtype.rs +++ b/internal/compiler/langtype.rs @@ -63,7 +63,7 @@ pub enum Type { name: Option, /// When declared in .slint, this is the node of the declaration. node: Option, - /// deriven + /// derived rust_attributes: Option>, }, Enumeration(Rc), diff --git a/internal/compiler/llr.rs b/internal/compiler/llr.rs index 983ea0a5041..daae7fa455e 100644 --- a/internal/compiler/llr.rs +++ b/internal/compiler/llr.rs @@ -11,7 +11,7 @@ pub mod lower_expression; pub mod lower_to_item_tree; pub mod pretty_print; -/// The optimisation passes over the LLR +/// The optimization passes over the LLR pub mod optim_passes { pub mod count_property_use; mod inline_expressions; diff --git a/internal/compiler/passes/binding_analysis.rs b/internal/compiler/passes/binding_analysis.rs index 784d0add12e..92a8b26cd3e 100644 --- a/internal/compiler/passes/binding_analysis.rs +++ b/internal/compiler/passes/binding_analysis.rs @@ -152,7 +152,7 @@ fn analyze_element( if binding.borrow().analysis.is_some() { continue; } - analyse_binding( + analyze_binding( &PropertyPath::from(NamedReference::new(elem, name)), context, reverse_aliases, @@ -194,7 +194,7 @@ fn analyze_element( #[derive(Copy, Clone, dm::BitAnd, dm::BitOr, dm::BitAndAssign, dm::BitOrAssign)] struct DependsOnExternal(bool); -fn analyse_binding( +fn analyze_binding( current: &PropertyPath, context: &mut AnalysisContext, reverse_aliases: &ReverseAliases, @@ -342,7 +342,7 @@ fn process_property( loop { let element = prop.prop.element(); if element.borrow().bindings.contains_key(prop.prop.name()) { - analyse_binding(&prop, context, reverse_aliases, diag); + analyze_binding(&prop, context, reverse_aliases, diag); } let next = if let ElementType::Component(base) = &element.borrow().base_type { if element.borrow().property_declarations.contains_key(prop.prop.name()) { diff --git a/internal/compiler/passes/resolving.rs b/internal/compiler/passes/resolving.rs index 27a669a3c06..eea976e43f1 100644 --- a/internal/compiler/passes/resolving.rs +++ b/internal/compiler/passes/resolving.rs @@ -1210,7 +1210,7 @@ impl Expression { fields: elem_fields, name: elem_name, node: elem_node, - rust_attributes: deriven, + rust_attributes: derived, }, ) => { for (elem_name, elem_ty) in elem_fields.into_iter() { @@ -1232,7 +1232,7 @@ impl Expression { name: result_name.or(elem_name), fields: result_fields, node: result_node.or(elem_node), - rust_attributes: rust_attributes.or(deriven), + rust_attributes: rust_attributes.or(derived), } } (Type::Array(lhs), Type::Array(rhs)) => Type::Array( diff --git a/internal/compiler/tests/syntax/analysis/binding_loop1.slint b/internal/compiler/tests/syntax/analysis/binding_loop1.slint index e524f8e0724..d94944fc7a8 100644 --- a/internal/compiler/tests/syntax/analysis/binding_loop1.slint +++ b/internal/compiler/tests/syntax/analysis/binding_loop1.slint @@ -26,7 +26,7 @@ export Test := Rectangle { // ^error{The binding for the property 'd' is part of a binding loop} property e: root.b; // ^error{The binding for the property 'e' is part of a binding loop} - property w: root.a + root.b; // This id not part of a loopµ + property w: root.a + root.b; // This id not part of a loop property cond: xx.x == 0; // ^error{The binding for the property 'cond' is part of a binding loop} diff --git a/internal/compiler/tests/syntax/basic/parse_error.slint b/internal/compiler/tests/syntax/basic/parse_error.slint index 81166260a90..13ed891f002 100644 --- a/internal/compiler/tests/syntax/basic/parse_error.slint +++ b/internal/compiler/tests/syntax/basic/parse_error.slint @@ -9,7 +9,7 @@ export SuperSimple := Rectangle { background: blue + 3 x: 45phx; // ^error{Syntax error: expected ';'} -// FIXME: would be nice if the smeicolon error was on the previous line +// FIXME: would be nice if the semicolon error was on the previous line } there was already parse error in this scope, so no more @@ -29,5 +29,3 @@ struct F {}; export {F}; // ^error{Extra semicolon. Remove this semicolon} - - diff --git a/internal/compiler/tests/typeloader/incpath/should_fail4.slint b/internal/compiler/tests/typeloader/incpath/should_fail4.slint index 66d528a8a1f..b1bd88a105c 100644 --- a/internal/compiler/tests/typeloader/incpath/should_fail4.slint +++ b/internal/compiler/tests/typeloader/incpath/should_fail4.slint @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial export Unused := Rectangle { - // FIXME: looks like binding loop is not diagnozed in exports if the properties are not used + // FIXME: looks like binding loop is not diagnosed in exports if the properties are not used property a1: a2; property a2: a1; } diff --git a/internal/compiler/widgets/cupertino-base/std-widgets-base.slint b/internal/compiler/widgets/cupertino-base/std-widgets-base.slint index e08f1d35c89..ab1af8d8578 100644 --- a/internal/compiler/widgets/cupertino-base/std-widgets-base.slint +++ b/internal/compiler/widgets/cupertino-base/std-widgets-base.slint @@ -1,7 +1,7 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// cSpell: ignore combobox spinbox standardbutton +// cSpell: ignore standardbutton import { LineEditInner, AboutSlint } from "../common/common.slint"; import { StandardButton } from "../common/standardbutton.slint"; @@ -46,4 +46,3 @@ export { TextEdit } export { StyleMetrics, ScrollView, Button, StandardButton, AboutSlint } export * from "tableview.slint"; - diff --git a/internal/compiler/widgets/cupertino-base/styling.slint b/internal/compiler/widgets/cupertino-base/styling.slint index 0dd531b72f8..f25b99d4d57 100644 --- a/internal/compiler/widgets/cupertino-base/styling.slint +++ b/internal/compiler/widgets/cupertino-base/styling.slint @@ -52,7 +52,7 @@ export global Palette { out property popup-border: dark-color-scheme ? #525252 :#0000000A; out property decent-border: dark-color-scheme ? #ffffff14 : #00000014; out property surface-thumb: dark-color-scheme ? #cacaca : #ffffff; - out property separater: dark-color-scheme ? #000000 : #d9d9d9; + out property separator: dark-color-scheme ? #000000 : #d9d9d9; // FIXME: dark color out property dimmer: @linear-gradient(180deg, #FFFFFFFF 100%, #FFFFFF00 0%); @@ -69,4 +69,4 @@ export global Icons { out property left: @image-url("_left.svg"); out property right: @image-url("_right.svg"); out property up: @image-url("_up.svg"); -} \ No newline at end of file +} diff --git a/internal/compiler/widgets/cupertino-base/tabwidget.slint b/internal/compiler/widgets/cupertino-base/tabwidget.slint index 4abe98e6d3a..a23b1bcb4c5 100644 --- a/internal/compiler/widgets/cupertino-base/tabwidget.slint +++ b/internal/compiler/widgets/cupertino-base/tabwidget.slint @@ -103,7 +103,7 @@ export component TabBarImpl { Rectangle { y: parent.height - self.height; - background: Palette.separater; + background: Palette.separator; width: 100%; height: 1px; } @@ -143,4 +143,4 @@ export component TabBarImpl { } } -export component TabWidget inherits TabWidget {} \ No newline at end of file +export component TabWidget inherits TabWidget {} diff --git a/internal/compiler/widgets/cupertino-base/textedit.slint b/internal/compiler/widgets/cupertino-base/textedit.slint index d57712285ca..4fa32be2bca 100644 --- a/internal/compiler/widgets/cupertino-base/textedit.slint +++ b/internal/compiler/widgets/cupertino-base/textedit.slint @@ -5,7 +5,7 @@ import { Typography, Palette } from "styling.slint"; import { ScrollBar } from "scrollview.slint"; import { FocusBorder } from "components.slint"; -// FIXME: After authide of scrollbars is implemented, remove and use `ScrollView` from `scrollview.slint` +// FIXME: After auto-hiding of scrollbars is implemented, remove and use `ScrollView` from `scrollview.slint` component ScrollView { in property enabled: true; out property visible-width <=> i-flickable.width; @@ -163,4 +163,4 @@ export component TextEdit { i-background.background: Palette.surface; } ] -} \ No newline at end of file +} diff --git a/internal/compiler/widgets/fluent-base/std-widgets-base.slint b/internal/compiler/widgets/fluent-base/std-widgets-base.slint index e08f1d35c89..ab1af8d8578 100644 --- a/internal/compiler/widgets/fluent-base/std-widgets-base.slint +++ b/internal/compiler/widgets/fluent-base/std-widgets-base.slint @@ -1,7 +1,7 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// cSpell: ignore combobox spinbox standardbutton +// cSpell: ignore standardbutton import { LineEditInner, AboutSlint } from "../common/common.slint"; import { StandardButton } from "../common/standardbutton.slint"; @@ -46,4 +46,3 @@ export { TextEdit } export { StyleMetrics, ScrollView, Button, StandardButton, AboutSlint } export * from "tableview.slint"; - diff --git a/internal/compiler/widgets/material-base/std-widgets-base.slint b/internal/compiler/widgets/material-base/std-widgets-base.slint index 3ca280e25d7..57d24a2ba20 100644 --- a/internal/compiler/widgets/material-base/std-widgets-base.slint +++ b/internal/compiler/widgets/material-base/std-widgets-base.slint @@ -1,7 +1,7 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// cSpell: ignore combobox spinbox standardbutton +// cSpell: ignore standardbutton import { LineEditInner, TextEdit, AboutSlint } from "../common/common.slint"; import { StandardButton } from "../common/standardbutton.slint"; diff --git a/internal/compiler/widgets/qt/std-widgets.slint b/internal/compiler/widgets/qt/std-widgets.slint index c3af1f96eb4..de0b0c85768 100644 --- a/internal/compiler/widgets/qt/std-widgets.slint +++ b/internal/compiler/widgets/qt/std-widgets.slint @@ -1,8 +1,6 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// cSpell: ignore combobox spinbox - import { LineEditInner, TextEdit, AboutSlint } from "../common/common.slint"; import { StyleMetrics, ScrollView } from "std-widgets-impl.slint"; import { StandardTableView } from "tableview.slint"; diff --git a/internal/core/graphics/image.rs b/internal/core/graphics/image.rs index 5c595e4c720..d1ce9895748 100644 --- a/internal/core/graphics/image.rs +++ b/internal/core/graphics/image.rs @@ -625,7 +625,7 @@ impl Image { /// /// # Safety /// - /// This function is unsafe because invalid texture ids may lead to undefind behavior in OpenGL + /// This function is unsafe because invalid texture ids may lead to undefined behavior in OpenGL /// drivers. A valid texture id is one that was created by the same OpenGL context that is /// current during any of the invocations of the callback set on [`Window::set_rendering_notifier()`](crate::api::Window::set_rendering_notifier). /// OpenGL contexts between instances of [`slint::Window`](crate::api::Window) are not sharing resources. Consequently @@ -735,7 +735,7 @@ impl BorrowedOpenGLTextureBuilder { /// /// # Safety /// - /// This function is unsafe because invalid texture ids may lead to undefind behavior in OpenGL + /// This function is unsafe because invalid texture ids may lead to undefined behavior in OpenGL /// drivers. A valid texture id is one that was created by the same OpenGL context that is /// current during any of the invocations of the callback set on [`Window::set_rendering_notifier()`](crate::api::Window::set_rendering_notifier). /// OpenGL contexts between instances of [`slint::Window`](crate::api::Window) are not sharing resources. Consequently diff --git a/internal/core/model/adapters.rs b/internal/core/model/adapters.rs index d7edcd966ab..32bff44ecb0 100644 --- a/internal/core/model/adapters.rs +++ b/internal/core/model/adapters.rs @@ -165,7 +165,7 @@ where M: Model, { /// Creates a new MapModel based on the given `wrapped_model` and `map_function`. - /// Alternativly you can use [`ModelExt::map`] on your Model. + /// Alternatively you can use [`ModelExt::map`] on your Model. pub fn new(wrapped_model: M, map_function: F) -> Self { Self { wrapped_model, map_function } } @@ -372,7 +372,7 @@ where F: Fn(&M::Data) -> bool + 'static, { /// Creates a new FilterModel based on the given `wrapped_model` and filtered by `filter_function`. - /// Alternativly you can use [`ModelExt::filter`] on your Model. + /// Alternatively you can use [`ModelExt::filter`] on your Model. pub fn new(wrapped_model: M, filter_function: F) -> Self { let filter_model_inner = FilterModelInner { wrapped_model, @@ -746,7 +746,7 @@ where F: FnMut(&M::Data, &M::Data) -> core::cmp::Ordering + 'static, { /// Creates a new SortModel based on the given `wrapped_model` and sorted by `sort_function`. - /// Alternativly you can use [`ModelExt::sort_by`] on your Model. + /// Alternatively you can use [`ModelExt::sort_by`] on your Model. pub fn new(wrapped_model: M, sort_function: F) -> Self where F: FnMut(&M::Data, &M::Data) -> core::cmp::Ordering + 'static, @@ -773,7 +773,7 @@ where M::Data: core::cmp::Ord, { /// Creates a new SortModel based on the given `wrapped_model` and sorted in ascending order. - /// Alternativly you can use [`ModelExt::sort`] on your Model. + /// Alternatively you can use [`ModelExt::sort`] on your Model. pub fn new_ascending(wrapped_model: M) -> Self where M::Data: core::cmp::Ord, @@ -1058,7 +1058,7 @@ where M: Model + 'static, { /// Creates a new ReverseModel based on the given `wrapped_model`. - /// Alternativly you can use [`ModelExt::reverse`] on your Model. + /// Alternatively you can use [`ModelExt::reverse`] on your Model. pub fn new(wrapped_model: M) -> Self { let inner = ReverseModelInner { wrapped_model, notify: Default::default() }; let container = Box::pin(ModelChangeListenerContainer::new(inner)); diff --git a/internal/core/platform.rs b/internal/core/platform.rs index 53b587b0fe3..c8048d00142 100644 --- a/internal/core/platform.rs +++ b/internal/core/platform.rs @@ -180,7 +180,7 @@ pub fn set_platform(platform: Box) -> Result<(), SetPlat } /// Call this function to update and potentially activate any pending timers, as well -/// as advance the state of any active animtaions. +/// as advance the state of any active animations. /// /// This function should be called before rendering or processing input event, at the /// beginning of each event loop iteration. diff --git a/internal/core/renderer.rs b/internal/core/renderer.rs index d4fbdf1b15e..325d32f964b 100644 --- a/internal/core/renderer.rs +++ b/internal/core/renderer.rs @@ -67,7 +67,7 @@ pub trait RendererSealed { /// Mark a given region as dirty regardless whether the items actually are dirty. /// - /// Example: when a PopupWindow disapear, the region under the popup needs to be redrawn + /// Example: when a PopupWindow disappears, the region under the popup needs to be redrawn fn mark_dirty_region(&self, _region: crate::item_rendering::DirtyRegion) {} #[cfg(feature = "std")] // FIXME: just because of the Error diff --git a/internal/core/software_renderer/draw_functions.rs b/internal/core/software_renderer/draw_functions.rs index 2f04bbaec6e..190307a86b3 100644 --- a/internal/core/software_renderer/draw_functions.rs +++ b/internal/core/software_renderer/draw_functions.rs @@ -1,7 +1,7 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -#![allow(clippy::identity_op)] // We use x + 0 a lot here for symetry +#![allow(clippy::identity_op)] // We use x + 0 a lot here for symmetry //! This is the module for the functions that are drawing the pixels //! on the line buffer diff --git a/internal/core/textlayout/fragments.rs b/internal/core/textlayout/fragments.rs index 30fbc792dba..1e6226eebc2 100644 --- a/internal/core/textlayout/fragments.rs +++ b/internal/core/textlayout/fragments.rs @@ -103,7 +103,7 @@ impl<'a, Length: Clone + Default + core::ops::AddAssign + Zero + Copy> Iterator fragment.glyph_range = Range { start, end: last_glyph_cluster.glyph_range.end }; - // Make sure that adjacent fragments are adjanced in their byte range: + // Make sure that adjacent fragments are advanced in their byte range: // this assertion should hold: fragment.byte_range.end + fragment.trailing_whitespace_bytes == next_fragment.byte_range.start // That means characters causing mandatory breaks need to be included. if fragment.trailing_mandatory_break { diff --git a/internal/core/textlayout/shaping.rs b/internal/core/textlayout/shaping.rs index ae5d0b710d9..b0e103e810d 100644 --- a/internal/core/textlayout/shaping.rs +++ b/internal/core/textlayout/shaping.rs @@ -29,8 +29,8 @@ pub struct Glyph { /// /// Functionality wise it provides the ability to convert a string into a set of glyphs, /// each of which has basic metric fields as well as an offset back into the original string. -/// Typically this is implemented by using a general text shaper, which performans an M:N mapping -/// from unicode characters to glyphs, via glyph substitions and script specific rules. In addition +/// Typically this is implemented by using a general text shaper, which performs an M:N mapping +/// from unicode characters to glyphs, via glyph substitutions and script specific rules. In addition /// the glyphs may be positioned for the required appearance (such as stacked diacritics). /// /// Finally, for convenience the TextShaper also provides a single glyph_for_char function, for example diff --git a/internal/core/window.rs b/internal/core/window.rs index 91bd6115695..dbc7a8be2ab 100644 --- a/internal/core/window.rs +++ b/internal/core/window.rs @@ -64,7 +64,7 @@ fn input_as_key_event(input: KeyInputEvent, modifiers: KeyboardModifiers) -> Key /// /// If the implementation of this bi-directional message passing protocol is incomplete, the user may /// experience unexpected behavior, or the intention of the developer calling functions on the [`crate::Window`](struct.Window.html) -/// API may not be fullfilled. +/// API may not be fulfilled. /// /// Your implementation must hold a renderer, such as [`crate::software_renderer::SoftwareRenderer`]. /// In the [`Self::renderer()`] function, you must return a reference to it. diff --git a/internal/interpreter/dynamic_item_tree.rs b/internal/interpreter/dynamic_item_tree.rs index 5f54cdd2c21..cbccfb249a6 100644 --- a/internal/interpreter/dynamic_item_tree.rs +++ b/internal/interpreter/dynamic_item_tree.rs @@ -1,8 +1,6 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// cSpell: ignore unerase - use crate::{api::Value, dynamic_type, eval}; use core::convert::TryInto; diff --git a/internal/interpreter/highlight.rs b/internal/interpreter/highlight.rs index 929cb61b979..450190df1e1 100644 --- a/internal/interpreter/highlight.rs +++ b/internal/interpreter/highlight.rs @@ -3,8 +3,6 @@ //! This module contains the code for the highlight of some elements -// cSpell: ignore unerase - use crate::dynamic_item_tree::{DynamicComponentVRc, ErasedItemTreeBox, ItemTreeBox}; use crate::Value; use i_slint_compiler::diagnostics::{SourceFile, Spanned}; diff --git a/internal/renderers/femtovg/images.rs b/internal/renderers/femtovg/images.rs index aa109111f8b..c0cebe20856 100644 --- a/internal/renderers/femtovg/images.rs +++ b/internal/renderers/femtovg/images.rs @@ -100,7 +100,7 @@ impl Texture { ImageInner::HTMLImage(html_image) => { if html_image.size().is_some() { // Anecdotal evidence suggests that HTMLImageElement converts to a texture with - // pre-multipled alpha. It's possible that this is not generally applicable, but it + // pre-multiplied alpha. It's possible that this is not generally applicable, but it // is the case for SVGs. let image_flags = if html_image.is_svg() { if let Some(target_size) = target_size_for_scalable_source { diff --git a/internal/renderers/skia/d3d_surface.rs b/internal/renderers/skia/d3d_surface.rs index a87b9dbd264..5905f9a9fa7 100644 --- a/internal/renderers/skia/d3d_surface.rs +++ b/internal/renderers/skia/d3d_surface.rs @@ -287,7 +287,7 @@ impl SwapChain { } /// This surface renders into the given window using Direct 3D. The provided display -/// arugment is ignored, as it has no meaning on Windows. +/// argument is ignored, as it has no meaning on Windows. pub struct D3DSurface { swap_chain: RefCell, } diff --git a/scripts/prepare_vscode_nightly.sh b/scripts/prepare_vscode_nightly.sh index 65ba49b6597..909e5a850ea 100755 --- a/scripts/prepare_vscode_nightly.sh +++ b/scripts/prepare_vscode_nightly.sh @@ -14,7 +14,7 @@ fi git checkout $modified_files -# The version number is a shorterned time stamp of the last commit +# The version number is a shortend time stamp of the last commit nightly_version=`git log -1 --format=%cd --date="format:%Y.%-m.%-d%H"` last_commit=`git log -1 --format=%H` @@ -43,4 +43,4 @@ cat > CHANGELOG.md < color_brush: blue; // allow to use brighter and darker on a brush - property ligher: true ? color_brush.brighter(50%) : color_brush.darker(50%); + property lighter: true ? color_brush.brighter(50%) : color_brush.darker(50%); // allow to use `transparentize` property seethru: color_brush.transparentize(30%); @@ -20,7 +20,7 @@ Test := Rectangle { property r2_col: r2.background; property conditional: false ? Colors.white : true ? r2.background : Colors.green; - test_circl := Rectangle { + test_circle := Rectangle { background: @radial_gradient(circle, #abc, #123 10%, #fed); property colo: background; property test: colo == #abc @@ -28,8 +28,8 @@ Test := Rectangle { && background != colo; } - property test: ligher == Colors.blue.brighter(50%) && r2_col == Colors.red.darker(50%) && conditional == r2.background && conditional != r2_col - && test_circl.test && seethru == color_brush.with_alpha(70%) && (#abc2).transparentize(-100%) == #abc4; + property test: lighter == Colors.blue.brighter(50%) && r2_col == Colors.red.darker(50%) && conditional == r2.background && conditional != r2_col + && test_circle.test && seethru == color_brush.with_alpha(70%) && (#abc2).transparentize(-100%) == #abc4; } /* diff --git a/tests/cases/types/structs2.slint b/tests/cases/types/structs2.slint index e4aab829ab4..89bc091ac71 100644 --- a/tests/cases/types/structs2.slint +++ b/tests/cases/types/structs2.slint @@ -1,7 +1,7 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// Test that structs work if they are only referrenced by callbacks +// Test that structs work if they are only referenced by callbacks struct Foo1 { member: int, } struct Foo2 { a: Foo1 } diff --git a/tests/cases/types/structs_keyword.slint b/tests/cases/types/structs_keyword.slint index 2d926b6cb88..545aad6f078 100644 --- a/tests/cases/types/structs_keyword.slint +++ b/tests/cases/types/structs_keyword.slint @@ -1,7 +1,7 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// Right now, this test is only testing rust keyword, but it should be expaneded to JS and C++ keywords +// Right now, this test is only testing rust keyword, but it should be expanded to JS and C++ keywords export struct mod := { loop: string, diff --git a/tests/screenshots/cases/software/basic/linear-gradients.slint b/tests/screenshots/cases/software/basic/linear-gradients.slint index 24c6d046789..2b2f3dee533 100644 --- a/tests/screenshots/cases/software/basic/linear-gradients.slint +++ b/tests/screenshots/cases/software/basic/linear-gradients.slint @@ -1,7 +1,7 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// ROTATION_THRESHOLD=150 - because gradiants are very impresise in rotation +// ROTATION_THRESHOLD=150 - because gradients are very imprecise in rotation export component TestCase inherits Window { width: 64px; diff --git a/tools/figma_import/src/rendered.rs b/tools/figma_import/src/rendered.rs index 37ef9a81363..8de0560f42f 100644 --- a/tools/figma_import/src/rendered.rs +++ b/tools/figma_import/src/rendered.rs @@ -329,7 +329,7 @@ fn handle_paint(p: &Paint, rc: &mut Ctx, arg: &str) -> Result // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// cSpell: ignore winit - import { FilterProxyReader } from "./proxy"; import { CloseAction, diff --git a/tools/slintpad/src/preview_widget.ts b/tools/slintpad/src/preview_widget.ts index 425000fdbd0..e30f923880b 100644 --- a/tools/slintpad/src/preview_widget.ts +++ b/tools/slintpad/src/preview_widget.ts @@ -1,7 +1,7 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial -// cSpell: ignore bindgen lumino winit +// cSpell: ignore bindgen lumino import { Message } from "@lumino/messaging"; import { Widget } from "@lumino/widgets";