diff --git a/defaults/defaults.in b/defaults/defaults.in index f8c73573b64b817726e4d5ef03ff39ecfb84f537..eaf12a26ec241d2b95f5e4c648001da5fedf9b9b 100644 --- a/defaults/defaults.in +++ b/defaults/defaults.in @@ -6,6 +6,7 @@ button_layout=OTS|HMC button_spacing=1 button_offset=0 title_vertical_offset=0 +title_horizontal_offset=0 double_click_action=maximize box_move=false box_resize=false diff --git a/src/frame.c b/src/frame.c index cd9f2e846971429d27c46e8beb5b7ac7e934d450..6548087311fb3fe3b9c2b61286f1a3fa1389bd27 100644 --- a/src/frame.c +++ b/src/frame.c @@ -212,8 +212,11 @@ static void frameCreateTitlePixmap(Client * c, int state, int left, int right, M } switch (title_alignment) { + case ALIGN_LEFT: + tp = title_horizontal_offset; + break; case ALIGN_RIGHT: - tp = w3 - logical_rect.width; + tp = w3 - logical_rect.width - title_horizontal_offset; break; case ALIGN_CENTER: tp = (w3 / 2) - (logical_rect.width / 2); @@ -239,10 +242,10 @@ static void frameCreateTitlePixmap(Client * c, int state, int left, int right, M switch (title_alignment) { case ALIGN_LEFT: - w1 = left; + w1 = left + title_horizontal_offset; break; case ALIGN_RIGHT: - w1 = right - w2 - w3 - w4; + w1 = right - w2 - w3 - w4 - title_horizontal_offset; break; case ALIGN_CENTER: w1 = left + ((right - left) / 2) - (w3 / 2) - w2; diff --git a/src/settings.c b/src/settings.c index 89f1799938408bff29ce21700a66c0033245507c..52bdf8c42c2061ea1839b338149038d7fa94810b 100644 --- a/src/settings.c +++ b/src/settings.c @@ -42,6 +42,7 @@ int full_width_title; int button_spacing; int button_offset; int title_vertical_offset; +int title_horizontal_offset; int double_click_action; int box_move; int box_resize; @@ -89,6 +90,7 @@ void loadSettings() {"button_layout", NULL, TRUE}, {"button_spacing", NULL, TRUE}, {"title_vertical_offset", NULL, TRUE}, + {"title_horizontal_offset", NULL, TRUE}, {"button_offset", NULL, TRUE}, {"double_click_action", NULL, TRUE}, {"box_move", NULL, TRUE}, @@ -327,6 +329,7 @@ void loadSettings() button_spacing = atoi(getValue("button_spacing", rc)); button_offset = atoi(getValue("button_offset", rc)); title_vertical_offset = atoi(getValue("title_vertical_offset", rc)); + title_horizontal_offset = atoi(getValue("title_horizontal_offset", rc)); box_gc = createGC(cmap, "#FFFFFF", GXxor, NULL, True); box_resize = !g_ascii_strcasecmp("true", getValue("box_resize", rc)); diff --git a/src/settings.h b/src/settings.h index 60bd625a96cf1d3ad10cb590265563da0cc22788..227297c1b09dfd60f307f8843186941eb342d7b8 100644 --- a/src/settings.h +++ b/src/settings.h @@ -60,6 +60,7 @@ extern int full_width_title; extern int button_spacing; extern int button_offset; extern int title_vertical_offset; +extern int title_horizontal_offset; extern int double_click_action; extern int box_move; extern int box_resize; diff --git a/themes/curve/themerc b/themes/curve/themerc index 29bfdb5ef98b249b3282e9c71228c28a2202d8a4..59bac0cf9dc09c586029a35ddae72ea1e95bf75d 100644 --- a/themes/curve/themerc +++ b/themes/curve/themerc @@ -2,3 +2,4 @@ full_width_title=true button_offset=0 button_spacing=0 title_vertical_offset=0 +title_horizontal_offset=8 diff --git a/themes/curve/title-2-active.xpm b/themes/curve/title-2-active.xpm index 43404aee0f49d4f4683443d868583c75facd5f35..2bbafff33e3a42d62cd212a7ec0f8e63be853904 100644 --- a/themes/curve/title-2-active.xpm +++ b/themes/curve/title-2-active.xpm @@ -1,28 +1,28 @@ /* XPM */ static char * title_2_active_xpm[] = { -"8 19 6 1", +"2 19 6 1", " c None", ". c #000000", "+ c #B2BAE9 s active_hilight_1", "@ c #525FAB s active_color_1", "# c #848FD6 s active_mid_1", "$ c #4B58A2 s active_shadow_1", -"........", -".+++++++", -".+++++++", -".+@+@+@+", -".@+@+@+@", -".@@+@@@+", -".@+@@@+@", -".+@@@+@@", -".@@@+@@@", -".@@+@@@+", -".@+@#@+@", -".+@#@+@#", -".@$@+@$@", -".$@+@$@+", -".#+#$#+#", -".+#$#+#$", -".$$$+$$$", -".$$$$$$$", -"........"}; +"..", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".."}; diff --git a/themes/curve/title-2-inactive.xpm b/themes/curve/title-2-inactive.xpm index 5e436a9c625a432b270c8f1a70259e2776085540..a2b5d7e971fc39b932b6f722b0e4380015426c4b 100644 --- a/themes/curve/title-2-inactive.xpm +++ b/themes/curve/title-2-inactive.xpm @@ -1,27 +1,27 @@ /* XPM */ static char * title_2_inactive_xpm[] = { -"8 19 5 1", +"2 19 5 1", " c None", ". c #000000", "+ c #919191 s inactive_shadow_1", "@ c #FFFFFF s inactive_hilight_1", "# c #E6E6E6 s inactive_color_1", -"........", -"#@@@@@@@", -"+#######", -"+#######", -"+#######", -"+#######", -"+#######", -"+#######", -"+#######", -"+#######", -"+#######", -"+#######", -"+#######", -"+#######", -"+#######", -"+#######", -"+#######", -"+#######", -"++++++++"}; +"..", +"#@", +"+#", +"+#", +"+#", +"+#", +"+#", +"+#", +"+#", +"+#", +"+#", +"+#", +"+#", +"+#", +"+#", +"+#", +"+#", +"+#", +"++"};