Merge remote-tracking branch 'origin/main' into save-conversations
This commit is contained in:
commit
6f0efec146
112 changed files with 4161 additions and 1653 deletions
|
@ -498,7 +498,9 @@ impl View for PanelButtons {
|
|||
Stack::new()
|
||||
.with_child(
|
||||
MouseEventHandler::<Self, _>::new(panel_ix, cx, |state, cx| {
|
||||
let style = button_style.style_for(state, is_active);
|
||||
let style = button_style.in_state(is_active);
|
||||
|
||||
let style = style.style_for(state);
|
||||
Flex::row()
|
||||
.with_child(
|
||||
Svg::new(view.icon_path(cx))
|
||||
|
|
|
@ -291,7 +291,7 @@ pub mod simple_message_notification {
|
|||
)
|
||||
.with_child(
|
||||
MouseEventHandler::<Cancel, _>::new(0, cx, |state, _| {
|
||||
let style = theme.dismiss_button.style_for(state, false);
|
||||
let style = theme.dismiss_button.style_for(state);
|
||||
Svg::new("icons/x_mark_8.svg")
|
||||
.with_color(style.color)
|
||||
.constrained()
|
||||
|
@ -323,7 +323,7 @@ pub mod simple_message_notification {
|
|||
0,
|
||||
cx,
|
||||
|state, _| {
|
||||
let style = theme.action_message.style_for(state, false);
|
||||
let style = theme.action_message.style_for(state);
|
||||
|
||||
Flex::row()
|
||||
.with_child(
|
||||
|
|
|
@ -1410,7 +1410,7 @@ impl Pane {
|
|||
pub fn render_tab_bar_button<F: 'static + Fn(&mut Pane, &mut EventContext<Pane>)>(
|
||||
index: usize,
|
||||
icon: &'static str,
|
||||
active: bool,
|
||||
is_active: bool,
|
||||
tooltip: Option<(String, Option<Box<dyn Action>>)>,
|
||||
cx: &mut ViewContext<Pane>,
|
||||
on_click: F,
|
||||
|
@ -1420,7 +1420,7 @@ impl Pane {
|
|||
|
||||
let mut button = MouseEventHandler::<TabBarButton, _>::new(index, cx, |mouse_state, cx| {
|
||||
let theme = &settings::get::<ThemeSettings>(cx).theme.workspace.tab_bar;
|
||||
let style = theme.pane_button.style_for(mouse_state, active);
|
||||
let style = theme.pane_button.in_state(is_active).style_for(mouse_state);
|
||||
Svg::new(icon)
|
||||
.with_color(style.color)
|
||||
.constrained()
|
||||
|
|
|
@ -231,7 +231,7 @@ fn nav_button<A: Action, F: 'static + Fn(&mut Toolbar, &mut ViewContext<Toolbar>
|
|||
) -> AnyElement<Toolbar> {
|
||||
MouseEventHandler::<A, _>::new(0, cx, |state, _| {
|
||||
let style = if enabled {
|
||||
style.style_for(state, false)
|
||||
style.style_for(state)
|
||||
} else {
|
||||
style.disabled_style()
|
||||
};
|
||||
|
|
|
@ -140,9 +140,11 @@ pub struct OpenPaths {
|
|||
#[derive(Clone, Deserialize, PartialEq)]
|
||||
pub struct ActivatePane(pub usize);
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct Toast {
|
||||
id: usize,
|
||||
msg: Cow<'static, str>,
|
||||
#[serde(skip)]
|
||||
on_click: Option<(Cow<'static, str>, Arc<dyn Fn(&mut WindowContext)>)>,
|
||||
}
|
||||
|
||||
|
@ -183,9 +185,9 @@ impl Clone for Toast {
|
|||
}
|
||||
}
|
||||
|
||||
pub type WorkspaceId = i64;
|
||||
impl_actions!(workspace, [ActivatePane, Toast]);
|
||||
|
||||
impl_actions!(workspace, [ActivatePane]);
|
||||
pub type WorkspaceId = i64;
|
||||
|
||||
pub fn init_settings(cx: &mut AppContext) {
|
||||
settings::register::<WorkspaceSettings>(cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue