aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2025-04-08 18:42:50 +0200
committerRobert Tari <robert@tari.in>2025-04-08 18:42:50 +0200
commite0acacd0f3bbee7a510689e1023150c458532ee0 (patch)
tree8dd238f5bdd68bff8c0b1c6a00e8b6500e84a05e
parent81c3c04dec4d3ad94fc8f8e46af448aeb3699c75 (diff)
downloadarctica-greeter-e0acacd0f3bbee7a510689e1023150c458532ee0.tar.gz
arctica-greeter-e0acacd0f3bbee7a510689e1023150c458532ee0.tar.bz2
arctica-greeter-e0acacd0f3bbee7a510689e1023150c458532ee0.zip
Fix size and position of elements
-rw-r--r--src/greeter-list.vala3
-rw-r--r--src/list-stack.vala3
-rw-r--r--src/main-window.vala1
-rw-r--r--src/prompt-box.vala4
4 files changed, 6 insertions, 5 deletions
diff --git a/src/greeter-list.vala b/src/greeter-list.vala
index 04d4ed4..da4f3e9 100644
--- a/src/greeter-list.vala
+++ b/src/greeter-list.vala
@@ -283,7 +283,6 @@ public abstract class GreeterList : FadableBox
protected void redraw_greeter_box ()
{
- queue_allocate ();
Gtk.Allocation allocation;
greeter_box.get_allocation (out allocation);
queue_draw_area (allocation.x, allocation.y, allocation.width, allocation.height);
@@ -298,7 +297,6 @@ public abstract class GreeterList : FadableBox
}
selected_entry.add_message (text, is_error);
- redraw_greeter_box ();
}
public DashEntry add_prompt (string text, bool secret = false)
@@ -870,6 +868,7 @@ public abstract class GreeterList : FadableBox
/* Limit the number of characters in case a cat is sitting on the keyboard... */
entry.max_length = MAX_FIELD_SIZE;
+ queue_resize ();
}
protected virtual void authentication_complete_cb ()
diff --git a/src/list-stack.vala b/src/list-stack.vala
index d87b37a..4f74ea7 100644
--- a/src/list-stack.vala
+++ b/src/list-stack.vala
@@ -1,7 +1,7 @@
/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*-
*
* Copyright (C) 2011,2012 Canonical Ltd
- * Copyright (C) 2023 Robert Tari
+ * Copyright (C) 2023-2025 Robert Tari
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
@@ -35,6 +35,7 @@ public class ListStack : Gtk.Fixed
construct
{
+ resize_mode = Gtk.ResizeMode.QUEUE;
var greeter = new ArcticaGreeter();
width = greeter.grid_size * GreeterList.BOX_WIDTH;
diff --git a/src/main-window.vala b/src/main-window.vala
index fc8d95a..c32c82a 100644
--- a/src/main-window.vala
+++ b/src/main-window.vala
@@ -145,6 +145,7 @@ public class MainWindow : Gtk.Window
align.add (hbox);
align = new Gtk.Alignment (0.5f, 0.5f, 0.0f, 0.0f);
+ align.resize_mode = Gtk.ResizeMode.QUEUE;
align.set_size_request (greeter.grid_size, -1);
align.margin_bottom = greeter.menubar_height; /* offset for menubar at top */
align.show ();
diff --git a/src/prompt-box.vala b/src/prompt-box.vala
index 1254d14..e29d6ef 100644
--- a/src/prompt-box.vala
+++ b/src/prompt-box.vala
@@ -2,7 +2,7 @@
*
* Copyright (C) 2011,2012 Canonical Ltd
* Copyright (C) 2015,2017 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
- * Copyright (C) 2023 Robert Tari
+ * Copyright (C) 2023-2025 Robert Tari
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
@@ -96,6 +96,7 @@ public class PromptBox : FadableBox
construct
{
+ resize_mode = Gtk.ResizeMode.QUEUE;
var greeter = new ArcticaGreeter();
set_start_row ();
@@ -569,7 +570,6 @@ public class PromptBox : FadableBox
public void add_message (string text, bool is_error)
{
var label = new FadingLabel (text);
- label.set_line_wrap (true);
var style_ctx = label.get_style_context();