From e7f0bd41f76c6a6ab2c23b63f38d939bd7cc4e85 Mon Sep 17 00:00:00 2001
From: Ayush Singh <ayush@beagleboard.org>
Date: Sat, 1 Feb 2025 15:29:21 +0530
Subject: [PATCH] bb-imager-gui: Add arrow for subitems

- Allows a good UI queue for items that will open a new menu instead of
  being selected.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
---
 bb-imager-gui/assets/icons/arrow-forward-ios.svg | 3 +++
 bb-imager-gui/src/constants.rs                   | 1 +
 bb-imager-gui/src/pages/image_selection.rs       | 8 +++++++-
 3 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 bb-imager-gui/assets/icons/arrow-forward-ios.svg

diff --git a/bb-imager-gui/assets/icons/arrow-forward-ios.svg b/bb-imager-gui/assets/icons/arrow-forward-ios.svg
new file mode 100644
index 0000000..9449d9d
--- /dev/null
+++ b/bb-imager-gui/assets/icons/arrow-forward-ios.svg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6d1cd54388c975d0b2371f30269408367b984dddc69eae5e6d5a5215c53eed82
+size 198
diff --git a/bb-imager-gui/src/constants.rs b/bb-imager-gui/src/constants.rs
index 6fe8117..65db60d 100644
--- a/bb-imager-gui/src/constants.rs
+++ b/bb-imager-gui/src/constants.rs
@@ -16,6 +16,7 @@ pub const USB_ICON: &[u8] = include_bytes!("../assets/icons/usb.svg");
 pub const FORMAT_ICON: &[u8] = include_bytes!("../assets/icons/format.svg");
 pub const SETTINGS_ICON: &[u8] = include_bytes!("../assets/icons/settings.svg");
 pub const BOARD_ICON: &[u8] = include_bytes!("../assets/icons/board.svg");
+pub const ARROW_FORWARD_IOS_ICON: &[u8] = include_bytes!("../assets/icons/arrow-forward-ios.svg");
 
 // Font
 pub const FONT_REGULAR: iced::Font = iced::Font::with_name("Roboto");
diff --git a/bb-imager-gui/src/pages/image_selection.rs b/bb-imager-gui/src/pages/image_selection.rs
index 8d595bb..25c7fab 100644
--- a/bb-imager-gui/src/pages/image_selection.rs
+++ b/bb-imager-gui/src/pages/image_selection.rs
@@ -154,11 +154,17 @@ impl ImageSelectionPage {
                     .width(ICON_WIDTH)
                     .into(),
                 };
+                let tail = widget::svg(widget::svg::Handle::from_memory(
+                    constants::ARROW_FORWARD_IOS_ICON,
+                ))
+                .width(20);
                 button(
                     widget::row![
                         icon,
                         widget::column![text(name.as_str()).size(18), text(description.as_str())]
-                            .padding(5)
+                            .padding(5),
+                        widget::horizontal_space(),
+                        tail
                     ]
                     .align_y(iced::Alignment::Center)
                     .spacing(10),
-- 
GitLab