button: Fix button label display has overflow hidden. (#1322)
This commit is contained in:
parent
908c022efe
commit
e84e8ebaad
2 changed files with 11 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ use gpui::{
|
|||
use gpui_component::{
|
||||
button::{Button, ButtonVariant, ButtonVariants},
|
||||
dock::PanelControl,
|
||||
h_flex, neutral_500, v_flex, ActiveTheme as _, Icon, IconName,
|
||||
h_flex, neutral_500, v_flex, ActiveTheme as _, Icon, IconName, Sizable,
|
||||
};
|
||||
|
||||
use crate::section;
|
||||
|
|
@ -111,5 +111,15 @@ impl Render for IconStory {
|
|||
),
|
||||
),
|
||||
)
|
||||
.child(
|
||||
section("Button with size").child(
|
||||
Button::new("button-with-size")
|
||||
.outline()
|
||||
.size_5()
|
||||
.small()
|
||||
.px_0()
|
||||
.label("10"),
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -423,7 +423,6 @@ impl RenderOnce for Button {
|
|||
.tab_stop(self.tab_stop),
|
||||
)
|
||||
})
|
||||
.flex_shrink_0()
|
||||
.cursor_default()
|
||||
.flex()
|
||||
.flex_shrink_0()
|
||||
|
|
@ -534,7 +533,6 @@ impl RenderOnce for Button {
|
|||
.child({
|
||||
h_flex()
|
||||
.id("label")
|
||||
.overflow_hidden()
|
||||
.items_center()
|
||||
.justify_center()
|
||||
.button_text_size(self.size)
|
||||
|
|
|
|||
Loading…
Reference in a new issue