refactor ui (#17)
* wip: redesign sidebar * wip: adjust dpi * update * update * refactor modal * fix modal
This commit is contained in:
@@ -10,61 +10,37 @@ use gpui::{
|
||||
|
||||
#[derive(IntoElement, Clone)]
|
||||
pub enum IconName {
|
||||
ALargeSmall,
|
||||
AddressBook,
|
||||
ArrowIn,
|
||||
ArrowDown,
|
||||
ArrowLeft,
|
||||
ArrowRight,
|
||||
ArrowUp,
|
||||
ArrowUpCircle,
|
||||
Asterisk,
|
||||
Bell,
|
||||
BookOpen,
|
||||
Bot,
|
||||
BubbleFill,
|
||||
Calendar,
|
||||
ChartPie,
|
||||
CaretUp,
|
||||
CaretDown,
|
||||
CaretDownFill,
|
||||
CaretRight,
|
||||
Check,
|
||||
ChevronDown,
|
||||
ChevronDownSmall,
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
ChevronUp,
|
||||
ChevronsUpDown,
|
||||
CircleCheck,
|
||||
CircleUser,
|
||||
CircleX,
|
||||
CheckCircle,
|
||||
CheckCircleFill,
|
||||
Close,
|
||||
CloseCircle,
|
||||
CloseCircleFill,
|
||||
Copy,
|
||||
ComposeFill,
|
||||
Dash,
|
||||
Delete,
|
||||
Ellipsis,
|
||||
EllipsisVertical,
|
||||
Eye,
|
||||
EyeOff,
|
||||
Frame,
|
||||
Folder,
|
||||
FolderFill,
|
||||
FolderOpenFill,
|
||||
GalleryVerticalEnd,
|
||||
GitHub,
|
||||
Globe,
|
||||
Group,
|
||||
GroupFill,
|
||||
Heart,
|
||||
HeartOff,
|
||||
Inbox,
|
||||
Info,
|
||||
LayoutDashboard,
|
||||
Loader,
|
||||
LoaderCircle,
|
||||
Map,
|
||||
Maximize,
|
||||
MailboxFill,
|
||||
Menu,
|
||||
Minimize,
|
||||
Minus,
|
||||
Moon,
|
||||
Relays,
|
||||
Palette,
|
||||
PanelBottom,
|
||||
PanelBottomOpen,
|
||||
@@ -75,20 +51,19 @@ pub enum IconName {
|
||||
PanelRightClose,
|
||||
PanelRightOpen,
|
||||
Plus,
|
||||
PlusCircleFill,
|
||||
Relays,
|
||||
ResizeCorner,
|
||||
Search,
|
||||
Settings,
|
||||
Settings2,
|
||||
SortAscending,
|
||||
SortDescending,
|
||||
SquareTerminal,
|
||||
Star,
|
||||
StarOff,
|
||||
Sun,
|
||||
ThumbsDown,
|
||||
ThumbsUp,
|
||||
TriangleAlert,
|
||||
Upload,
|
||||
ResizeCorner,
|
||||
UsersThreeFill,
|
||||
WindowClose,
|
||||
WindowMaximize,
|
||||
WindowMinimize,
|
||||
@@ -98,61 +73,37 @@ pub enum IconName {
|
||||
impl IconName {
|
||||
pub fn path(self) -> SharedString {
|
||||
match self {
|
||||
Self::ALargeSmall => "icons/a-large-small.svg",
|
||||
Self::AddressBook => "icons/address-book.svg",
|
||||
Self::ArrowIn => "icons/arrows-in.svg",
|
||||
Self::ArrowDown => "icons/arrow-down.svg",
|
||||
Self::ArrowLeft => "icons/arrow-left.svg",
|
||||
Self::ArrowRight => "icons/arrow-right.svg",
|
||||
Self::ArrowUp => "icons/arrow-up.svg",
|
||||
Self::ArrowUpCircle => "icons/arrow-up-circle.svg",
|
||||
Self::Asterisk => "icons/asterisk.svg",
|
||||
Self::Bell => "icons/bell.svg",
|
||||
Self::BookOpen => "icons/book-open.svg",
|
||||
Self::Bot => "icons/bot.svg",
|
||||
Self::BubbleFill => "icons/bubble-fill.svg",
|
||||
Self::Calendar => "icons/calendar.svg",
|
||||
Self::ChartPie => "icons/chart-pie.svg",
|
||||
Self::CaretRight => "icons/caret-right.svg",
|
||||
Self::CaretUp => "icons/caret-up.svg",
|
||||
Self::CaretDown => "icons/caret-down.svg",
|
||||
Self::CaretDownFill => "icons/caret-down-fill.svg",
|
||||
Self::Check => "icons/check.svg",
|
||||
Self::ChevronDown => "icons/chevron-down.svg",
|
||||
Self::ChevronDownSmall => "icons/chevron-down-small.svg",
|
||||
Self::ChevronLeft => "icons/chevron-left.svg",
|
||||
Self::ChevronRight => "icons/chevron-right.svg",
|
||||
Self::ChevronUp => "icons/chevron-up.svg",
|
||||
Self::ChevronsUpDown => "icons/chevrons-up-down.svg",
|
||||
Self::CircleCheck => "icons/circle-check.svg",
|
||||
Self::CircleUser => "icons/circle-user.svg",
|
||||
Self::CircleX => "icons/circle-x.svg",
|
||||
Self::CheckCircle => "icons/check-circle.svg",
|
||||
Self::CheckCircleFill => "icons/check-circle-fill.svg",
|
||||
Self::Close => "icons/close.svg",
|
||||
Self::CloseCircle => "icons/close-circle.svg",
|
||||
Self::CloseCircleFill => "icons/close-circle-fill.svg",
|
||||
Self::Copy => "icons/copy.svg",
|
||||
Self::ComposeFill => "icons/compose-fill.svg",
|
||||
Self::Dash => "icons/dash.svg",
|
||||
Self::Delete => "icons/delete.svg",
|
||||
Self::Ellipsis => "icons/ellipsis.svg",
|
||||
Self::EllipsisVertical => "icons/ellipsis-vertical.svg",
|
||||
Self::Eye => "icons/eye.svg",
|
||||
Self::EyeOff => "icons/eye-off.svg",
|
||||
Self::Frame => "icons/frame.svg",
|
||||
Self::Folder => "icons/folder.svg",
|
||||
Self::FolderFill => "icons/folder-fill.svg",
|
||||
Self::FolderOpenFill => "icons/folder-open-fill.svg",
|
||||
Self::GalleryVerticalEnd => "icons/gallery-vertical-end.svg",
|
||||
Self::GitHub => "icons/github.svg",
|
||||
Self::Globe => "icons/globe.svg",
|
||||
Self::Group => "icons/group.svg",
|
||||
Self::GroupFill => "icons/group-fill.svg",
|
||||
Self::Heart => "icons/heart.svg",
|
||||
Self::HeartOff => "icons/heart-off.svg",
|
||||
Self::Inbox => "icons/inbox.svg",
|
||||
Self::Info => "icons/info.svg",
|
||||
Self::LayoutDashboard => "icons/layout-dashboard.svg",
|
||||
Self::Loader => "icons/loader.svg",
|
||||
Self::LoaderCircle => "icons/loader-circle.svg",
|
||||
Self::Map => "icons/map.svg",
|
||||
Self::Maximize => "icons/maximize.svg",
|
||||
Self::MailboxFill => "icons/mailbox-fill.svg",
|
||||
Self::Menu => "icons/menu.svg",
|
||||
Self::Minimize => "icons/minimize.svg",
|
||||
Self::Minus => "icons/minus.svg",
|
||||
Self::Moon => "icons/moon.svg",
|
||||
Self::Relays => "icons/relays.svg",
|
||||
Self::Palette => "icons/palette.svg",
|
||||
Self::PanelBottom => "icons/panel-bottom.svg",
|
||||
Self::PanelBottomOpen => "icons/panel-bottom-open.svg",
|
||||
@@ -163,20 +114,19 @@ impl IconName {
|
||||
Self::PanelRightClose => "icons/panel-right-close.svg",
|
||||
Self::PanelRightOpen => "icons/panel-right-open.svg",
|
||||
Self::Plus => "icons/plus.svg",
|
||||
Self::PlusCircleFill => "icons/plus-circle-fill.svg",
|
||||
Self::Relays => "icons/relays.svg",
|
||||
Self::ResizeCorner => "icons/resize-corner.svg",
|
||||
Self::Search => "icons/search.svg",
|
||||
Self::Settings => "icons/settings.svg",
|
||||
Self::Settings2 => "icons/settings-2.svg",
|
||||
Self::SortAscending => "icons/sort-ascending.svg",
|
||||
Self::SortDescending => "icons/sort-descending.svg",
|
||||
Self::SquareTerminal => "icons/square-terminal.svg",
|
||||
Self::Star => "icons/star.svg",
|
||||
Self::StarOff => "icons/star-off.svg",
|
||||
Self::Sun => "icons/sun.svg",
|
||||
Self::ThumbsDown => "icons/thumbs-down.svg",
|
||||
Self::ThumbsUp => "icons/thumbs-up.svg",
|
||||
Self::TriangleAlert => "icons/triangle-alert.svg",
|
||||
Self::Upload => "icons/upload.svg",
|
||||
Self::ResizeCorner => "icons/resize-corner.svg",
|
||||
Self::UsersThreeFill => "icons/users-three-fill.svg",
|
||||
Self::WindowClose => "icons/window-close.svg",
|
||||
Self::WindowMaximize => "icons/window-maximize.svg",
|
||||
Self::WindowMinimize => "icons/window-minimize.svg",
|
||||
@@ -311,8 +261,8 @@ impl RenderOnce for Icon {
|
||||
.when_some(self.size, |this, size| match size {
|
||||
Size::Size(px) => this.size(px),
|
||||
Size::XSmall => this.size_3(),
|
||||
Size::Small => this.size_3p5(),
|
||||
Size::Medium => this.size_4(),
|
||||
Size::Small => this.size_4(),
|
||||
Size::Medium => this.size_5(),
|
||||
Size::Large => this.size_6(),
|
||||
})
|
||||
.path(self.path)
|
||||
@@ -341,8 +291,8 @@ impl Render for Icon {
|
||||
.when_some(self.size, |this, size| match size {
|
||||
Size::Size(px) => this.size(px),
|
||||
Size::XSmall => this.size_3(),
|
||||
Size::Small => this.size_3p5(),
|
||||
Size::Medium => this.size_4(),
|
||||
Size::Small => this.size_4(),
|
||||
Size::Medium => this.size_5(),
|
||||
Size::Large => this.size_6(),
|
||||
})
|
||||
.path(self.path.clone())
|
||||
|
||||
Reference in New Issue
Block a user