Skip to content

Commit

Permalink
#295: Change icon for hiding the backup comment field
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Dec 17, 2023
1 parent dba9df0 commit 9909c7b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
([Contributed by sluedecke](https://github.com/mtkennerly/ludusavi/pull/235))
* When a path or URL fails to open, additional information is now logged.
* Changed:
* GUI: A different icon is now used for the button to hide the backup comment field.
The previous icon (a red X) could have been misinterpreted as "delete" rather than "close".
* CLI: Help text is now styled a bit differently.
* Fixed:
* GUI: On some systems using Wayland, Ludusavi would crash on startup.
Expand Down
4 changes: 2 additions & 2 deletions src/gui/button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ pub fn delete<'a>(action: fn(EditAction) -> Message, index: usize) -> Element<'a
)
}

pub fn close<'a>(action: Message) -> Element<'a> {
template(Icon::Close.text_small(), Some(action), Some(style::Button::Negative))
pub fn hide<'a>(action: Message) -> Element<'a> {
template(Icon::VisibilityOff.text_small(), Some(action), None)
}

pub fn choose_folder<'a>(subject: BrowseSubject, modifiers: &keyboard::Modifiers) -> Element<'a> {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/game_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ impl GameListEntry {
}
}),
)
.push(button::close(Message::GameAction {
.push(button::hide(Message::GameAction {
action: GameAction::Comment,
game: name_for_comment2,
})),
Expand Down
4 changes: 2 additions & 2 deletions src/gui/icon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ pub enum Icon {
ArrowDownward,
ArrowForward,
ArrowUpward,
Close,
Comment,
Delete,
Download,
Expand All @@ -36,6 +35,7 @@ pub enum Icon {
Settings,
SubdirectoryArrowRight,
Upload,
VisibilityOff,
}

impl Icon {
Expand All @@ -47,7 +47,6 @@ impl Icon {
Self::ArrowDownward => '\u{E5DB}',
Self::ArrowForward => '\u{e5c8}',
Self::ArrowUpward => '\u{E5D8}',
Self::Close => '\u{E5CD}',
Self::Comment => '\u{E0B9}',
Self::Delete => '\u{E872}',
Self::Download => '\u{f090}',
Expand All @@ -71,6 +70,7 @@ impl Icon {
Self::Settings => '\u{E8B8}',
Self::SubdirectoryArrowRight => '\u{E5DA}',
Self::Upload => '\u{f09b}',
Self::VisibilityOff => '\u{e8f5}',
}
}

Expand Down

0 comments on commit 9909c7b

Please sign in to comment.