]> Dogcows Code - chaz/openbox/commitdiff
position the buttons in the bottom right instead of centering them
authorDana Jansens <danakj@orodu.net>
Thu, 7 Feb 2008 04:47:38 +0000 (23:47 -0500)
committerDana Jansens <danakj@orodu.net>
Thu, 14 Feb 2008 19:24:07 +0000 (14:24 -0500)
openbox/prompt.c

index 73f0ba3385543be7631638e3f99d57f47024f65e..e63911ba7b0be30c9c823c4ac492583c50d3cd45 100644 (file)
@@ -263,13 +263,13 @@ static void prompt_layout(ObPrompt *self)
     self->msg.x = l + (w - self->msg.width) / 2;
     self->msg.y = t;
 
-    /* position the button buttons */
-    buttonx = l + (w - allbuttonsw) / 2;
-    for (i = 0; i < self->n_buttons; ++i) {
-        self->button[i].x = buttonx;
-        buttonx += self->button[i].width + BUTTON_SEPARATION;
-        self->button[i].y = t + h - allbuttonsh;
-        self->button[i].y += (allbuttonsh - self->button[i].height) / 2;
+    /* position the button buttons on the right of the dialog */
+    buttonx = l + w;
+    for (i = self->n_buttons; i > 0; --i) {
+        self->button[i-1].x = buttonx - self->button[i-1].width;
+        buttonx -= self->button[i-1].width + BUTTON_SEPARATION;
+        self->button[i-1].y = t + h - allbuttonsh;
+        self->button[i-1].y += (allbuttonsh - self->button[i-1].height) / 2;
     }
 
     /* size and position the toplevel window */
This page took 0.028691 seconds and 4 git commands to generate.