commit 37ab6f33fb0070bb5f1534790aa5bb4e169d4f30
parent 0ac131ef06ce4d06113d81868deb24af8aa7614d
Author: William Casarin <jb55@jb55.com>
Date: Fri, 29 Nov 2024 10:09:50 -0800
accounts: remove pink selected frame
Opinionated design call I am making
Fixes: 36b8afd1750d ("Update account management UI to design")
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/ui/accounts.rs b/src/ui/accounts.rs
@@ -1,4 +1,4 @@
-use crate::colors::{self, PINK};
+use crate::colors::PINK;
use crate::imgcache::ImageCache;
use crate::{
accounts::Accounts,
@@ -6,9 +6,7 @@ use crate::{
ui::{Preview, PreviewConfig, View},
Damus,
};
-use egui::{
- Align, Button, Frame, Image, InnerResponse, Layout, RichText, ScrollArea, Stroke, Ui, Vec2,
-};
+use egui::{Align, Button, Frame, Image, InnerResponse, Layout, RichText, ScrollArea, Ui, Vec2};
use nostrdb::{Ndb, Transaction};
use super::profile::preview::SimpleProfilePreview;
@@ -143,10 +141,10 @@ fn show_profile_card(
ui.add_sized(max_size, |ui: &mut egui::Ui| {
let mut frame = Frame::none();
if is_selected || card_resp.hovered() {
- frame = frame.fill(ui.visuals().noninteractive().weak_bg_fill)
+ frame = frame.fill(ui.visuals().noninteractive().weak_bg_fill);
}
if is_selected {
- frame = frame.stroke(Stroke::new(2.0, colors::PINK))
+ frame = frame.stroke(ui.visuals().noninteractive().fg_stroke);
}
frame
.rounding(8.0)
@@ -170,7 +168,7 @@ fn show_profile_card(
})
.response
});
- ui.add_space(16.0);
+ ui.add_space(8.0);
op
}
diff --git a/src/ui/profile/preview.rs b/src/ui/profile/preview.rs
@@ -120,7 +120,7 @@ impl egui::Widget for SimpleProfilePreview<'_, '_> {
if !self.is_nsec {
ui.add(
Label::new(
- RichText::new("View only mode")
+ RichText::new("Read only")
.size(get_font_size(ui.ctx(), &NotedeckTextStyle::Tiny))
.color(ui.visuals().warn_fg_color),
)