chore: improve ui consistently #35
@@ -223,7 +223,7 @@ impl Render for RepositorySwitcher {
|
|||||||
.h(row_height)
|
.h(row_height)
|
||||||
.px_3()
|
.px_3()
|
||||||
.gap_2()
|
.gap_2()
|
||||||
.rounded(theme.radius.control)
|
.rounded(theme.radius.full)
|
||||||
.text_sm()
|
.text_sm()
|
||||||
.hover(|row| row.bg(theme.colors.muted))
|
.hover(|row| row.bg(theme.colors.muted))
|
||||||
.child(entry.avatar(&list_directory, cx))
|
.child(entry.avatar(&list_directory, cx))
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ impl Button {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
padded: true,
|
padded: true,
|
||||||
fully_rounded: false,
|
fully_rounded: true,
|
||||||
full_width: false,
|
full_width: false,
|
||||||
side: ButtonSide::default(),
|
side: ButtonSide::default(),
|
||||||
tab_stop: true,
|
tab_stop: true,
|
||||||
@@ -238,7 +238,7 @@ impl Button {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Renders the button as a circle instead of the control radius.
|
/// Overrides the pill shape; buttons are fully rounded by default.
|
||||||
pub fn fully_rounded(mut self, fully_rounded: bool) -> Self {
|
pub fn fully_rounded(mut self, fully_rounded: bool) -> Self {
|
||||||
self.fully_rounded = fully_rounded;
|
self.fully_rounded = fully_rounded;
|
||||||
self
|
self
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ impl RenderOnce for DropdownMenu {
|
|||||||
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement {
|
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||||
let theme = cx.theme();
|
let theme = cx.theme();
|
||||||
let colors = theme.colors;
|
let colors = theme.colors;
|
||||||
let radius = theme.radius.control;
|
let radius = theme.radius.full;
|
||||||
|
|
||||||
let ring = colors.ring;
|
let ring = colors.ring;
|
||||||
|
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ pub(crate) struct MenuChrome {
|
|||||||
primary_foreground: gpui::Hsla,
|
primary_foreground: gpui::Hsla,
|
||||||
destructive: gpui::Hsla,
|
destructive: gpui::Hsla,
|
||||||
destructive_foreground: gpui::Hsla,
|
destructive_foreground: gpui::Hsla,
|
||||||
radius_sm: Pixels,
|
radius_full: Pixels,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A floating menu of [`MenuItem`] rows anchored below its trigger.
|
/// A floating menu of [`MenuItem`] rows anchored below its trigger.
|
||||||
@@ -235,7 +235,7 @@ impl MenuChrome {
|
|||||||
primary_foreground: theme.colors.primary_foreground,
|
primary_foreground: theme.colors.primary_foreground,
|
||||||
destructive: theme.ramps.destructive.base,
|
destructive: theme.ramps.destructive.base,
|
||||||
destructive_foreground: theme.colors.destructive_foreground,
|
destructive_foreground: theme.colors.destructive_foreground,
|
||||||
radius_sm: theme.radius.sm,
|
radius_full: theme.radius.full,
|
||||||
},
|
},
|
||||||
theme.motion.overlay,
|
theme.motion.overlay,
|
||||||
)
|
)
|
||||||
@@ -965,7 +965,7 @@ fn row_shell(
|
|||||||
.px_4()
|
.px_4()
|
||||||
.text_sm()
|
.text_sm()
|
||||||
.line_height(relative(1.0))
|
.line_height(relative(1.0))
|
||||||
.rounded(chrome.radius_sm)
|
.rounded(chrome.radius_full)
|
||||||
.map(|row| {
|
.map(|row| {
|
||||||
if item.disabled {
|
if item.disabled {
|
||||||
row
|
row
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ where
|
|||||||
|
|
||||||
h_flex()
|
h_flex()
|
||||||
.id(("segment", index))
|
.id(("segment", index))
|
||||||
.gap_2()
|
.gap_1()
|
||||||
.justify_center()
|
.justify_center()
|
||||||
.cursor_pointer()
|
.cursor_pointer()
|
||||||
.h_full()
|
.h_full()
|
||||||
|
|||||||
Reference in New Issue
Block a user