Skip to content

Commit

Permalink
Fix card overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Oct 18, 2024
1 parent c5f1d8a commit 5b982c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
7 changes: 0 additions & 7 deletions src/Cards/BaseCard.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
public abstract class Greeter.BaseCard : Gtk.Box {
public signal void do_connect (string? credential = null);

protected static Gtk.CssProvider css_provider;

public bool connecting { get; set; default = false; }
public bool need_password { get; set; default = false; }
public bool use_fingerprint { get; set; default = false; }
Expand All @@ -38,11 +36,6 @@ public abstract class Greeter.BaseCard : Gtk.Box {

protected Gtk.Revealer revealer;

static construct {
css_provider = new Gtk.CssProvider ();
css_provider.load_from_resource ("/io/elementary/greeter/Card.css");
}

construct {
revealer = new Gtk.Revealer () {
halign = CENTER,
Expand Down
12 changes: 4 additions & 8 deletions src/Cards/UserCard.vala
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public class Greeter.UserCard : Greeter.BaseCard {
);

main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) {
margin_bottom = 48
overflow = HIDDEN
};
main_box.append (username_label);
main_box.append (form_revealer);
Expand All @@ -154,12 +154,7 @@ public class Greeter.UserCard : Greeter.BaseCard {

update_collapsed_class ();

var avatar = new Adw.Avatar (64, lightdm_user.display_name, true) {
margin_top = 6,
margin_bottom = 6,
margin_start = 6,
margin_end = 6
};
var avatar = new Adw.Avatar (64, lightdm_user.display_name, true);

var user_icon_file = File.new_for_path (lightdm_user.image);
try {
Expand All @@ -172,7 +167,8 @@ public class Greeter.UserCard : Greeter.BaseCard {
halign = CENTER,
valign = START,
margin_top = 100,
child = avatar
child = avatar,
overflow = VISIBLE
};

logged_in = new SelectionCheck () {
Expand Down

0 comments on commit 5b982c6

Please sign in to comment.