Use the same background color as the editor for SharedScreen

This commit is contained in:
Antonio Scandurra 2022-10-26 08:33:32 +02:00
parent a7d86a164c
commit 56a66b348d
4 changed files with 16 additions and 1 deletions

View file

@ -8,6 +8,7 @@ use gpui::{
geometry::{rect::RectF, vector::vec2f},
Entity, ModelHandle, MouseButton, RenderContext, Task, View, ViewContext,
};
use settings::Settings;
use smallvec::SmallVec;
use std::{
path::PathBuf,
@ -67,7 +68,7 @@ impl View for SharedScreen {
enum Focus {}
let frame = self.frame.clone();
MouseEventHandler::<Focus>::new(0, cx, |_, _| {
MouseEventHandler::<Focus>::new(0, cx, |_, cx| {
Canvas::new(move |bounds, _, cx| {
if let Some(frame) = frame.clone() {
let size = constrain_size_preserving_aspect_ratio(
@ -81,6 +82,8 @@ impl View for SharedScreen {
});
}
})
.contained()
.with_style(cx.global::<Settings>().theme.shared_screen)
.boxed()
})
.on_down(MouseButton::Left, |_, cx| cx.focus_parent_view())