Migrate to tiny macros of button
This commit is contained in:
1 parent
444352c007
commit
1ad991667b
12 files changed
+52
-45
No files matched your search
@@ -12,6 +12,7 @@ use crate::pages::repetition_settings::RepetitionSettingsState;
|
||||
use crate::pages::repetitions::RepetitionsMessage::*;
|
||||
use crate::push_error;
|
||||
use crate::push_error_task;
|
||||
use crate::jl_button;
|
||||
use crate::styling::*;
|
||||
use chrono::{Days, Local, Utc};
|
||||
use hashbrown::HashSet;
|
||||
@@ -227,8 +228,7 @@ impl NavigatedPage<RepetitionsMessage> for RepetitionsState {
|
||||
row![
|
||||
column![
|
||||
scrollable(self.decks_list()).height(Fill),
|
||||
button("Добавить")
|
||||
.style(jl_button)
|
||||
jl_button!("Добавить")
|
||||
.width(Fill)
|
||||
.on_press(CreateSet),
|
||||
]
|
||||
@@ -331,8 +331,7 @@ impl RepetitionsState {
|
||||
column![
|
||||
text!("Фильтр"),
|
||||
text_input("", &deck.filter).on_input(SetFilter),
|
||||
button("Проверить фильтр")
|
||||
.style(jl_button)
|
||||
jl_button!("Проверить фильтр")
|
||||
.on_press(TryFilter),
|
||||
self.count_view(deck),
|
||||
]
|
||||
@@ -361,7 +360,7 @@ impl RepetitionsState {
|
||||
Some(deck.open_mode),
|
||||
SetOpenMode
|
||||
),
|
||||
button("История").style(jl_button).on_press(GoToHistory),
|
||||
jl_button!("История").on_press(GoToHistory),
|
||||
]
|
||||
.spacing(HALF_SPACING)
|
||||
}
|
||||
@@ -378,7 +377,7 @@ impl RepetitionsState {
|
||||
)
|
||||
.height(Fill),
|
||||
row![
|
||||
button("Сохранить").style(jl_button).on_press(Save),
|
||||
jl_button!("Сохранить").on_press(Save),
|
||||
self.launch_delete_button(deck)
|
||||
]
|
||||
.spacing(DEFAULT_SPACING)
|
||||
|
||||
Reference in new issue
Block a user