fix(status-area): reducing padding to fix missing icon buttons
This commit is contained in:
parent
6ab2aeca2b
commit
44ec34f6aa
1 changed files with 9 additions and 8 deletions
|
|
@ -573,12 +573,13 @@ fn menu_icon_button<'a>(
|
||||||
let theme = theme.cosmic();
|
let theme = theme.cosmic();
|
||||||
|
|
||||||
let suggested = applet.suggested_size(true);
|
let suggested = applet.suggested_size(true);
|
||||||
let (major_padding, applet_padding_minor_axis) = applet.suggested_padding(true);
|
let padding = applet.suggested_padding(true).1;
|
||||||
let (horizontal_padding, vertical_padding) = if applet.is_horizontal() {
|
// let (major_padding, applet_padding_minor_axis) = applet.suggested_padding(true);
|
||||||
(major_padding, applet_padding_minor_axis)
|
// let (horizontal_padding, vertical_padding) = if applet.is_horizontal() {
|
||||||
} else {
|
// (major_padding, applet_padding_minor_axis)
|
||||||
(applet_padding_minor_axis, major_padding)
|
// } else {
|
||||||
};
|
// (applet_padding_minor_axis, major_padding)
|
||||||
|
// };
|
||||||
let symbolic = icon.symbolic;
|
let symbolic = icon.symbolic;
|
||||||
|
|
||||||
cosmic::widget::button::custom(
|
cosmic::widget::button::custom(
|
||||||
|
|
@ -598,8 +599,8 @@ fn menu_icon_button<'a>(
|
||||||
)
|
)
|
||||||
.center(Length::Fill),
|
.center(Length::Fill),
|
||||||
)
|
)
|
||||||
.width(Length::Fixed((suggested.0 + 2 * horizontal_padding) as f32))
|
.width(Length::Fixed((suggested.0 + 2 * padding) as f32))
|
||||||
.height(Length::Fixed((suggested.1 + 2 * vertical_padding) as f32))
|
.height(Length::Fixed((suggested.1 + 2 * padding) as f32))
|
||||||
.class(cosmic::theme::Button::AppletIcon)
|
.class(cosmic::theme::Button::AppletIcon)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue