Skip to content

Commit

Permalink
accounts: remove pink selected frame
Browse files Browse the repository at this point in the history
Opinionated design call I am making

Fixes: 36b8afd1750d ("Update account management UI to design")
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Nov 29, 2024
1 parent 0ac131e commit 37ab6f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions src/ui/accounts.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
use crate::colors::{self, PINK};
use crate::colors::PINK;
use crate::imgcache::ImageCache;
use crate::{
accounts::Accounts,
route::{Route, Router},
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;
Expand Down Expand Up @@ -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)
Expand All @@ -170,7 +168,7 @@ fn show_profile_card(
})
.response
});
ui.add_space(16.0);
ui.add_space(8.0);
op
}

Expand Down
2 changes: 1 addition & 1 deletion src/ui/profile/preview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
Expand Down

0 comments on commit 37ab6f3

Please sign in to comment.