What if we base themes on Rose Pine

This commit is contained in:
Nathan Sobo 2023-08-09 20:54:30 -06:00
parent 82c903de14
commit 3b1e5e966a
10 changed files with 368 additions and 131 deletions

View file

@ -44,7 +44,7 @@ pub use test_app_context::{ContextHandle, TestAppContext};
use window_input_handler::WindowInputHandler;
use crate::{
elements::{AnyElement, AnyRootElement, Empty, RootElement},
elements::{AnyElement, AnyRootElement, RootElement},
executor::{self, Task},
fonts::TextStyle,
json,
@ -55,7 +55,7 @@ use crate::{
},
util::post_inc,
window::{Window, WindowContext},
AssetCache, AssetSource, ClipboardItem, Element, FontCache, MouseRegionId,
AssetCache, AssetSource, ClipboardItem, FontCache, MouseRegionId,
};
use self::ref_counts::RefCounts;
@ -129,16 +129,6 @@ pub trait View: Entity + Sized {
}
}
impl Entity for () {
type Event = ();
}
impl View for () {
fn render(&mut self, _: &mut ViewContext<'_, '_, Self>) -> AnyElement<Self> {
Empty::new().into_any()
}
}
pub trait BorrowAppContext {
fn read_with<T, F: FnOnce(&AppContext) -> T>(&self, f: F) -> T;
fn update<T, F: FnOnce(&mut AppContext) -> T>(&mut self, f: F) -> T;
@ -2155,7 +2145,7 @@ struct ViewMetadata {
keymap_context: KeymapContext,
}
#[derive(Default, Clone)]
#[derive(Default, Clone, Debug)]
pub struct WindowInvalidation {
pub updated: HashSet<usize>,
pub removed: Vec<usize>,