migrate icons to gpui-native-kit
This commit is contained in:
@@ -14,6 +14,7 @@ settings = { path = "../settings" }
|
||||
speech = { path = "../speech" }
|
||||
state = { path = "../state" }
|
||||
gpui-kit = { workspace = true, features = ["speech"] }
|
||||
gpui-native-kit.workspace = true
|
||||
ui = { path = "../ui" }
|
||||
|
||||
gpui.workspace = true
|
||||
|
||||
+10
-10
@@ -10,7 +10,6 @@ use gpui::{
|
||||
ParentElement, Render, SharedString, Styled, Subscription, Task, WeakEntity, Window, div, list,
|
||||
px,
|
||||
};
|
||||
use gpui_kit::assets::IconName;
|
||||
use gpui_kit::base::StyledExt as _;
|
||||
use gpui_kit::component::button::{Button, ButtonVariant, ButtonVariants};
|
||||
use gpui_kit::component::dialog::DialogButtonProps;
|
||||
@@ -19,7 +18,8 @@ use gpui_kit::component::input::{InputEvent, Textarea, TextareaState};
|
||||
use gpui_kit::component::notification::Notification;
|
||||
use gpui_kit::component::scroll::Scrollbar;
|
||||
use gpui_kit::component::speech::{SpeechButton, SpeechEvent, SpeechState, SpeechWaveform};
|
||||
use gpui_kit::component::{ActiveTheme, Disableable, Icon, Sizable, WindowExt, h_flex, v_flex};
|
||||
use gpui_kit::component::{ActiveTheme, Disableable, Sizable, WindowExt, h_flex, v_flex};
|
||||
use gpui_native_kit::icons::Icon;
|
||||
use nip29::{Group, GroupEvent, GroupKey, GroupsRegistry, Membership, Pin, Row};
|
||||
use nostr_sdk::prelude::*;
|
||||
use person::Directory;
|
||||
@@ -28,7 +28,7 @@ use settings::AppSettings;
|
||||
use smallvec::{SmallVec, smallvec};
|
||||
use speech::speaker::Speaker;
|
||||
use state::{NostrRegistry, pick_file, upload_file};
|
||||
use ui::{Avatar, RenderedText, RevealText, WelcomeMessage, rendered_text};
|
||||
use ui::{Avatar, IconName, RenderedText, RevealText, WelcomeMessage, rendered_text};
|
||||
use util::{attachment_name, display_name, opens_run, pin_label, report};
|
||||
|
||||
mod details;
|
||||
@@ -783,9 +783,9 @@ impl GroupPanel {
|
||||
.border_b_1()
|
||||
.border_color(cx.theme().border)
|
||||
.child(
|
||||
Icon::new(IconName::Info)
|
||||
.small()
|
||||
.text_color(cx.theme().muted_foreground),
|
||||
Icon::named(IconName::Info)
|
||||
.size(ui::small_icon_size(cx))
|
||||
.color(cx.theme().muted_foreground),
|
||||
)
|
||||
.child(div().flex_1().min_w_0().truncate().child(message))
|
||||
.child(
|
||||
@@ -820,9 +820,9 @@ impl GroupPanel {
|
||||
.text_xs()
|
||||
.bg(cx.theme().secondary)
|
||||
.child(
|
||||
Icon::new(IconName::Info)
|
||||
.small()
|
||||
.text_color(cx.theme().warning),
|
||||
Icon::named(IconName::Info)
|
||||
.size(ui::small_icon_size(cx))
|
||||
.color(cx.theme().warning),
|
||||
)
|
||||
.child(div().flex_1().min_w_0().child(
|
||||
"This group is public. Messages are not encrypted and can be read by anyone.",
|
||||
@@ -1277,7 +1277,7 @@ impl GroupPanel {
|
||||
.rounded(cx.theme().radius)
|
||||
.text_xs()
|
||||
.text_color(cx.theme().muted_foreground)
|
||||
.child(Icon::new(IconName::Link).xsmall())
|
||||
.child(Icon::named(IconName::Link).size(ui::dense_icon_size(cx)))
|
||||
.child(
|
||||
div()
|
||||
.max_w(px(200.))
|
||||
|
||||
@@ -5,11 +5,11 @@ use gpui::{
|
||||
AnyElement, App, Entity, InteractiveElement, IntoElement, ParentElement, SharedString, Styled,
|
||||
WeakEntity, div,
|
||||
};
|
||||
use gpui_kit::assets::IconName;
|
||||
use gpui_kit::base::StyledExt as _;
|
||||
use gpui_kit::component::menu::{ContextMenuExt as _, PopupMenuItem};
|
||||
use gpui_kit::component::notification::Notification;
|
||||
use gpui_kit::component::{ActiveTheme, Icon, Sizable, WindowExt, h_flex};
|
||||
use gpui_kit::component::{ActiveTheme, Sizable, WindowExt, h_flex};
|
||||
use gpui_native_kit::icons::Icon;
|
||||
use nip29::{Activity, Group, Reaction};
|
||||
use nostr_sdk::prelude::{EventId, Kind};
|
||||
use person::Directory;
|
||||
@@ -17,8 +17,8 @@ use settings::AppSettings;
|
||||
use speech::speaker::END_GRACE;
|
||||
use state::NostrRegistry;
|
||||
use ui::{
|
||||
Avatar, MessageActions, MessageMedia, MessageRow, REACTION_EMOJIS, ReactionBar, ReplyPreview,
|
||||
group_reactions, react_menu,
|
||||
Avatar, IconName, MessageActions, MessageMedia, MessageRow, REACTION_EMOJIS, ReactionBar,
|
||||
ReplyPreview, group_reactions, react_menu,
|
||||
};
|
||||
|
||||
use crate::GroupPanel;
|
||||
@@ -274,7 +274,7 @@ fn badge(activity: &Activity, cx: &App) -> AnyElement {
|
||||
.flex_shrink_0()
|
||||
.justify_center()
|
||||
.size_8()
|
||||
.child(Icon::new(icon).small().text_color(color))
|
||||
.child(Icon::named(icon).size(ui::small_icon_size(cx)).color(color))
|
||||
.into_any_element()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user