Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
ecton committed Aug 20, 2024
2 parents 8bcebe1 + ba8d73b commit dd9011d
Show file tree
Hide file tree
Showing 60 changed files with 1,633 additions and 1,101 deletions.
16 changes: 8 additions & 8 deletions .crate-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

![Cushy is considered alpha and unsupported](https://img.shields.io/badge/status-alpha-orange)
[![crate version](https://img.shields.io/crates/v/cushy.svg)](https://crates.io/crates/cushy)
[![Documentation for `v0.3.0`](https://img.shields.io/badge/docs-v0.3.0-informational)](https://docs.rs/cushy)
[![Cushy User's Guide](https://img.shields.io/badge/user%27s%20guide-v0.3.0-informational)][guide]
[![Documentation for `v0.4.0`](https://img.shields.io/badge/docs-v0.4.0-informational)](https://docs.rs/cushy)
[![Cushy User's Guide](https://img.shields.io/badge/user%27s%20guide-v0.4.0-informational)][guide]

Cushy is an experimental Graphical User Interface (GUI) crate for the Rust
programming language. It features a reactive data model and aims to enable
Expand Down Expand Up @@ -57,11 +57,11 @@ initially tested by creating an example. Many are focused on demonstrating a
single feature, but there are some complex example such as a theme
editor/previewer:

[![Theme Editor Example](https://cushy.rs/v0.3.0/guide/examples/theme_editor.png)][theme-example]
[![Theme Editor Example](https://cushy.rs/v0.4.0/guide/examples/theme_editor.png)][theme-example]
- Browse the [user's guide][guide]. The user guide is a work in progress, but
features CI-generated screenshots and animations for its examples:

[![Hello, World User Guide Example](https://cushy.rs/v0.3.0/guide/examples/intro.png)][guide]
[![Hello, World User Guide Example](https://cushy.rs/v0.4.0/guide/examples/intro.png)][guide]
- Ask questions [in Discussions][discussions] or [on Discord][discord].

## Project Status
Expand All @@ -79,9 +79,9 @@ Cushy.

[widget]: crate::widget::Widget
[widgets]: mod@crate::widgets
[button-example]: https://github.com/khonsulabs/cushy/tree/v0.3.0/examples/basic-button.rs
[examples]: https://github.com/khonsulabs/cushy/tree/v0.3.0/examples/
[theme-example]: https://github.com/khonsulabs/cushy/tree/v0.3.0/examples/theme.rs
[button-example]: https://github.com/khonsulabs/cushy/tree/v0.4.0/examples/basic-button.rs
[examples]: https://github.com/khonsulabs/cushy/tree/v0.4.0/examples/
[theme-example]: https://github.com/khonsulabs/cushy/tree/v0.4.0/examples/theme.rs
[kludgine]: https://github.com/khonsulabs/kludgine
[figures]: https://github.com/khonsulabs/figures
[wgpu]: https://github.com/gfx-rs/wgpu
Expand All @@ -91,7 +91,7 @@ Cushy.
[arboard]: https://github.com/1Password/arboard
[ecton]: https://github.com/khonsulabs/ecton
[issues]: https://github.com/khonsulabs/cushy/issues
[guide]: https://cushy.rs/v0.3.0/guide/
[guide]: https://cushy.rs/v0.4.0/guide/
[discussions]: https://github.com/khonsulabs/cushy/discussions
[discord]: https://discord.khonsulabs.com/

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ jobs:
- name: Regenerate Example Images
run: |
CAPTURE=1 cargo test -p cushy --examples
CAPTURE=1 cargo test -p cushy --examples --all-features -r
- name: Regenerate Guide Example Images
run: |
CAPTURE=1 cargo test -p guide-examples --examples
CAPTURE=1 cargo test -p guide-examples --examples -r
- name: Build Guide
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ["stable", "1.74.1"]
version: ["stable", "1.80.0"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .rustme/config.ron
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Configuration(
// "msrv": "1.70",
"ref-name": (
default: "main",
release: "v0.3.0",
release: "v0.4.0",
),
"docs": (
default: "https://cushy.rs/main/docs/cushy/",
Expand Down
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,68 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- markdownlint-disable no-duplicate-heading -->

## Unreleased

### Breaking Changes

- Dependency `kludgine` has been updated to `v0.10.0`, which updates Cushy to
`wgpu v22.0.0` and `cosmic-text v0.12.0`.
- At some point, a dependency of the `image` crate has been updated with a
minimum supported Rust version (MSRV) of `1.80.0`. This is Cushy's new MSRV to
reflect this requirement.
- `Source::for_each_*` now invoke the callback with the current contents of of
the source before attaching the callback. New functions beginning with
`for_each_subsequent_` have been added with the original behavior.
- `CushyWindowBuilder` has been renamed to `StandaloneWindowBuilder` and
`MakeWidget::build_virtual_window` has been renamed to
`build_standalone_window`.
- All animation easing related functionality has been reactored into a separate
crate: `easing-function`. Most code will remain unaffected due to re-exports,
but the `Easing` trait no longer accepts a `ZeroToOne` parameter, instead
accepting an `f32` value.

### Fixed

- Fixed a panic that could occur when removing certain nested hierarchies from a
window.
- `CallbackHandle` now has a `must_use` hint that might help users discover the
persist function.
- Fixed a deadlock that could occur when multiple threads were attempting to
execute change callbacks for the same dynamic at the same time.
- The initial `inner_size` of a `Window` is now used if it is non-zero and
`WindowAttributes::inner_size` is `None`.
- Container's layout and drawing functions now properly round up/down the
measurements to ensure accurate rendering. Fixes [#158][158].
- `Input` selection handling when dragging below or above the text field is now
handled correctly.
- Nested hierarchies of widgets stored in a reused `WidgetInstance` are now
properly unmounted and remounted. For widgets that store `MountedWidget`s, in
their `mounted` events the widgets should remount their children if needed.

This fix not only fixes underlying issues with how unmounting was occuring,
but also fixes `Stack`, `Grid`, and `WidgetRef` to automatically remount as
needed.


[158]: https://github.com/khonsulabs/cushy/issues/158

### Added

- `AnimationRecorder::animate_keypress` is a new helper that animates a single
key press.
- `AnimationRecorder::animate_mouse_button` is a new helper that animates a
single mouse button press and release.
- `Window::on_close_requested` is a new function that allows providing a
callback that is invoked before the window is closed when the user or
operating system requests that a window is closed. If the callback returns
true, the window is allowed to be closed. If false is returned, the window
will remain open. This feature is most commonly used to prevent losing unsaved
changes.
- `Fraction` now has `LinearInterpolation` and `PercentBetween` implementations.
- `Window::zoom` allows setting a `Dynamic<Fraction>` that scales all DPI-scaled
operations by an additional scaling factor.
- `Edges` and `ContainerShadow` now implement `figures::Round`.

## v0.3.0 (2024-05-12)

### Breaking Changes
Expand Down
Loading

0 comments on commit dd9011d

Please sign in to comment.