Skip to content

Commit

Permalink
Merge branch 'main' into pile-improvements-2
Browse files Browse the repository at this point in the history
  • Loading branch information
ecton committed Jan 5, 2025
2 parents aaa046a + b736194 commit 5356014
Show file tree
Hide file tree
Showing 32 changed files with 2,962 additions and 548 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

jobs:
docs:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -34,7 +34,7 @@ jobs:
to: /${{ github.ref_name }}/docs

guide:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ jobs:
fail-fast: false
matrix:
version: ["stable", "1.80.0"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
os: ["ubuntu-22.04", "windows-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

-
name: Free disk space
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: |
sudo docker rmi $(docker image ls -aq) || true
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL || true
- name: Install x11 dependencies for Kludgine
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update -y -qq
Expand Down
35 changes: 33 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
drastically differently. If this affects your user interface, use
`expand_horizontally()` or `expand_vertically()` to limit the direction of the
expansion.
- All callbacks executed by map_each/for_each/etc are now executed by a single
thread rather than in the thread causing the change. The major effect of this
change is that updating a dynamic and immediately trying to read a value of a
dynamic that is supposed to be updated will not work reliably anymore. Using a
DynamicReader to block until the value is updated will work in existing code
and in the new callback execution model.

This change was made to make complex data flows simpler to implement without
causing deadlocks. Without this change, it was easy in a multi-threaded
application to create deadlocks with relatively simple data flows like the new
`7guis-timer` example.
- The type `cushy::Graphics` is now available at `cushy::graphics::Graphics`.

### Changed

Expand Down Expand Up @@ -200,6 +212,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
made without observing any ill effects from the existing logic, but the logic
was not correct.
- `Input` and `Label` now honor `ConstraintLayout::Fill`.
- `Label` now properly invalidates itself when various font style components are
changed.

### Added

Expand Down Expand Up @@ -383,8 +397,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
to standardize a method of adding informational text to interfaces.
- `ImageScaling::layout_size` and `ImageScaling::render_area` are new functions
that expose the layout calculations the `Image` widget performed.


- `GraphicsContext::current_font_settings()` returns a new struct `FontSettings`
that contains the effective style components for the various font settings
supported by a `GraphicsContext`. `FontSettings::apply()` can be used to apply
settings in one step. `FontSettings` also implements `PartialEq` allowing it
to be used as a cache invalidation key.
- New feature `localization`, included in Cushy's default features, enables
multi-lingual/multi-locale support using [Fluent][fluent]. See the
`localization` module for documentation of this feature, or see the
`localization.rs` example in the repository to see it in action.
- `Duration` now has `LinearInterpolation` and `PercentBetween` implementations.
- `Source::on_change_try` is a new function that executes a callback any time
the source is changed.
- `Dynamic::linked_accessor` is a new function that takes a getter and setter
function and returns a `Dynamic` that will execute the getter and setter
appropriately when its value is changed.
- `DynamicRead::read_nonblocking` is a new function that attempts to acquire
read access to the dynamic without blocking the current thread.

[fluent]: https://projectfluent.org/
[139]: https://github.com/khonsulabs/cushy/issues/139

## v0.4.0 (2024-08-20)
Expand Down
Loading

0 comments on commit 5356014

Please sign in to comment.