diff --git a/.github/workflows/nightly_snapshot.yaml b/.github/workflows/nightly_snapshot.yaml index 3989346030a..deb40ca759e 100644 --- a/.github/workflows/nightly_snapshot.yaml +++ b/.github/workflows/nightly_snapshot.yaml @@ -404,7 +404,7 @@ jobs: rm -rf $output_path/demos mkdir -p $output_path/demos - for demo_subdir in examples,gallery, demos,printerdemo,rust examples,todo,rust examples,todo-mvc,rust examples,slide_puzzle, examples,memory, examples,imagefilter,rust examples,plotter, examples,opengl_underlay, examples,carousel,rust demos,energy-monitor, examples,weather-demo, demos,home-automation,rust; do + for demo_subdir in examples,gallery, demos,printerdemo,rust examples,todo,rust examples,todo-mvc,rust examples,slide_puzzle, examples,memory, examples,imagefilter,rust examples,plotter, examples,opengl_underlay, examples,carousel,rust demos,energy-monitor, demos,weather-demo, demos,home-automation,rust; do IFS=',' read example_or_demo demo subdir <<< "${demo_subdir}" mkdir -p $output_path/demos/$demo diff --git a/.github/workflows/wasm_demos.yaml b/.github/workflows/wasm_demos.yaml index cdc813e2d62..eba72baa44a 100644 --- a/.github/workflows/wasm_demos.yaml +++ b/.github/workflows/wasm_demos.yaml @@ -62,7 +62,7 @@ jobs: run: | sed -i "s/#wasm# //" Cargo.toml wasm-pack build --release --target web --no-default-features --features slint/default,chrono - working-directory: examples/weather-demo + working-directory: demos/weather-demo - name: "Upload Demo Artifacts" if: ${{ inputs.build_artifacts }} uses: actions/upload-artifact@v4 @@ -81,7 +81,7 @@ jobs: examples/opengl_underlay/ demos/energy-monitor/ demos/home-automation/rust - examples/weather-demo/ + demos/weather-demo/ !/**/.gitignore - name: Clean cache # Otherwise the cache is much too big run: | diff --git a/.reuse/dep5 b/.reuse/dep5 index 0e33c64e6e3..a9307457dc2 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -147,26 +147,26 @@ Files: examples/fancy-switches/images/*.png examples/fancy-switches/images/*.svg Copyright: Copyright © SixtyFPS GmbH License: MIT -Files: examples/weather-demo/index.html +Files: demos/weather-demo/index.html Copyright: Copyright © SixtyFPS GmbH License: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 -Files: examples/weather-demo/docs/*.png +Files: demos/weather-demo/docs/*.png Copyright: Copyright © SixtyFPS GmbH License: MIT -Files: examples/weather-demo/ui/assets/icons/*.svg +Files: demos/weather-demo/ui/assets/icons/*.svg Copyright: Fontawesome project License: CC-BY-4.0 -Files: examples/weather-demo/ui/assets/weathericons-font.ttf +Files: demos/weather-demo/ui/assets/weathericons-font.ttf Copyright: Weather Icons License: OFL-1.1 -Files: examples/weather-demo/android-res/*/ic_launcher.png +Files: demos/weather-demo/android-res/*/ic_launcher.png Copyright: Copyright © Felgo GmbH License: CC-BY-ND-4.0 -Files: examples/weather-demo/ui/assets/felgo-logo.svg +Files: demos/weather-demo/ui/assets/felgo-logo.svg Copyright: Copyright © Felgo GmbH License: CC-BY-ND-4.0 diff --git a/Cargo.toml b/Cargo.toml index dff7bba4730..be96c112c31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ members = [ 'demos/home-automation/rust', 'examples/mcu-board-support', 'examples/uefi-demo', - 'examples/weather-demo', + 'demos/weather-demo', 'helper_crates/const-field-offset', 'helper_crates/vtable', 'helper_crates/vtable/macro', diff --git a/README.md b/README.md index 08e70870ac8..d6ca6e16be6 100644 --- a/README.md +++ b/README.md @@ -257,6 +257,6 @@ You can of course also contact us privately via email to [info@slint.dev](mailto [#25]: https://www.npmjs.com/package/slint-ui [#26]: https://slint.dev/latest/docs/node [#28]: https://github.com/slint-ui/slint-nodejs-template -[#29]: ./examples/weather-demo/docs/img/desktop-preview.png "Weather Demo" +[#29]: ./demos/weather-demo/docs/img/desktop-preview.png "Weather Demo" [#30]: https://slint.dev/demos/weather-demo/ diff --git a/demos/README.md b/demos/README.md index fc4eedb7fcb..88415474d86 100644 --- a/demos/README.md +++ b/demos/README.md @@ -10,6 +10,7 @@ These demos showcase different complex use-cases for building UIs with Slint. | --- | --- | --- | | [Printer UI ![Printer Demo image](https://github.com/user-attachments/assets/7e7400ad-283a-4404-b04a-8620ba4df452)](./printerdemo) | A fictional user interface for the touch screen of a printer.
[Project...](./printerdemo) | [Wasm Demo](https://slint.dev/snapshots/master/demos/printerdemo/) | | [Energy Meter![Energy meter demo image](https://github.com/user-attachments/assets/abfe03e3-ded6-4ddc-82b7-8303ee45515c "Energy meter demo image")](./energy-monitor/) | A fictional user interface of a device that monitors energy consumption in a building.
[Project...](./energy-monitor) | [Wasm Demo](https://slint.dev/snapshots/master/demos/energy-monitor/) | +| [Weather![Weather demo image](./weather-demo/docs/img/desktop-preview.png "7 GUI's demo image")](./weather-demo/) | A simple, cross-platform (Desktop, Android, Wasm) weather application using real weather data from the [OpenWeather](https://openweathermap.org/) API.
[Project...](./weather-demo/) | [Wasm Demo](https://slint.dev/snapshots/master/demos/weather-demo/) | --- ### Running the Rust Demos diff --git a/examples/weather-demo/Cargo.toml b/demos/weather-demo/Cargo.toml similarity index 100% rename from examples/weather-demo/Cargo.toml rename to demos/weather-demo/Cargo.toml diff --git a/examples/weather-demo/README.md b/demos/weather-demo/README.md similarity index 98% rename from examples/weather-demo/README.md rename to demos/weather-demo/README.md index c7bbee5ad74..94c10691056 100644 --- a/examples/weather-demo/README.md +++ b/demos/weather-demo/README.md @@ -6,7 +6,7 @@ A simple, cross-platform (Desktop, Android, Wasm) weather application using real | `.slint` Design | Rust Source (Desktop) | Rust Source (Android / Wasm) | Online wasm Preview | Open in SlintPad | | --- | --- | --- | --- | --- | -| [`main.slint`](./weather-demo/ui/main.slint) | [`main.rs`](./weather-demo/src/main.rs) | [`lib.rs`](./weather-demo/src/lib.rs) | [Online simulation](https://slint.dev/snapshots/master/demos/weather-demo/) | [Preview in Online Code Editor](https://slint.dev/snapshots/master/editor?load_url=https://raw.githubusercontent.com/slint-ui/slint/master/examples/weather-demo/ui/main.slint) | +| [`main.slint`](./weather-demo/ui/main.slint) | [`main.rs`](./weather-demo/src/main.rs) | [`lib.rs`](./weather-demo/src/lib.rs) | [Online simulation](https://slint.dev/snapshots/master/demos/weather-demo/) | [Preview in Online Code Editor](https://slint.dev/snapshots/master/editor?load_url=https://raw.githubusercontent.com/slint-ui/slint/master/demos/weather-demo/ui/main.slint) | Weather Demo is a weather application made by [Felgo](https://felgo.com/). diff --git a/examples/weather-demo/android-res/mipmap-hdpi/ic_launcher.png b/demos/weather-demo/android-res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from examples/weather-demo/android-res/mipmap-hdpi/ic_launcher.png rename to demos/weather-demo/android-res/mipmap-hdpi/ic_launcher.png diff --git a/examples/weather-demo/android-res/mipmap-ldpi/ic_launcher.png b/demos/weather-demo/android-res/mipmap-ldpi/ic_launcher.png similarity index 100% rename from examples/weather-demo/android-res/mipmap-ldpi/ic_launcher.png rename to demos/weather-demo/android-res/mipmap-ldpi/ic_launcher.png diff --git a/examples/weather-demo/android-res/mipmap-mdpi/ic_launcher.png b/demos/weather-demo/android-res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from examples/weather-demo/android-res/mipmap-mdpi/ic_launcher.png rename to demos/weather-demo/android-res/mipmap-mdpi/ic_launcher.png diff --git a/examples/weather-demo/android-res/mipmap-xhdpi/ic_launcher.png b/demos/weather-demo/android-res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from examples/weather-demo/android-res/mipmap-xhdpi/ic_launcher.png rename to demos/weather-demo/android-res/mipmap-xhdpi/ic_launcher.png diff --git a/examples/weather-demo/android-res/mipmap-xxhdpi/ic_launcher.png b/demos/weather-demo/android-res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from examples/weather-demo/android-res/mipmap-xxhdpi/ic_launcher.png rename to demos/weather-demo/android-res/mipmap-xxhdpi/ic_launcher.png diff --git a/examples/weather-demo/android-res/mipmap-xxxhdpi/ic_launcher.png b/demos/weather-demo/android-res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from examples/weather-demo/android-res/mipmap-xxxhdpi/ic_launcher.png rename to demos/weather-demo/android-res/mipmap-xxxhdpi/ic_launcher.png diff --git a/examples/weather-demo/build.rs b/demos/weather-demo/build.rs similarity index 100% rename from examples/weather-demo/build.rs rename to demos/weather-demo/build.rs diff --git a/examples/weather-demo/docs/img/android-preview.png b/demos/weather-demo/docs/img/android-preview.png similarity index 100% rename from examples/weather-demo/docs/img/android-preview.png rename to demos/weather-demo/docs/img/android-preview.png diff --git a/examples/weather-demo/docs/img/desktop-preview.png b/demos/weather-demo/docs/img/desktop-preview.png similarity index 100% rename from examples/weather-demo/docs/img/desktop-preview.png rename to demos/weather-demo/docs/img/desktop-preview.png diff --git a/examples/weather-demo/index.html b/demos/weather-demo/index.html similarity index 100% rename from examples/weather-demo/index.html rename to demos/weather-demo/index.html diff --git a/examples/weather-demo/src/app_main.rs b/demos/weather-demo/src/app_main.rs similarity index 100% rename from examples/weather-demo/src/app_main.rs rename to demos/weather-demo/src/app_main.rs diff --git a/examples/weather-demo/src/lib.rs b/demos/weather-demo/src/lib.rs similarity index 100% rename from examples/weather-demo/src/lib.rs rename to demos/weather-demo/src/lib.rs diff --git a/examples/weather-demo/src/main.rs b/demos/weather-demo/src/main.rs similarity index 100% rename from examples/weather-demo/src/main.rs rename to demos/weather-demo/src/main.rs diff --git a/examples/weather-demo/src/weather/dummyweather.json b/demos/weather-demo/src/weather/dummyweather.json similarity index 100% rename from examples/weather-demo/src/weather/dummyweather.json rename to demos/weather-demo/src/weather/dummyweather.json diff --git a/examples/weather-demo/src/weather/dummyweathercontroller.rs b/demos/weather-demo/src/weather/dummyweathercontroller.rs similarity index 100% rename from examples/weather-demo/src/weather/dummyweathercontroller.rs rename to demos/weather-demo/src/weather/dummyweathercontroller.rs diff --git a/examples/weather-demo/src/weather/mod.rs b/demos/weather-demo/src/weather/mod.rs similarity index 100% rename from examples/weather-demo/src/weather/mod.rs rename to demos/weather-demo/src/weather/mod.rs diff --git a/examples/weather-demo/src/weather/openweathercontroller.rs b/demos/weather-demo/src/weather/openweathercontroller.rs similarity index 100% rename from examples/weather-demo/src/weather/openweathercontroller.rs rename to demos/weather-demo/src/weather/openweathercontroller.rs diff --git a/examples/weather-demo/src/weather/utils.rs b/demos/weather-demo/src/weather/utils.rs similarity index 100% rename from examples/weather-demo/src/weather/utils.rs rename to demos/weather-demo/src/weather/utils.rs diff --git a/examples/weather-demo/src/weather/weathercontroller.rs b/demos/weather-demo/src/weather/weathercontroller.rs similarity index 100% rename from examples/weather-demo/src/weather/weathercontroller.rs rename to demos/weather-demo/src/weather/weathercontroller.rs diff --git a/examples/weather-demo/src/weather/weatherdisplaycontroller.rs b/demos/weather-demo/src/weather/weatherdisplaycontroller.rs similarity index 100% rename from examples/weather-demo/src/weather/weatherdisplaycontroller.rs rename to demos/weather-demo/src/weather/weatherdisplaycontroller.rs diff --git a/examples/weather-demo/ui/about-box.slint b/demos/weather-demo/ui/about-box.slint similarity index 100% rename from examples/weather-demo/ui/about-box.slint rename to demos/weather-demo/ui/about-box.slint diff --git a/examples/weather-demo/ui/assets/felgo-logo.svg b/demos/weather-demo/ui/assets/felgo-logo.svg similarity index 100% rename from examples/weather-demo/ui/assets/felgo-logo.svg rename to demos/weather-demo/ui/assets/felgo-logo.svg diff --git a/examples/weather-demo/ui/assets/icons/arrow-down.svg b/demos/weather-demo/ui/assets/icons/arrow-down.svg similarity index 100% rename from examples/weather-demo/ui/assets/icons/arrow-down.svg rename to demos/weather-demo/ui/assets/icons/arrow-down.svg diff --git a/examples/weather-demo/ui/assets/icons/arrow-up.svg b/demos/weather-demo/ui/assets/icons/arrow-up.svg similarity index 100% rename from examples/weather-demo/ui/assets/icons/arrow-up.svg rename to demos/weather-demo/ui/assets/icons/arrow-up.svg diff --git a/examples/weather-demo/ui/assets/icons/plus.svg b/demos/weather-demo/ui/assets/icons/plus.svg similarity index 100% rename from examples/weather-demo/ui/assets/icons/plus.svg rename to demos/weather-demo/ui/assets/icons/plus.svg diff --git a/examples/weather-demo/ui/assets/icons/refresh.svg b/demos/weather-demo/ui/assets/icons/refresh.svg similarity index 100% rename from examples/weather-demo/ui/assets/icons/refresh.svg rename to demos/weather-demo/ui/assets/icons/refresh.svg diff --git a/examples/weather-demo/ui/assets/icons/search.svg b/demos/weather-demo/ui/assets/icons/search.svg similarity index 100% rename from examples/weather-demo/ui/assets/icons/search.svg rename to demos/weather-demo/ui/assets/icons/search.svg diff --git a/examples/weather-demo/ui/assets/icons/trash.svg b/demos/weather-demo/ui/assets/icons/trash.svg similarity index 100% rename from examples/weather-demo/ui/assets/icons/trash.svg rename to demos/weather-demo/ui/assets/icons/trash.svg diff --git a/examples/weather-demo/ui/assets/icons/xmark.svg b/demos/weather-demo/ui/assets/icons/xmark.svg similarity index 100% rename from examples/weather-demo/ui/assets/icons/xmark.svg rename to demos/weather-demo/ui/assets/icons/xmark.svg diff --git a/examples/weather-demo/ui/assets/weathericons-font.ttf b/demos/weather-demo/ui/assets/weathericons-font.ttf similarity index 100% rename from examples/weather-demo/ui/assets/weathericons-font.ttf rename to demos/weather-demo/ui/assets/weathericons-font.ttf diff --git a/examples/weather-demo/ui/city_weather.slint b/demos/weather-demo/ui/city_weather.slint similarity index 100% rename from examples/weather-demo/ui/city_weather.slint rename to demos/weather-demo/ui/city_weather.slint diff --git a/examples/weather-demo/ui/city_weather_tile.slint b/demos/weather-demo/ui/city_weather_tile.slint similarity index 100% rename from examples/weather-demo/ui/city_weather_tile.slint rename to demos/weather-demo/ui/city_weather_tile.slint diff --git a/examples/weather-demo/ui/controls/busy-layer.slint b/demos/weather-demo/ui/controls/busy-layer.slint similarity index 100% rename from examples/weather-demo/ui/controls/busy-layer.slint rename to demos/weather-demo/ui/controls/busy-layer.slint diff --git a/examples/weather-demo/ui/controls/generic.slint b/demos/weather-demo/ui/controls/generic.slint similarity index 100% rename from examples/weather-demo/ui/controls/generic.slint rename to demos/weather-demo/ui/controls/generic.slint diff --git a/examples/weather-demo/ui/controls/stackview.slint b/demos/weather-demo/ui/controls/stackview.slint similarity index 100% rename from examples/weather-demo/ui/controls/stackview.slint rename to demos/weather-demo/ui/controls/stackview.slint diff --git a/examples/weather-demo/ui/controls/weather.slint b/demos/weather-demo/ui/controls/weather.slint similarity index 100% rename from examples/weather-demo/ui/controls/weather.slint rename to demos/weather-demo/ui/controls/weather.slint diff --git a/examples/weather-demo/ui/expanded_city_weather_tile.slint b/demos/weather-demo/ui/expanded_city_weather_tile.slint similarity index 100% rename from examples/weather-demo/ui/expanded_city_weather_tile.slint rename to demos/weather-demo/ui/expanded_city_weather_tile.slint diff --git a/examples/weather-demo/ui/forecast_with_graph.slint b/demos/weather-demo/ui/forecast_with_graph.slint similarity index 100% rename from examples/weather-demo/ui/forecast_with_graph.slint rename to demos/weather-demo/ui/forecast_with_graph.slint diff --git a/examples/weather-demo/ui/location_datatypes.slint b/demos/weather-demo/ui/location_datatypes.slint similarity index 100% rename from examples/weather-demo/ui/location_datatypes.slint rename to demos/weather-demo/ui/location_datatypes.slint diff --git a/examples/weather-demo/ui/location_search.slint b/demos/weather-demo/ui/location_search.slint similarity index 100% rename from examples/weather-demo/ui/location_search.slint rename to demos/weather-demo/ui/location_search.slint diff --git a/examples/weather-demo/ui/main.slint b/demos/weather-demo/ui/main.slint similarity index 100% rename from examples/weather-demo/ui/main.slint rename to demos/weather-demo/ui/main.slint diff --git a/examples/weather-demo/ui/page-base.slint b/demos/weather-demo/ui/page-base.slint similarity index 100% rename from examples/weather-demo/ui/page-base.slint rename to demos/weather-demo/ui/page-base.slint diff --git a/examples/weather-demo/ui/style/styles.slint b/demos/weather-demo/ui/style/styles.slint similarity index 100% rename from examples/weather-demo/ui/style/styles.slint rename to demos/weather-demo/ui/style/styles.slint diff --git a/examples/weather-demo/ui/ui_utils.slint b/demos/weather-demo/ui/ui_utils.slint similarity index 100% rename from examples/weather-demo/ui/ui_utils.slint rename to demos/weather-demo/ui/ui_utils.slint diff --git a/examples/weather-demo/ui/weather_datatypes.slint b/demos/weather-demo/ui/weather_datatypes.slint similarity index 100% rename from examples/weather-demo/ui/weather_datatypes.slint rename to demos/weather-demo/ui/weather_datatypes.slint diff --git a/examples/README.md b/examples/README.md index 23bbc537532..9bb930c0c10 100644 --- a/examples/README.md +++ b/examples/README.md @@ -24,7 +24,6 @@ These examples demonstrate the main features of Slint and how to use them in dif | [Maps![Maps demo image](https://github.com/slint-ui/slint/assets/959326/f5e8cca6-dee1-4681-83da-88fec27f9a45 "OpenGL Underlay demo image")](./maps/) | A rust example that load image tiles asynchronously from OpenStreetMap server and allow panning and zooming.
[Project...](./maps/) | | | [Virtual Keyboard![Virtual Keyboard demo image](https://user-images.githubusercontent.com/6715107/231668373-23faedf8-b42a-401d-b3a2-845d5e61252b.png "Virtual Keyboard demo image")](./virtual_keyboard/) | A Rust and C++ example that shows how to implement a custom virtual keyboard in Slint.
[Project...](./virtual_keyboard/) | | | [7GUIs![7 GUI's demo image](https://user-images.githubusercontent.com/22800467/169002497-5b90e63b-5717-4290-8ac7-c618d9e2a4f1.png "7 GUI's demo image")](./7guis/) | Our implementations of the ["7GUIs"](https://7guis.github.io/7guis/) Tasks.
[Project...](./7guis/) | | -| [Weather![Weather demo image](./weather-demo/docs/img/desktop-preview.png "7 GUI's demo image")](./weather-demo/) | A simple, cross-platform (Desktop, Android, Wasm) weather application using real weather data from the [OpenWeather](https://openweathermap.org/) API.
[Project...](./weather-demo/) | [Wasm Demo](https://slint.dev/snapshots/master/demos/weather-demo/) | #### External examples | Thumbnail | Description |