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:
+5
-4
@@ -595,11 +595,12 @@ impl PixelPassApp {
|
|||||||
|
|
||||||
ui.label("Paste the share code you received:");
|
ui.label("Paste the share code you received:");
|
||||||
ui.add_space(4.0);
|
ui.add_space(4.0);
|
||||||
// Field fills the row, with a Paste button pinned to its right — the
|
// A Paste button (read-side mirror of the host's Copy button — one
|
||||||
// read-side mirror of the host's Copy button (one click grabs the code
|
// click grabs the code the host just put on the clipboard) with the
|
||||||
// the host just put on the clipboard).
|
// 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
|
let ticket_resp = ui
|
||||||
.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
|
.horizontal(|ui| {
|
||||||
if ui.button("📋 Paste").clicked()
|
if ui.button("📋 Paste").clicked()
|
||||||
&& let Some(text) = get_clipboard()
|
&& let Some(text) = get_clipboard()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user