fix a few compile issues after rebase

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-03-11 10:55:15 -07:00
parent 8467de2b5d
commit 2e991a9aa5
4 changed files with 19 additions and 16 deletions

View File

@@ -250,7 +250,7 @@ impl<'a, 'd> NoteView<'a, 'd> {
None => { None => {
// This has to match the expand size from the above case to // This has to match the expand size from the above case to
// prevent bounciness // prevent bounciness
let size = pfp_size + ui::NoteView::expand_size(); let size = (pfp_size + ui::NoteView::expand_size()) as f32;
let (rect, _response) = ui.allocate_exact_size(egui::vec2(size, size), sense); let (rect, _response) = ui.allocate_exact_size(egui::vec2(size, size), sense);
ui.put( ui.put(
@@ -355,7 +355,9 @@ impl<'a, 'd> NoteView<'a, 'd> {
let size = ui.available_size(); let size = ui.available_size();
ui.vertical(|ui| { ui.vertical(|ui| {
ui.add_sized([size.x, self.options().pfp_size() as f32], |ui: &mut egui::Ui| { ui.add_sized(
[size.x, self.options().pfp_size() as f32],
|ui: &mut egui::Ui| {
ui.horizontal_centered(|ui| { ui.horizontal_centered(|ui| {
NoteView::note_header( NoteView::note_header(
ui, ui,
@@ -365,7 +367,8 @@ impl<'a, 'd> NoteView<'a, 'd> {
); );
}) })
.response .response
}); },
);
let note_reply = self let note_reply = self
.note_context .note_context

View File

@@ -324,7 +324,7 @@ impl<'a, 'd> PostView<'a, 'd> {
if let PostType::Quote(id) = self.post_type { if let PostType::Quote(id) = self.post_type {
let avail_size = ui.available_size_before_wrap(); let avail_size = ui.available_size_before_wrap();
ui.with_layout(Layout::left_to_right(egui::Align::TOP), |ui| { ui.with_layout(Layout::left_to_right(egui::Align::TOP), |ui| {
context_selection = Frame::none() context_selection = Frame::NONE
.show(ui, |ui| { .show(ui, |ui| {
ui.vertical(|ui| { ui.vertical(|ui| {
ui.set_max_width(avail_size.x * 0.8); ui.set_max_width(avail_size.x * 0.8);

View File

@@ -61,7 +61,7 @@ impl<'a, 'd> PostReplyView<'a, 'd> {
let note_offset: i8 = let note_offset: i8 =
pfp_offset - ui::ProfilePic::medium_size() / 2 - ui::NoteView::expand_size() / 2; pfp_offset - ui::ProfilePic::medium_size() / 2 - ui::NoteView::expand_size() / 2;
let selection = egui::Frame::none() let selection = egui::Frame::NONE
.outer_margin(egui::Margin::same(note_offset)) .outer_margin(egui::Margin::same(note_offset))
.show(ui, |ui| { .show(ui, |ui| {
ui::NoteView::new(self.note_context, self.note, self.note_options) ui::NoteView::new(self.note_context, self.note, self.note_options)

View File

@@ -136,9 +136,9 @@ fn search_box(query: &mut SearchQueryState, ui: &mut egui::Ui) -> bool {
ui.horizontal(|ui| { ui.horizontal(|ui| {
// Container for search input and icon // Container for search input and icon
let search_container = egui::Frame { let search_container = egui::Frame {
inner_margin: egui::Margin::symmetric(8.0, 0.0), inner_margin: egui::Margin::symmetric(8, 0),
outer_margin: egui::Margin::ZERO, outer_margin: egui::Margin::ZERO,
rounding: Rounding::same(18.0), // More rounded corners rounding: Rounding::same(18), // More rounded corners
shadow: Default::default(), shadow: Default::default(),
fill: Color32::from_rgb(30, 30, 30), // Darker background to match screenshot fill: Color32::from_rgb(30, 30, 30), // Darker background to match screenshot
stroke: Stroke::new(1.0, Color32::from_rgb(60, 60, 60)), stroke: Stroke::new(1.0, Color32::from_rgb(60, 60, 60)),