forked from reya/gpui-native-kit
add StyledExt::refine_style to utils
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
use gpui::prelude::FluentBuilder as _;
|
||||
use gpui::{
|
||||
App, Bounds, DispatchPhase, ElementId, InteractiveElement as _, IntoElement, MouseDownEvent,
|
||||
MouseMoveEvent, ParentElement, Pixels, Refineable as _, RenderOnce, ScrollHandle, SharedString,
|
||||
MouseMoveEvent, ParentElement, Pixels, RenderOnce, ScrollHandle, SharedString,
|
||||
StatefulInteractiveElement as _, Styled, Window, canvas, div, fill, point,
|
||||
};
|
||||
use gpui_native_theme::ActiveTheme as _;
|
||||
|
||||
use crate::common::StyledExt;
|
||||
|
||||
/// Which directions the content scrolls in.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
|
||||
pub enum ScrollAxes {
|
||||
@@ -116,13 +118,13 @@ impl RenderOnce for ScrollArea {
|
||||
.on_scroll(|_, _, cx| {
|
||||
// Keep wheel events from scrolling an outer scroll area too.
|
||||
cx.stop_propagation();
|
||||
});
|
||||
})
|
||||
.refine_style(&self.style);
|
||||
|
||||
pane.style().refine(&self.style);
|
||||
// Extend with children
|
||||
pane.extend(self.children);
|
||||
|
||||
let mut wrapper = div().relative();
|
||||
wrapper.style().refine(&self.style);
|
||||
let mut wrapper = div().relative().refine_style(&self.style);
|
||||
wrapper.extend(std::iter::once(pane.into_any_element()));
|
||||
|
||||
if let Some(handle) = self.handle {
|
||||
|
||||
Reference in New Issue
Block a user