summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/html.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/html.c b/src/html.c
index 853c2e5..afcae07 100644
--- a/src/html.c
+++ b/src/html.c
@@ -98,6 +98,10 @@ static const gchar *styles =
"-wekbit-transition: all 250ms ease-in-out 0s;\n"
"-o-transition: all 250ms ease-in-out 0s;\n"
"}\n"
+ "div.dialog-buttonbox {\n"
+ "margin: 0;\n"
+ "float: right;\n"
+ "}\n"
"form input[type=submit], form input[type=reset] {\n"
"background-color: #DFDFDF;\n"
"}\n"
@@ -361,9 +365,11 @@ mq_html_form(const gchar *submit_label, const gchar *reset_label, ...)
len += strlen(child);
}
va_end(ap);
- len += strlen("<input type=\"reset\" value=\"") + strlen(reset_label) +
+ len += strlen("<div class=\"dialog-buttonbox\">\n") +
+ strlen("<input type=\"reset\" value=\"") + strlen(reset_label) +
strlen("\">\n<input type=\"submit\" value=\"") +
- strlen(submit_label) + strlen("\">\n</form>\n");
+ strlen(submit_label) + strlen("\">\n</div>\n") +
+ strlen("</form>\n");
++len; /* NUL byte */
/* Build string. */
@@ -375,11 +381,13 @@ mq_html_form(const gchar *submit_label, const gchar *reset_label, ...)
g_free(child);
}
va_end(ap);
+ ptr = g_stpcpy(ptr, "<div class=\"dialog-buttonbox\">\n");
ptr = g_stpcpy(ptr, "<input type=\"reset\" value=\"");
ptr = g_stpcpy(ptr, reset_label);
ptr = g_stpcpy(ptr, "\">\n<input type=\"submit\" value=\"");
ptr = g_stpcpy(ptr, submit_label);
- ptr = g_stpcpy(ptr, "\">\n</form>\n"); /* g_stpcpy() adds the NUL. */
+ ptr = g_stpcpy(ptr, "\">\n</div>\n");
+ ptr = g_stpcpy(ptr, "</form>\n"); /* g_stpcpy() adds the NUL. */
return form;
}