Mainline GPUI2 UI work (#3079)
This PR mainlines the current state of new GPUI2-based UI from the `gpui2-ui` branch. Release Notes: - N/A --------- Co-authored-by: Nate Butler <iamnbutler@gmail.com> Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Co-authored-by: Nate <nate@zed.dev>
This commit is contained in:
parent
08361eb84e
commit
9e1f7c4c18
39 changed files with 1047 additions and 399 deletions
|
@ -2,7 +2,7 @@ pub use gpui2::elements::div::{div, ScrollState};
|
|||
pub use gpui2::style::{StyleHelpers, Styleable};
|
||||
pub use gpui2::{Element, IntoElement, ParentElement, ViewContext};
|
||||
|
||||
pub use crate::{theme, ButtonVariant, HackyChildren, HackyChildrenPayload, InputVariant};
|
||||
pub use crate::{theme, ButtonVariant, HackyChildren, HackyChildrenPayload, InputVariant, Theme};
|
||||
|
||||
use gpui2::{hsla, rgb, Hsla, WindowContext};
|
||||
use strum::EnumIter;
|
||||
|
@ -40,8 +40,7 @@ pub enum HighlightColor {
|
|||
}
|
||||
|
||||
impl HighlightColor {
|
||||
pub fn hsla(&self, cx: &WindowContext) -> Hsla {
|
||||
let theme = theme(cx);
|
||||
pub fn hsla(&self, theme: &Theme) -> Hsla {
|
||||
let system_color = SystemColor::new();
|
||||
|
||||
match self {
|
||||
|
@ -74,7 +73,7 @@ impl HighlightColor {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, EnumIter)]
|
||||
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, EnumIter)]
|
||||
pub enum FileSystemStatus {
|
||||
#[default]
|
||||
None,
|
||||
|
@ -92,7 +91,7 @@ impl FileSystemStatus {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, EnumIter, Clone, Copy)]
|
||||
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, EnumIter)]
|
||||
pub enum GitStatus {
|
||||
#[default]
|
||||
None,
|
||||
|
@ -130,7 +129,7 @@ impl GitStatus {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq)]
|
||||
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, EnumIter)]
|
||||
pub enum DiagnosticStatus {
|
||||
#[default]
|
||||
None,
|
||||
|
@ -139,14 +138,14 @@ pub enum DiagnosticStatus {
|
|||
Info,
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq)]
|
||||
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, EnumIter)]
|
||||
pub enum IconSide {
|
||||
#[default]
|
||||
Left,
|
||||
Right,
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq)]
|
||||
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, EnumIter)]
|
||||
pub enum OrderMethod {
|
||||
#[default]
|
||||
Ascending,
|
||||
|
@ -154,14 +153,14 @@ pub enum OrderMethod {
|
|||
MostRecent,
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, Clone, Copy)]
|
||||
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, EnumIter)]
|
||||
pub enum Shape {
|
||||
#[default]
|
||||
Circle,
|
||||
RoundedRectangle,
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, Clone, Copy)]
|
||||
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, EnumIter)]
|
||||
pub enum DisclosureControlVisibility {
|
||||
#[default]
|
||||
OnHover,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue