position the buttons in the bottom right instead of centering them

This commit is contained in:
Dana Jansens 2008-02-06 23:47:38 -05:00
parent 9a4ce94579
commit f4838c9a3d

View file

@ -261,13 +261,13 @@ static void prompt_layout(ObPrompt *self)
self->msg.x = l + (w - self->msg.width) / 2; self->msg.x = l + (w - self->msg.width) / 2;
self->msg.y = t; self->msg.y = t;
/* position the button buttons */ /* position the button buttons on the right of the dialog */
buttonx = l + (w - allbuttonsw) / 2; buttonx = l + w;
for (i = 0; i < self->n_buttons; ++i) { for (i = self->n_buttons; i > 0; --i) {
self->button[i].x = buttonx; self->button[i-1].x = buttonx - self->button[i-1].width;
buttonx += self->button[i].width + BUTTON_SEPARATION; buttonx -= self->button[i-1].width + BUTTON_SEPARATION;
self->button[i].y = t + h - allbuttonsh; self->button[i-1].y = t + h - allbuttonsh;
self->button[i].y += (allbuttonsh - self->button[i].height) / 2; self->button[i-1].y += (allbuttonsh - self->button[i-1].height) / 2;
} }
/* size and position the toplevel window */ /* size and position the toplevel window */