Merge remote-tracking branch 'github/pr/928'

This commit is contained in:
William Casarin
2025-07-10 09:09:49 -07:00
6 changed files with 91 additions and 39 deletions

View File

@@ -113,10 +113,14 @@ pub fn help_light_image() -> Image<'static> {
))
}
pub fn home_button_image() -> Image<'static> {
pub fn home_dark_image() -> Image<'static> {
Image::new(include_image!("../../../assets/icons/home-toolbar.png"))
}
pub fn home_light_image() -> Image<'static> {
home_dark_image().tint(egui::Color32::BLACK)
}
pub fn home_image() -> Image<'static> {
Image::new(include_image!(
"../../../assets/icons/home_icon_dark_4x.png"
@@ -141,16 +145,22 @@ pub fn new_deck_image() -> Image<'static> {
))
}
pub fn notifications_button_image() -> Image<'static> {
pub fn notifications_image(dark_mode: bool) -> Image<'static> {
if dark_mode {
crate::app_images::notifications_dark_image()
} else {
crate::app_images::notifications_light_image()
}
}
pub fn notifications_dark_image() -> Image<'static> {
Image::new(include_image!(
"../../../assets/icons/notifications_dark_4x.png"
))
}
pub fn notifications_image() -> Image<'static> {
Image::new(include_image!(
"../../../assets/icons/notifications_icon_dark_4x.png"
))
pub fn notifications_light_image() -> Image<'static> {
notifications_dark_image().tint(egui::Color32::BLACK)
}
pub fn repost_dark_image() -> Image<'static> {
Image::new(include_image!("../../../assets/icons/repost_icon_4x.png"))

View File

@@ -15,6 +15,7 @@ pub use contents::{render_note_contents, render_note_preview, NoteContents};
pub use context::NoteContextButton;
use notedeck::note::MediaAction;
use notedeck::note::ZapTargetAmount;
use notedeck::ui::is_narrow;
use notedeck::Images;
pub use options::NoteOptions;
pub use reply_description::reply_desc;
@@ -257,6 +258,10 @@ impl<'a, 'd> NoteView<'a, 'd> {
ui.spacing_mut().item_spacing.x = 4.0;
}
if is_narrow(ui.ctx()) {
ui.spacing_mut().item_spacing.x = 1.0
}
let pfp_size = self.options().pfp_size();
match profile
@@ -367,7 +372,7 @@ impl<'a, 'd> NoteView<'a, 'd> {
let horiz_resp = ui
.horizontal(|ui| {
ui.spacing_mut().item_spacing.x = 2.0;
ui.spacing_mut().item_spacing.x = if is_narrow(ui.ctx()) { 1.0 } else { 2.0 };
ui.add(Username::new(profile.as_ref().ok(), note.pubkey()).abbreviated(20));
let cached_note = note_cache.cached_note_or_insert_mut(note_key, note);
@@ -511,7 +516,7 @@ impl<'a, 'd> NoteView<'a, 'd> {
self.show_unread_indicator,
);
ui.horizontal(|ui| 's: {
ui.spacing_mut().item_spacing.x = 2.0;
ui.spacing_mut().item_spacing.x = if is_narrow(ui.ctx()) { 1.0 } else { 2.0 };
let note_reply = self
.note_context