From ccfd8fec60a10f1c122be095a7b83607cdafa0e0 Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Tue, 25 Aug 2026 01:55:08 +0800 Subject: [PATCH] components: paint the ComboBox popup deferred (above following rows) The popup was a plain absolute child: dialog rows after the combo drew OVER it, making the list look transparent (its text overlapped the content behind). deferred() paints it after all ancestors. --- .../oak-app/src/oakui/component/controls.rs | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/crates/oak-app/src/oakui/component/controls.rs b/crates/oak-app/src/oakui/component/controls.rs index 23570bcb6..860e47902 100644 --- a/crates/oak-app/src/oakui/component/controls.rs +++ b/crates/oak-app/src/oakui/component/controls.rs @@ -704,19 +704,24 @@ impl Render for ComboBox { })); if open { + // deferred(): the popup must paint AFTER the rows that follow the + // combo in the dialog, otherwise they draw over it and the list + // looks transparent (the preferences render-backend dropdown + // regression). root = root.child( - div() - .absolute() - .left(px(0.0)) - .right(px(0.0)) - .top(px(22.0)) - .rounded_md() - .border_1() - .border_color(colors.border) - .bg(colors.background) - .shadow_md() - .py_1() - .children(options.iter().enumerate().map(|(i, opt)| { + gpui::deferred( + div() + .absolute() + .left(px(0.0)) + .right(px(0.0)) + .top(px(22.0)) + .rounded_md() + .border_1() + .border_color(colors.border) + .bg(colors.background) + .shadow_md() + .py_1() + .children(options.iter().enumerate().map(|(i, opt)| { let highlighted = i == highlight; div() .px_2() @@ -740,6 +745,7 @@ impl Render for ComboBox { ) .child(opt.label.clone()) })), + ), ); } let _ = selected;