Skip to content

Commit

Permalink
style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Deezzir committed Feb 8, 2023
1 parent ee3bc22 commit 00aa9b0
Showing 1 changed file with 17 additions and 33 deletions.
50 changes: 17 additions & 33 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,25 +116,17 @@ fn main() {
}
ui.hl();
for todo in app.get_todos() {
if app.is_cur_todo(todo) {
if app.is_in_todo_panel() {
if mode == Mode::Edit {
ui.edit_label(
todo.get_text(),
editing_cursor,
"- [ ] ".to_string(),
);
} else {
ui.label_styled(
&format!("- [ ] {}", todo.get_text()),
SELECTED_PAIR,
None,
);
}
if app.is_cur_todo(todo) && app.is_in_todo_panel() {
if mode == Mode::Edit {
ui.edit_label(
todo.get_text(),
editing_cursor,
"- [ ] ".to_string(),
);
} else {
ui.label_styled(
&format!("- [ ] {}", todo.get_text()),
UNSELECTED_PAIR,
SELECTED_PAIR,
None,
);
}
Expand All @@ -154,25 +146,17 @@ fn main() {
}
ui.hl();
for done in app.get_dones() {
if app.is_cur_done(done) {
if app.is_in_done_panel() {
if mode == Mode::Edit {
ui.edit_label(
done.get_text(),
editing_cursor,
"- [X] ".to_string(),
);
} else {
ui.label_styled(
&format!("- [X] ({}) {}", done.get_date(), done.get_text()),
SELECTED_PAIR,
None,
);
}
if app.is_cur_done(done) && app.is_in_done_panel() {
if mode == Mode::Edit {
ui.edit_label(
done.get_text(),
editing_cursor,
"- [X] ".to_string(),
);
} else {
ui.label_styled(
&format!("- [X]|{}| {}", done.get_date(), done.get_text()),
UNSELECTED_PAIR,
&format!("- [X] ({}) {}", done.get_date(), done.get_text()),
SELECTED_PAIR,
None,
);
}
Expand Down

0 comments on commit 00aa9b0

Please sign in to comment.