migrate ui components to gpui-kit
This commit is contained in:
+13
-48
@@ -1,50 +1,15 @@
|
||||
pub(crate) use gpui_base::{ElementExt, InteractiveElementExt};
|
||||
pub use icon::*;
|
||||
pub use root::Root;
|
||||
pub use styled::*;
|
||||
pub use title_bar::{TRAFFIC_LIGHT_PADDING, title_bar_drag_handlers};
|
||||
pub use window_ext::*;
|
||||
pub use layout::{
|
||||
BASE_RADIUS, BUTTON_HEIGHT, CLIENT_SIDE_DECORATION_BORDER, CLIENT_SIDE_DECORATION_ROUNDING,
|
||||
CLIENT_SIDE_DECORATION_SHADOW, CONTENT_MARGIN, CONTROL_HEIGHT_SMALL, EDGE, SIDEBAR_WIDTH,
|
||||
SPACE, TABBAR_HEIGHT, TRAFFIC_LIGHT_PADDING, bubble_radius, button_radius, control_radius,
|
||||
inset_radius, panel_radius, surface_radius,
|
||||
};
|
||||
pub use styled::{background, divider};
|
||||
pub use typography::{DEFAULT_BASE_TEXT_SIZE, Metrics, TextStyle, Typeset, base_text_size};
|
||||
pub use window_drag::title_bar_drag_handlers;
|
||||
|
||||
pub mod avatar;
|
||||
pub mod button;
|
||||
pub mod dialog;
|
||||
pub mod dock;
|
||||
pub mod group_box;
|
||||
pub mod indicator;
|
||||
pub mod input;
|
||||
pub mod markdown;
|
||||
pub mod menu;
|
||||
pub mod message;
|
||||
pub mod nav;
|
||||
pub mod nav_item;
|
||||
pub mod notification;
|
||||
pub mod scroll;
|
||||
pub mod switch;
|
||||
pub mod tab;
|
||||
pub mod tooltip;
|
||||
|
||||
mod icon;
|
||||
mod kbd;
|
||||
pub mod layout;
|
||||
pub mod motion;
|
||||
mod popover;
|
||||
mod resizable;
|
||||
mod root;
|
||||
mod styled;
|
||||
mod title_bar;
|
||||
mod window_ext;
|
||||
|
||||
/// Initialize the UI module.
|
||||
///
|
||||
/// This must be called before using any of the UI components.
|
||||
/// You can initialize the UI module at your application's entry point.
|
||||
pub fn init(cx: &mut gpui::App) {
|
||||
gpui_base::init(cx);
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
cx.bind_keys([gpui::KeyBinding::new(
|
||||
"shift-insert",
|
||||
gpui_base::input::Paste,
|
||||
Some("Input"),
|
||||
)]);
|
||||
theme::sync_base(cx);
|
||||
menu::init(cx);
|
||||
}
|
||||
pub mod styled;
|
||||
pub mod typography;
|
||||
pub mod window_drag;
|
||||
|
||||
Reference in New Issue
Block a user