Use small size for calendar month item to fixed content overflow (#231)
This commit is contained in:
parent
728be16a39
commit
303dd51047
2 changed files with 4 additions and 1 deletions
|
|
@ -124,6 +124,9 @@ impl RenderOnce for Checkbox {
|
|||
this
|
||||
}
|
||||
})
|
||||
.when(self.disabled, |this| {
|
||||
this.cursor_not_allowed().text_color(cx.theme().muted_foreground)
|
||||
})
|
||||
.when_some(
|
||||
self.on_click.filter(|_| !self.disabled),
|
||||
|this, on_click| {
|
||||
|
|
|
|||
|
|
@ -593,7 +593,7 @@ impl Calendar {
|
|||
let active = (ix + 1) as u8 == self.current_month;
|
||||
|
||||
self.item_button(ix, month.to_string(), active, false, false, cx)
|
||||
.w(relative(0.3))
|
||||
.w(relative(0.3)).text_sm()
|
||||
.on_click(cx.listener(move |view, _, cx| {
|
||||
view.current_month = (ix + 1) as u8;
|
||||
view.set_view_mode(ViewMode::Day, cx);
|
||||
|
|
|
|||
Loading…
Reference in a new issue