From 451ba42638b4fb79bccecae2822f41c047e67a22 Mon Sep 17 00:00:00 2001 From: Hari Rana Date: Wed, 1 May 2024 23:40:16 -0400 Subject: [PATCH] user-page: Port ID elements to GtkCenterBox This ports the user ID label and copy user ID button from GtkBox to GtkCenterBox. While the GtkBox approach worked, it required us to use magic numbers (in this case `46`) to center the label. GtkCenterBox addresses that with a proper mechanism to center the label, and place the copy user ID button to the end of the widget, with a margin-start of 6. Visually, both implementations should look nearly identical. --- src/components/user_page.ui | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/user_page.ui b/src/components/user_page.ui index a6b6bfc5..c783241a 100644 --- a/src/components/user_page.ui +++ b/src/components/user_page.ui @@ -46,13 +46,11 @@ - - 12 - center - + + - 46 end + center UserPage @@ -63,11 +61,14 @@ - + copy-symbolic Copy Matrix User ID to Clipboard center + True + start + 6