We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c4176d6 + c41746b commit 30ebfa1Copy full SHA for 30ebfa1
src/widget/collapsible_area.rs
@@ -154,7 +154,7 @@ impl<'a> Widget for CollapsibleArea<'a> {
154
// When the button is pressed, toggle whether the area is open or closed.
155
let event = widget::Button::new()
156
.w_h(w, h)
157
- .x_y(x, y)
+ .middle_of(id)
158
.color(color)
159
.border(border)
160
.border_color(border_color)
@@ -189,7 +189,8 @@ impl<'a> Widget for CollapsibleArea<'a> {
189
190
// The triangle widget.
191
widget::Polygon::fill(points.iter().cloned())
192
- .xy(triangle_rect.xy())
+ .align_middle_y_of(state.ids.button)
193
+ .align_left_of(state.ids.button)
194
.wh(triangle_rect.dim())
195
.parent(state.ids.button)
196
.graphics_for(state.ids.button)
0 commit comments