Skip to content
This repository was archived by the owner on Apr 16, 2023. It is now read-only.

Commit 02dfa99

Browse files
committed
* Display differences
1 parent cb67e16 commit 02dfa99

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/view.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl Sandbox for ApplicationContext {
202202
.on_press(Message::ComparePressed)
203203
.style(self.theme);
204204

205-
let content = Column::new()
205+
let mut content = Column::new()
206206
.spacing(15)
207207
.padding(20)
208208
.max_width(800)
@@ -230,6 +230,17 @@ impl Sandbox for ApplicationContext {
230230
),
231231
);
232232

233+
if !self.differences.is_empty() {
234+
let choose_theme = self.differences.iter().fold(
235+
Column::new().spacing(10).push(Text::new("Differences:")),
236+
|column, theme| {
237+
column.push(Text::new(format!("{}", theme)))
238+
},
239+
);
240+
241+
content = content.push(choose_theme);
242+
}
243+
233244
Container::new(content)
234245
.width(Length::Fill)
235246
.height(Length::Fill)

0 commit comments

Comments
 (0)