From 9909c7b9e7f3a88ed2aad64719f80e5929d8debf Mon Sep 17 00:00:00 2001 From: mtkennerly Date: Mon, 18 Dec 2023 00:55:07 +0800 Subject: [PATCH] #295: Change icon for hiding the backup comment field --- CHANGELOG.md | 2 ++ src/gui/button.rs | 4 ++-- src/gui/game_list.rs | 2 +- src/gui/icon.rs | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1771e9d9..f0d2df38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/src/gui/button.rs b/src/gui/button.rs index be5f3461..f01f1088 100644 --- a/src/gui/button.rs +++ b/src/gui/button.rs @@ -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> { diff --git a/src/gui/game_list.rs b/src/gui/game_list.rs index 7c78ca22..3aeb104b 100644 --- a/src/gui/game_list.rs +++ b/src/gui/game_list.rs @@ -352,7 +352,7 @@ impl GameListEntry { } }), ) - .push(button::close(Message::GameAction { + .push(button::hide(Message::GameAction { action: GameAction::Comment, game: name_for_comment2, })), diff --git a/src/gui/icon.rs b/src/gui/icon.rs index 9073b4e0..0956ce9c 100644 --- a/src/gui/icon.rs +++ b/src/gui/icon.rs @@ -12,7 +12,6 @@ pub enum Icon { ArrowDownward, ArrowForward, ArrowUpward, - Close, Comment, Delete, Download, @@ -36,6 +35,7 @@ pub enum Icon { Settings, SubdirectoryArrowRight, Upload, + VisibilityOff, } impl Icon { @@ -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}', @@ -71,6 +70,7 @@ impl Icon { Self::Settings => '\u{E8B8}', Self::SubdirectoryArrowRight => '\u{E5DA}', Self::Upload => '\u{f09b}', + Self::VisibilityOff => '\u{e8f5}', } }