Migrate to tiny macros of button

This commit is contained in:
micialware committed 2026-09-09 14:26:55 +03:00
1 parent 444352c007
commit 1ad991667b
12 files changed
+52 -45

No files matched your search

+6 -8
View File
@@ -6,6 +6,7 @@ use crate::navigation::Page::PreviousPage;
use crate::navigation::{NavigatedPage, Page, RootMessage};
use crate::notification::{NotificationData, NotificationRequest};
use crate::pages::sync::SyncMessage::*;
use crate::jl_button;
use crate::styling::*;
use crate::{push_error, push_error_task};
use iced::widget::button::danger;
@@ -221,14 +222,13 @@ impl SyncState {
.padding(3)
)
.style(rounded_box),
button("Скопировать в буфер обмена")
.style(jl_button)
jl_button!("Скопировать в буфер обмена")
.on_press(CopyKey)
.width(Fill),
row![
button("↑ Отправить").style(jl_button).on_press(Send),
jl_button!("↑ Отправить").on_press(Send),
space().width(Fill),
button("↓ Скачать").style(jl_button).on_press(GetLast)
jl_button!("↓ Скачать").on_press(GetLast)
]
.spacing(DEFAULT_SPACING),
toggler(self.auto_fetch)
@@ -241,11 +241,9 @@ impl SyncState {
]
} else {
column![
button("Создать сохранение")
.style(jl_button)
jl_button!("Создать сохранение")
.on_press(InitSync),
button("Вставить ключ из буфера")
.style(jl_button)
jl_button!("Вставить ключ из буфера")
.on_press(GetKey),
]
}