Re: [gdm-list] GTK theme for thegreeter screen?



Sebastien:

Thanks for doing this.  I used the 2nd version of the patch which
makes it display below by default and above if no room below.  I
think that is better, so it works more like menus, etc.

Brian


Le mardi 21 février 2006 à 14:21 -0800, Brian Cameron a écrit :

Also, you suggested you were going to improve the Options menu so the
menu pops below the button if there is enough room.

That change makes it open below the button if there is no place up to
it:

--- greeter_canvas_item.c.orig  2006-03-06 01:32:03.000000000 +0100
+++ greeter_canvas_item.c       2006-03-06 01:32:26.000000000 +0100
@@ -206,7 +206,12 @@
        rect = item->allocation;
        gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
        *x = rect.x;
-       *y = rect.y - requisition.height;
+
+       if (requisition.height >= gdk_screen_height () - rect.y)
+         *y = rect.y - requisition.height;
+       else
+         *y = rect.y + rect.height;
+
        *push_in = TRUE;
  }


That variant opens up to the buttom by default:

--- greeter_canvas_item.c.orig  2006-03-06 01:32:03.000000000 +0100
+++ greeter_canvas_item.c       2006-03-06 01:35:52.000000000 +0100
@@ -206,7 +206,12 @@
        rect = item->allocation;
        gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
        *x = rect.x;
-       *y = rect.y - requisition.height;
+
+       if (requisition.height <= rect.y)
+         *y = rect.y - requisition.height;
+       else
+         *y = rect.y + rect.height;
+
        *push_in = TRUE;
  }


Cheers,

Sebastien Bacher


_______________________________________________
gdm-list mailing list
gdm-list gnome org
http://mail.gnome.org/mailman/listinfo/gdm-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]