summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorportix <none@none>2012-07-13 23:21:45 +0200
committerportix <none@none>2012-07-13 23:21:45 +0200
commitb786cca91f3d4a481cd49ae23dd27d28d570e472 (patch)
tree0befb21508d7ba24424d425626aa8cc60720485a /src
parentdefaa98ef4f55edf278eb91de72305e3f4fe7de6 (diff)
downloaddwb-b786cca91f3d4a481cd49ae23dd27d28d570e472.zip
New setting statusbar-padding
Diffstat (limited to 'src')
-rw-r--r--src/config.h2
-rw-r--r--src/dwb.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/config.h b/src/config.h
index a18a6785..7dc3b61f 100644
--- a/src/config.h
+++ b/src/config.h
@@ -1136,4 +1136,6 @@ static WebSettings DWB_SETTINGS[] = {
SETTING_GLOBAL | SETTING_ONINIT, CHAR, { .p = "left" }, (S_Func)dwb_set_close_tab_position_policy, { 0 }, },
{ { "close-last-tab", "Whether close_tab closes the last tab", },
SETTING_GLOBAL, BOOLEAN, { .b = false }, NULL, { 0 }, },
+ { { "statusbar-padding", "Padding of the statusbar", },
+ SETTING_GLOBAL, INTEGER, { .i = 0 }, NULL, { 0 }, },
};/*}}}*/
diff --git a/src/dwb.c b/src/dwb.c
index 2014ed24..f2d4ff47 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -3547,11 +3547,16 @@ dwb_init_gui() {
#else
status_hbox = gtk_hbox_new(false, 2);
#endif
+ GtkWidget *alignment = gtk_alignment_new(0.5, 0.5, 1, 1);
+ int padding = GET_INT("statusbar-padding");
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), padding, padding, padding, padding);
+ gtk_container_add(GTK_CONTAINER(alignment), status_hbox);
+
gtk_box_pack_start(GTK_BOX(status_hbox), dwb.gui.lstatus, false, false, 0);
gtk_box_pack_start(GTK_BOX(status_hbox), dwb.gui.entry, true, true, 0);
gtk_box_pack_start(GTK_BOX(status_hbox), dwb.gui.urilabel, true, true, 0);
gtk_box_pack_start(GTK_BOX(status_hbox), dwb.gui.rstatus, false, false, 0);
- gtk_container_add(GTK_CONTAINER(dwb.gui.statusbox), status_hbox);
+ gtk_container_add(GTK_CONTAINER(dwb.gui.statusbox), alignment);
gtk_container_add(GTK_CONTAINER(dwb.gui.window), dwb.gui.vbox);