fix(ui): fully round buttons and menu rows by default
This commit is contained in:
@@ -159,7 +159,7 @@ impl Button {
|
||||
disabled: false,
|
||||
loading: false,
|
||||
padded: true,
|
||||
fully_rounded: false,
|
||||
fully_rounded: true,
|
||||
full_width: false,
|
||||
side: ButtonSide::default(),
|
||||
tab_stop: true,
|
||||
@@ -238,7 +238,7 @@ impl Button {
|
||||
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 {
|
||||
self.fully_rounded = fully_rounded;
|
||||
self
|
||||
|
||||
@@ -194,7 +194,7 @@ impl RenderOnce for DropdownMenu {
|
||||
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||
let theme = cx.theme();
|
||||
let colors = theme.colors;
|
||||
let radius = theme.radius.control;
|
||||
let radius = theme.radius.full;
|
||||
|
||||
let ring = colors.ring;
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ pub(crate) struct MenuChrome {
|
||||
primary_foreground: gpui::Hsla,
|
||||
destructive: gpui::Hsla,
|
||||
destructive_foreground: gpui::Hsla,
|
||||
radius_sm: Pixels,
|
||||
radius_full: Pixels,
|
||||
}
|
||||
|
||||
/// A floating menu of [`MenuItem`] rows anchored below its trigger.
|
||||
@@ -235,7 +235,7 @@ impl MenuChrome {
|
||||
primary_foreground: theme.colors.primary_foreground,
|
||||
destructive: theme.ramps.destructive.base,
|
||||
destructive_foreground: theme.colors.destructive_foreground,
|
||||
radius_sm: theme.radius.sm,
|
||||
radius_full: theme.radius.full,
|
||||
},
|
||||
theme.motion.overlay,
|
||||
)
|
||||
@@ -965,7 +965,7 @@ fn row_shell(
|
||||
.px_4()
|
||||
.text_sm()
|
||||
.line_height(relative(1.0))
|
||||
.rounded(chrome.radius_sm)
|
||||
.rounded(chrome.radius_full)
|
||||
.map(|row| {
|
||||
if item.disabled {
|
||||
row
|
||||
|
||||
@@ -229,7 +229,7 @@ where
|
||||
|
||||
h_flex()
|
||||
.id(("segment", index))
|
||||
.gap_2()
|
||||
.gap_1()
|
||||
.justify_center()
|
||||
.cursor_pointer()
|
||||
.h_full()
|
||||
|
||||
Reference in New Issue
Block a user