Skip to content

Commit 30ebfa1

Browse files
Merge pull request #983 from mitchmindtree/collapsible_area_fix
Fix scrolling interaction issue with CollapsibleArea
2 parents c4176d6 + c41746b commit 30ebfa1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/widget/collapsible_area.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl<'a> Widget for CollapsibleArea<'a> {
154154
// When the button is pressed, toggle whether the area is open or closed.
155155
let event = widget::Button::new()
156156
.w_h(w, h)
157-
.x_y(x, y)
157+
.middle_of(id)
158158
.color(color)
159159
.border(border)
160160
.border_color(border_color)
@@ -189,7 +189,8 @@ impl<'a> Widget for CollapsibleArea<'a> {
189189

190190
// The triangle widget.
191191
widget::Polygon::fill(points.iter().cloned())
192-
.xy(triangle_rect.xy())
192+
.align_middle_y_of(state.ids.button)
193+
.align_left_of(state.ids.button)
193194
.wh(triangle_rect.dim())
194195
.parent(state.ids.button)
195196
.graphics_for(state.ids.button)

0 commit comments

Comments
 (0)