Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromjpochyla/psst

Commit0c1b45d

Browse files
SO9010SO9010
SO9010
authored and
SO9010
committed
Fix
1 parent5bf8a69 commit0c1b45d

File tree

1 file changed

+24
-28
lines changed

1 file changed

+24
-28
lines changed

‎psst-gui/src/ui/home.rs

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,16 @@ pub fn home_widget() -> impl Widget<AppState> {
3737
}
3838

3939
fnsimple_title_label(title:&str) ->implWidget<AppState>{
40-
Flex::column()
41-
.with_default_spacer()
42-
.with_child(Label::new(title)
43-
.with_text_size(theme::grid(2.5))
44-
.align_left()
45-
.padding((theme::grid(1.5),0.0))
40+
Flex::column().with_default_spacer().with_child(
41+
Label::new(title)
42+
.with_text_size(theme::grid(2.5))
43+
.align_left()
44+
.padding((theme::grid(1.5),0.0)),
4645
)
4746
}
4847

4948
pubfnmade_for_you() ->implWidget<AppState>{
50-
Async::new(spinner_widget, loaded_results_widget, ||{Empty})
49+
Async::new(spinner_widget, loaded_results_widget, ||Empty)
5150
.lens(
5251
Ctx::make(
5352
AppState::common_ctx,
@@ -64,7 +63,7 @@ pub fn made_for_you() -> impl Widget<AppState> {
6463
}
6564

6665
pubfnrecommended_stations() ->implWidget<AppState>{
67-
Async::new(spinner_widget, loaded_results_widget, ||{Empty})
66+
Async::new(spinner_widget, loaded_results_widget, ||Empty)
6867
.lens(
6968
Ctx::make(
7069
AppState::common_ctx,
@@ -82,27 +81,24 @@ pub fn recommended_stations() -> impl Widget<AppState> {
8281

8382
fnuniquely_yours_results_widget() ->implWidget<WithCtx<MixedView>>{
8483
Either::new(
85-
|results:&WithCtx<MixedView>, _|{
86-
results.data.playlists.is_empty()
87-
},
84+
|results:&WithCtx<MixedView>, _| results.data.playlists.is_empty(),
8885
Empty,
89-
Flex::column().with_default_spacer()
90-
.with_child(Label::new("Uniquely yours")
91-
.with_text_size(theme::grid(2.5))
92-
.align_left()
93-
.padding((theme::grid(1.5),0.0))
94-
).with_child(
95-
Scroll::new(
96-
Flex::row()
97-
.with_child(playlist_results_widget())
86+
Flex::column()
87+
.with_default_spacer()
88+
.with_child(
89+
Label::new("Uniquely yours")
90+
.with_text_size(theme::grid(2.5))
91+
.align_left()
92+
.padding((theme::grid(1.5), theme::grid(1.5))),
9893
)
99-
.align_left(),
100-
),
94+
.with_child(
95+
Scroll::new(Flex::row().with_child(playlist_results_widget())).align_left(),
96+
),
10197
)
10298
}
10399

104100
pubfnuniquely_yours() ->implWidget<AppState>{
105-
Async::new(spinner_widget, uniquely_yours_results_widget, ||{Empty})
101+
Async::new(spinner_widget, uniquely_yours_results_widget, ||Empty)
106102
.lens(
107103
Ctx::make(
108104
AppState::common_ctx,
@@ -119,7 +115,7 @@ pub fn uniquely_yours() -> impl Widget<AppState> {
119115
}
120116

121117
pubfnuser_top_mixes() ->implWidget<AppState>{
122-
Async::new(spinner_widget, loaded_results_widget, ||{Empty})
118+
Async::new(spinner_widget, loaded_results_widget, ||Empty)
123119
.lens(
124120
Ctx::make(
125121
AppState::common_ctx,
@@ -136,7 +132,7 @@ pub fn user_top_mixes() -> impl Widget<AppState> {
136132
}
137133

138134
pubfnbest_of_artists() ->implWidget<AppState>{
139-
Async::new(spinner_widget, loaded_results_widget, ||{Empty})
135+
Async::new(spinner_widget, loaded_results_widget, ||Empty)
140136
.lens(
141137
Ctx::make(
142138
AppState::common_ctx,
@@ -153,7 +149,7 @@ pub fn best_of_artists() -> impl Widget<AppState> {
153149
}
154150

155151
pubfnyour_shows() ->implWidget<AppState>{
156-
Async::new(spinner_widget, loaded_results_widget, ||{Empty})
152+
Async::new(spinner_widget, loaded_results_widget, ||Empty)
157153
.lens(
158154
Ctx::make(
159155
AppState::common_ctx,
@@ -170,7 +166,7 @@ pub fn your_shows() -> impl Widget<AppState> {
170166
}
171167

172168
pubfnjump_back_in() ->implWidget<AppState>{
173-
Async::new(spinner_widget, loaded_results_widget, ||{Empty})
169+
Async::new(spinner_widget, loaded_results_widget, ||Empty)
174170
.lens(
175171
Ctx::make(
176172
AppState::common_ctx,
@@ -187,7 +183,7 @@ pub fn jump_back_in() -> impl Widget<AppState> {
187183
}
188184

189185
pubfnshows_that_you_might_like() ->implWidget<AppState>{
190-
Async::new(spinner_widget, loaded_results_widget, ||{Empty})
186+
Async::new(spinner_widget, loaded_results_widget, ||Empty)
191187
.lens(
192188
Ctx::make(
193189
AppState::common_ctx,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp