fix: clip_rect of combo box popup
This commit is contained in:
parent
8c17b45439
commit
adec27a7dd
1 changed files with 3 additions and 0 deletions
|
@ -50,10 +50,13 @@ pub fn combo_box(
|
||||||
}
|
}
|
||||||
|
|
||||||
if ui.memory().is_popup_open(popup_id) {
|
if ui.memory().is_popup_open(popup_id) {
|
||||||
|
let parent_clip_rect = ui.clip_rect();
|
||||||
|
|
||||||
Area::new(popup_id)
|
Area::new(popup_id)
|
||||||
.order(Order::Foreground)
|
.order(Order::Foreground)
|
||||||
.fixed_pos(button_response.rect.left_bottom())
|
.fixed_pos(button_response.rect.left_bottom())
|
||||||
.show(ui.ctx(), |ui| {
|
.show(ui.ctx(), |ui| {
|
||||||
|
ui.set_clip_rect(parent_clip_rect); // for when the combo-box is in a scroll area.
|
||||||
let frame = Frame::popup(ui.style());
|
let frame = Frame::popup(ui.style());
|
||||||
let frame_margin = frame.margin;
|
let frame_margin = frame.margin;
|
||||||
frame.show(ui, |ui| {
|
frame.show(ui, |ui| {
|
||||||
|
|
Loading…
Reference in a new issue