Style pane drop targets (#3726)
This PR styles the pane drop targets using the `drop_target_background` color from the theme. We do have to adjust the alpha channel of the color so that it doesn't obscure the contents of the buffer. Release Notes: - N/A
This commit is contained in:
parent
547ad77243
commit
53b76e3e4d
1 changed files with 4 additions and 4 deletions
|
@ -1817,9 +1817,6 @@ impl Render for Pane {
|
||||||
type Element = Focusable<Div>;
|
type Element = Focusable<Div>;
|
||||||
|
|
||||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||||
let mut drag_target_color = cx.theme().colors().text;
|
|
||||||
drag_target_color.a = 0.5;
|
|
||||||
|
|
||||||
v_stack()
|
v_stack()
|
||||||
.key_context("Pane")
|
.key_context("Pane")
|
||||||
.track_focus(&self.focus_handle)
|
.track_focus(&self.focus_handle)
|
||||||
|
@ -1922,7 +1919,10 @@ impl Render for Pane {
|
||||||
div()
|
div()
|
||||||
.invisible()
|
.invisible()
|
||||||
.absolute()
|
.absolute()
|
||||||
.bg(drag_target_color)
|
.bg(theme::color_alpha(
|
||||||
|
cx.theme().colors().drop_target_background,
|
||||||
|
0.75,
|
||||||
|
))
|
||||||
.group_drag_over::<DraggedTab>("", |style| style.visible())
|
.group_drag_over::<DraggedTab>("", |style| style.visible())
|
||||||
.group_drag_over::<ProjectEntryId>("", |style| style.visible())
|
.group_drag_over::<ProjectEntryId>("", |style| style.visible())
|
||||||
.on_drop(cx.listener(move |this, dragged_tab, cx| {
|
.on_drop(cx.listener(move |this, dragged_tab, cx| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue