diff options
-rw-r--r-- | doc/dwb.1 | 8 | ||||
-rw-r--r-- | doc/dwb.1.txt | 4 | ||||
-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 | ||||
-rw-r--r-- | util/settings.pre | 2 |
8 files changed, 27 insertions, 15 deletions
@@ -2,12 +2,12 @@ .\" Title: dwb .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/> -.\" Date: 07/13/2012 +.\" Date: 07/20/2012 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "DWB" "1" "07/13/2012" "\ \&" "\ \&" +.TH "DWB" "1" "07/20/2012" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -3470,9 +3470,9 @@ The default startpage\&. Possible values: an url or "about:blank" for an empty s \fIabout:blank\fR\&. .RE .PP -\fBstatusbar\-padding\fR +\fBbars\-padding\fR .RS 4 -Padding of the statusbar, default value: 0\&. +Padding of the status, download, completion and tab bars, default value: 0\&. .RE .PP \fBsync\-files\fR diff --git a/doc/dwb.1.txt b/doc/dwb.1.txt index f6f86857..f461422f 100644 --- a/doc/dwb.1.txt +++ b/doc/dwb.1.txt @@ -1466,8 +1466,8 @@ certificate. default value: '#ff0000'. The default startpage. Possible values: an url or "about:blank" for an empty startpage, default value: 'about:blank'. -*statusbar-padding*:: -Padding of the statusbar, default value: 0. +*bars-padding*:: +Padding of the status, download, completion and tab bars, default value: 0. *sync-files*:: Interval in seconds to save history and cookies to hdd or 0 to immediately save 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); diff --git a/util/settings.pre b/util/settings.pre index a91bd915..2f5ad149 100644 --- a/util/settings.pre +++ b/util/settings.pre @@ -82,7 +82,7 @@ factor text Zoom factor of the tiling area message-delay text Time messages are shown, in seconds new-tab-position-policy select @right @left @rightmost @leftmost Controls the position of newly created tabs scrollbars checkbox Whether scrollbars should be enabled -statusbar-padding text Padding of the statusbar +bars-padding text Padding of the status, download, completion and tab bars tabbar-visible text Number of seconds a hidden tabbar is visible when switching between tabs tabbed-browsing checkbox Whether to enable tabbed browsing user-stylesheet-uri text The uri of a stylesheet applied to every page |