notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 45490c918db7efce4030744be62940796b3ba905
parent a31fdd3ed2f5284a8c02c3bcb601a9bfc2990638
Author: kernelkind <kernelkind@gmail.com>
Date:   Wed,  9 Jul 2025 20:25:25 -0400

add new Accounts button to chrome sidebar

Signed-off-by: kernelkind <kernelkind@gmail.com>

Diffstat:
Aassets/icons/accounts.png | 0
Mcrates/notedeck_chrome/src/chrome.rs | 14++++++++++++++
Mcrates/notedeck_ui/src/app_images.rs | 4++++
3 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/assets/icons/accounts.png b/assets/icons/accounts.png Binary files differ. diff --git a/crates/notedeck_chrome/src/chrome.rs b/crates/notedeck_chrome/src/chrome.rs @@ -563,6 +563,16 @@ fn columns_button(ui: &mut egui::Ui) -> egui::Response { ) } +fn accounts_button(ui: &mut egui::Ui) -> egui::Response { + expanding_button( + "accounts-button", + 24.0, + app_images::accounts_image().tint(ui.visuals().text_color()), + app_images::accounts_image(), + ui, + ) +} + fn dave_sidebar_rect(ui: &mut egui::Ui) -> Rect { let size = vec2(60.0, 60.0); let available = ui.available_rect_before_wrap(); @@ -712,6 +722,7 @@ fn bottomup_sidebar( ui.add_space(8.0); let pfp_resp = pfp_button(ctx, ui).on_hover_cursor(egui::CursorIcon::PointingHand); + let accounts_resp = accounts_button(ui).on_hover_cursor(egui::CursorIcon::PointingHand); let settings_resp = settings_button(ui).on_hover_cursor(egui::CursorIcon::PointingHand); let theme_action = match ui.ctx().theme() { @@ -774,8 +785,11 @@ fn bottomup_sidebar( } } + #[allow(clippy::if_same_then_else)] if pfp_resp.clicked() { Some(ChromePanelAction::Account) + } else if accounts_resp.clicked() { + Some(ChromePanelAction::Account) } else if settings_resp.clicked() { Some(ChromePanelAction::Settings) } else if theme_action.is_some() { diff --git a/crates/notedeck_ui/src/app_images.rs b/crates/notedeck_ui/src/app_images.rs @@ -11,6 +11,10 @@ pub fn add_account_image() -> Image<'static> { )) } +pub fn accounts_image() -> Image<'static> { + Image::new(include_image!("../../../assets/icons/accounts.png")) +} + pub fn add_column_dark_image() -> Image<'static> { Image::new(include_image!( "../../../assets/icons/add_column_dark_4x.png"