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
@@ -14,6 +14,7 @@ use iced::{Border, Element, Fill, Task, Theme, alignment};
|
||||
use rand::prelude::SliceRandom;
|
||||
use crate::app::AppState;
|
||||
use crate::data::repositories::Repository;
|
||||
use crate::jl_button;
|
||||
|
||||
pub struct DictionaryQuizState {
|
||||
state: AppState,
|
||||
@@ -91,7 +92,7 @@ impl NavigatedPage<DictionaryQuizMessage> for DictionaryQuizState {
|
||||
]
|
||||
.spacing(DEFAULT_SPACING),
|
||||
row![
|
||||
button("Закончить").style(jl_button).on_press(Back),
|
||||
jl_button!("Закончить").on_press(Back),
|
||||
self.appeal_button()
|
||||
]
|
||||
.spacing(DEFAULT_SPACING),
|
||||
@@ -218,7 +219,7 @@ impl DictionaryQuizState {
|
||||
|
||||
fn appeal_button(&self) -> Element<'_, DictionaryQuizMessage> {
|
||||
if self.is_help && !self.no_typing {
|
||||
return button("Апелляция").style(jl_button).on_press(Appeal).into();
|
||||
return jl_button!("Апелляция").on_press(Appeal).into();
|
||||
}
|
||||
space().into()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user