diff options
author | portix <none@none> | 2012-07-25 21:09:09 +0200 |
---|---|---|
committer | portix <none@none> | 2012-07-25 21:09:09 +0200 |
commit | 728a5b9b7e8591741b786f8a682b237e0b403482 (patch) | |
tree | 72979bd3815ba101e94e8320d8a93b8a2340aabd /src | |
parent | 494cebc041f9e78ed45cea34cb0605d7d3a9090e (diff) | |
download | dwb-728a5b9b7e8591741b786f8a682b237e0b403482.zip |
Replace statusbar-padding with bars-padding
Diffstat (limited to 'src')
-rw-r--r-- | src/completion.c | 7 | ||||
-rw-r--r-- | src/config.h | 2 | ||||
-rw-r--r-- | src/download.c | 8 | ||||
-rw-r--r-- | src/dwb.c | 2 | ||||
-rw-r--r-- | src/view.c | 9 |
5 files changed, 20 insertions, 8 deletions
diff --git a/src/completion.c b/src/completion.c index 796444df..2218e804 100644 --- a/src/completion.c +++ b/src/completion.c @@ -81,7 +81,12 @@ completion_get_completion_item(const char *left, const char *right, const char completion_modify_completion_item(c, &dwb.color.normal_c_fg, &dwb.color.normal_c_bg, dwb.font.fd_inactive); - gtk_container_add(GTK_CONTAINER(c->event), hbox); + GtkWidget *alignment = gtk_alignment_new(0.5, 0.5, 1, 1); + int padding = GET_INT("bars-padding"); + gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), padding, padding, padding, padding); + gtk_container_add(GTK_CONTAINER(alignment), hbox); + gtk_container_add(GTK_CONTAINER(c->event), alignment); + return c; }/*}}}*/ diff --git a/src/config.h b/src/config.h index 7dc3b61f..1065f71e 100644 --- a/src/config.h +++ b/src/config.h @@ -1136,6 +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", }, + { { "bars-padding", "Padding of the status, download, completion and tab bars", }, SETTING_GLOBAL, INTEGER, { .i = 0 }, NULL, { 0 }, }, };/*}}}*/ diff --git a/src/download.c b/src/download.c index 9f748489..069a1188 100644 --- a/src/download.c +++ b/src/download.c @@ -354,7 +354,13 @@ download_add_progress_label(GList *gl, const char *filename, gint length) { gtk_box_pack_start(GTK_BOX(hbox), l->llabel, false, false, 1); gtk_box_pack_start(GTK_BOX(hbox), l->rlabel, false, false, 1); - gtk_container_add(GTK_CONTAINER(l->event), hbox); + + GtkWidget *alignment = gtk_alignment_new(0.5, 0.5, 1, 1); + int padding = GET_INT("bars-padding"); + gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), padding, padding, padding, padding); + gtk_container_add(GTK_CONTAINER(alignment), hbox); + gtk_container_add(GTK_CONTAINER(l->event), alignment); + gtk_box_pack_start(GTK_BOX(dwb.gui.downloadbar), l->event, false, false, 2); gtk_label_set_use_markup(GTK_LABEL(l->llabel), true); @@ -3579,7 +3579,7 @@ dwb_init_gui() { dwb.gui.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"); + int padding = GET_INT("bars-padding"); gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), padding, padding, padding, padding); gtk_container_add(GTK_CONTAINER(alignment), dwb.gui.status_hbox); @@ -927,10 +927,11 @@ view_create_web_view() { v->tabicon = gtk_image_new_from_pixbuf(pb); gtk_box_pack_end(GTK_BOX(v->tabbox), v->tabicon, false, false, 0); - gtk_container_add(GTK_CONTAINER(v->tabevent), v->tabbox); - - - /* gtk_container_add(GTK_CONTAINER(v->tabevent), v->tablabel); */ + GtkWidget *alignment = gtk_alignment_new(0.5, 0.5, 1, 1); + int padding = GET_INT("bars-padding"); + gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), padding, padding, padding, padding); + gtk_container_add(GTK_CONTAINER(alignment), v->tabbox); + gtk_container_add(GTK_CONTAINER(v->tabevent), alignment); DWB_WIDGET_OVERRIDE_FONT(v->tablabel, dwb.font.fd_inactive); |