root: Fix Root use text size may override default text color. (#1576)
This commit is contained in:
parent
8c2d4de435
commit
1074f78fb0
2 changed files with 2 additions and 2 deletions
|
|
@ -224,7 +224,7 @@ pub fn create_new_window_with_size<F, E>(
|
||||||
let view = crate_view_fn(window, cx);
|
let view = crate_view_fn(window, cx);
|
||||||
let root = cx.new(|cx| StoryRoot::new(title.clone(), view, window, cx));
|
let root = cx.new(|cx| StoryRoot::new(title.clone(), view, window, cx));
|
||||||
|
|
||||||
cx.new(|cx| Root::new(root.into(), window, cx))
|
cx.new(|cx| Root::new(root.into(), window, cx).text_base())
|
||||||
})
|
})
|
||||||
.expect("failed to open window");
|
.expect("failed to open window");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -405,9 +405,9 @@ impl Render for Root {
|
||||||
.on_action(cx.listener(Self::on_action_tab))
|
.on_action(cx.listener(Self::on_action_tab))
|
||||||
.on_action(cx.listener(Self::on_action_tab_prev))
|
.on_action(cx.listener(Self::on_action_tab_prev))
|
||||||
.font_family(".SystemUIFont")
|
.font_family(".SystemUIFont")
|
||||||
|
.refine_style(&self.style)
|
||||||
.bg(cx.theme().background)
|
.bg(cx.theme().background)
|
||||||
.text_color(cx.theme().foreground)
|
.text_color(cx.theme().foreground)
|
||||||
.refine_style(&self.style)
|
|
||||||
.relative()
|
.relative()
|
||||||
.size_full()
|
.size_full()
|
||||||
.child(self.view.clone())
|
.child(self.view.clone())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue