fix(gui): keep the viewer Paste row a single line, not a full-height block

The Paste button + code field were wrapped in `with_layout(right_to_left)`,
which grabs the parent's entire remaining height and vertically centers the
row in it — gutting the View screen (field dropped to the middle, button
pinned far right). Use a plain `ui.horizontal` row with the button first and
the field filling the rest via INFINITY width. Same one-click-paste behavior,
correct single-row layout.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 03:43:16 -04:00
parent d23848decc
commit ccb183219f
+5 -4
View File
@@ -595,11 +595,12 @@ impl PixelPassApp {
ui.label("Paste the share code you received:");
ui.add_space(4.0);
// Field fills the row, with a Paste button pinned to its rightthe
// read-side mirror of the host's Copy button (one click grabs the code
// the host just put on the clipboard).
// A Paste button (read-side mirror of the host's Copy buttonone
// click grabs the code the host just put on the clipboard) with the
// field filling the rest of the row. A single horizontal row, so it
// doesn't grab the panel's full height.
let ticket_resp = ui
.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
.horizontal(|ui| {
if ui.button("📋 Paste").clicked()
&& let Some(text) = get_clipboard()
{