Define theme/ui text style settings in theme crate

This commit is contained in:
Max Brunsfeld 2023-05-17 14:44:55 -07:00
parent 5c729c0e56
commit 67a25126d4
86 changed files with 530 additions and 637 deletions

View file

@ -149,6 +149,8 @@ impl Workspace {
}
pub mod simple_message_notification {
use super::Notification;
use crate::Workspace;
use gpui::{
actions,
elements::{Flex, MouseEventHandler, Padding, ParentElement, Svg, Text},
@ -158,13 +160,8 @@ pub mod simple_message_notification {
};
use menu::Cancel;
use serde::Deserialize;
use settings::Settings;
use std::{borrow::Cow, sync::Arc};
use crate::Workspace;
use super::Notification;
actions!(message_notifications, [CancelMessageNotification]);
#[derive(Clone, Default, Deserialize, PartialEq)]
@ -240,7 +237,7 @@ pub mod simple_message_notification {
}
fn render(&mut self, cx: &mut gpui::ViewContext<Self>) -> gpui::AnyElement<Self> {
let theme = cx.global::<Settings>().theme.clone();
let theme = theme::current(cx).clone();
let theme = &theme.simple_message_notification;
enum MessageNotificationTag {}