all repos — openbox @ ea28a9e7ab6c81547b2730268097c4ad7d814a80

openbox fork - make it a bit more like ryudo

position the buttons in the bottom right instead of centering them
Dana Jansens danakj@orodu.net
commit

ea28a9e7ab6c81547b2730268097c4ad7d814a80

parent

deca45dadad1e0e1d5183341a601267f2deb1aa5

1 files changed, 7 insertions(+), 7 deletions(-)

jump to
M openbox/prompt.copenbox/prompt.c

@@ -263,13 +263,13 @@ /* position the text message */

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 */