Skip to content

Commit 329876a

Browse files
authored
Merge pull request #227 from khonsulabs/baseline
Add Baseline Vertical Alignment
2 parents b3ea031 + b9512e5 commit 329876a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1390
-701
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
version: ["stable", "1.80.0"]
10+
version: ["stable", "1.81.0"]
1111
os: ["ubuntu-22.04", "windows-latest", "macos-latest"]
1212
runs-on: ${{ matrix.os }}
1313
steps:

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
127127
value containers.
128128
- `cushy::value::CallbackDisconnected` and `cushy::value::CallbackHandle` are
129129
now exported from `cushy::reactive`.
130+
- Cushy now generically supports `HorizontalAlignment` and `VerticalAlignment`
131+
of widgets contained within other widgets. Additionally, baseline vertical
132+
alignment support has been added to make it simple to align widgets vertically
133+
based on the content of the widget. To support this, many APIs have required
134+
changes:
135+
136+
- `Widget::layout()` and `LayoutContext::layout()` now returns `WidgetLayout`.
137+
- `IndicatorBehavior::size()` has been renamed to
138+
`IndicatorBehavior::layout()` and now returns `WidgetLayout`.
139+
- `WrappedLayout` now has the field `baseline: Baseline`.
140+
- `WrappedLayout::aligned` now accepts `Into<WidgetLayout>` for its first
141+
parameter. This should be mostly compatible with existing code.
142+
- `WrapperWidget::position_child` now accepts a `WidgetLayout` instead of a
143+
`Size<UPx>` as its first parameter.
144+
- `Button`'s label is automatically centered horizontally using a new style
145+
component: `ButtonLabelAlignment`.
130146

131147
### Changed
132148

0 commit comments

Comments
 (0)