Skip to content

Commit 893fe70

Browse files
committed
fix: alignment
1 parent d63dc0a commit 893fe70

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/app.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,17 +1205,17 @@ impl cosmic::Application for CosmicAppLibrary {
12051205
container(
12061206
row![
12071207
button::custom(
1208-
text(CANCEL.to_string())
1209-
.size(14.0)
1208+
container(text(CANCEL.to_string()).size(14.0))
1209+
.width(Length::Shrink)
12101210
.align_x(Horizontal::Center)
12111211
.width(Length::Fill)
12121212
)
12131213
.on_press(Message::CancelNewGroup)
12141214
.padding([space_xxs, space_s])
12151215
.width(142),
12161216
button::custom(
1217-
text(SAVE.to_string())
1218-
.size(14.0)
1217+
container(text(SAVE.to_string()).size(14.0))
1218+
.width(Length::Shrink)
12191219
.align_x(Horizontal::Center)
12201220
.width(Length::Fill)
12211221
)
@@ -1273,15 +1273,17 @@ impl cosmic::Application for CosmicAppLibrary {
12731273
container(
12741274
row![
12751275
button::custom(
1276-
text(CANCEL.as_str())
1276+
container(text(CANCEL.to_string()).size(14.0))
1277+
.width(Length::Shrink)
12771278
.align_x(Horizontal::Center)
12781279
.width(Length::Fill)
12791280
)
12801281
.on_press(Message::CancelDelete)
12811282
.padding([space_xxs, space_m])
12821283
.width(142),
12831284
button::custom(
1284-
text(fl!("delete"))
1285+
container(text(fl!("delete")).size(14.0))
1286+
.width(Length::Shrink)
12851287
.align_x(Horizontal::Center)
12861288
.width(Length::Fill)
12871289
)
@@ -1489,9 +1491,7 @@ impl cosmic::Application for CosmicAppLibrary {
14891491
.height(Length::Fixed(group_icon_size))
14901492
)
14911493
.padding(space_xxs),
1492-
text(fl!("add-group"))
1493-
.size(14.0)
1494-
.align_x(Horizontal::Center)
1494+
text(fl!("add-group")).size(14.0).width(Length::Shrink)
14951495
]
14961496
.align_x(Alignment::Center)
14971497
.width(Length::Fill),
@@ -1523,7 +1523,7 @@ impl cosmic::Application for CosmicAppLibrary {
15231523
.height(Length::Fixed(group_icon_size))
15241524
)
15251525
.padding(space_xxs),
1526-
text(group.name()).align_x(Horizontal::Center).size(14)
1526+
text(group.name()).size(14).width(Length::Shrink)
15271527
]
15281528
.align_x(Alignment::Center)
15291529
.width(Length::Fill),

src/widgets/application.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ impl<'a, Message: Clone + 'static> ApplicationButton<'a, Message> {
110110
.as_cosmic_icon()
111111
.width(Length::Fixed(72.0))
112112
.height(Length::Fixed(72.0)),
113-
text(name)
113+
container(text(name).size(14.0).width(Length::Shrink))
114114
.align_x(Horizontal::Center)
115-
.size(14)
115+
.width(Length::Fill)
116116
.height(Length::Fixed(40.0))
117117
]
118118
.width(Length::Fixed(120.0))

0 commit comments

Comments
 (0)