From eb46ba7bdce0d7a4efbb0a3359e8d6a99c14a3bc Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Tue, 20 Jan 2015 18:42:29 +0200 Subject: Remove bg color option as you never see the real bg anyways. --- client/common/common.c | 25 ++++++++++--------------- lib/bemenu.h | 1 - lib/menu.c | 1 - lib/renderers/cairo.h | 4 +--- 4 files changed, 11 insertions(+), 20 deletions(-) diff --git a/client/common/common.c b/client/common/common.c index 14837cb..fab2a58 100644 --- a/client/common/common.c +++ b/client/common/common.c @@ -85,7 +85,6 @@ usage(FILE *out, const char *name) " -f, --grab grabs the keyboard before reading stdin. (x)\n" " -m, --monitor index of monitor where menu will appear. (x)\n" " --fn defines the font to be used ('name [size]'). (wx)\n" - " --bg defines the background color. (wx)\n" " --tb defines the title background color. (wx)\n" " --tf defines the title foreground color. (wx)\n" " --fb defines the filter background color. (wx)\n" @@ -117,13 +116,12 @@ parse_args(struct client *client, int *argc, char **argv[]) { "prompt", required_argument, 0, 'p' }, { "index", required_argument, 0, 'I' }, { "prefix", required_argument, 0, 'P' }, - { "scrollbar", required_argument, 0, 0x113 }, + { "scrollbar", required_argument, 0, 0x100 }, { "bottom", no_argument, 0, 'b' }, { "grab", no_argument, 0, 'f' }, { "monitor", required_argument, 0, 'm' }, - { "fn", required_argument, 0, 0x100 }, - { "bg", required_argument, 0, 0x101 }, + { "fn", required_argument, 0, 0x101 }, { "tb", required_argument, 0, 0x102 }, { "tf", required_argument, 0, 0x103 }, { "fb", required_argument, 0, 0x104 }, @@ -134,10 +132,10 @@ parse_args(struct client *client, int *argc, char **argv[]) { "hf", required_argument, 0, 0x109 }, { "sb", required_argument, 0, 0x110 }, { "sf", required_argument, 0, 0x111 }, - { "scb", required_argument, 0, 0x114 }, - { "scf", required_argument, 0, 0x115 }, + { "scb", required_argument, 0, 0x112 }, + { "scf", required_argument, 0, 0x113 }, - { "disco", no_argument, 0, 0x112 }, + { "disco", no_argument, 0, 0x114 }, { 0, 0, 0, 0 } }; @@ -176,7 +174,7 @@ parse_args(struct client *client, int *argc, char **argv[]) case 'I': client->selected = strtol(optarg, NULL, 10); break; - case 0x113: + case 0x100: client->scrollbar = (!strcmp(optarg, "always") ? BM_SCROLLBAR_ALWAYS : (!strcmp(optarg, "autohide") ? BM_SCROLLBAR_AUTOHIDE : BM_SCROLLBAR_NONE)); break; @@ -190,11 +188,8 @@ parse_args(struct client *client, int *argc, char **argv[]) client->monitor = strtol(optarg, NULL, 10); break; - case 0x100: - client->font = optarg; - break; case 0x101: - client->colors[BM_COLOR_BG] = optarg; + client->font = optarg; break; case 0x102: client->colors[BM_COLOR_TITLE_BG] = optarg; @@ -226,14 +221,14 @@ parse_args(struct client *client, int *argc, char **argv[]) case 0x111: client->colors[BM_COLOR_SELECTED_FG] = optarg; break; - case 0x114: + case 0x112: client->colors[BM_COLOR_SCROLLBAR_BG] = optarg; break; - case 0x115: + case 0x113: client->colors[BM_COLOR_SCROLLBAR_FG] = optarg; break; - case 0x112: + case 0x114: disco(); break; diff --git a/lib/bemenu.h b/lib/bemenu.h index 4010683..d91e695 100644 --- a/lib/bemenu.h +++ b/lib/bemenu.h @@ -202,7 +202,6 @@ enum bm_key { * @link ::bm_color BM_COLOR_LAST @endlink is provided for enumerating colors. */ enum bm_color { - BM_COLOR_BG, BM_COLOR_TITLE_BG, BM_COLOR_TITLE_FG, BM_COLOR_FILTER_BG, diff --git a/lib/menu.c b/lib/menu.c index 2eea897..13f690d 100644 --- a/lib/menu.c +++ b/lib/menu.c @@ -15,7 +15,6 @@ static const char *default_font = "Terminus 9"; * Default hexadecimal colors. */ static const char *default_colors[BM_COLOR_LAST] = { - "#121212", // BM_COLOR_BG "#121212", // BM_COLOR_TITLE_BG "#D81860", // BM_COLOR_TITLE_FG "#121212", // BM_COLOR_FILTER_BG diff --git a/lib/renderers/cairo.h b/lib/renderers/cairo.h index 662f788..c7b39b2 100644 --- a/lib/renderers/cairo.h +++ b/lib/renderers/cairo.h @@ -169,9 +169,7 @@ bm_cairo_paint(struct cairo *cairo, uint32_t width, uint32_t height, uint32_t ma memset(out_result, 0, sizeof(struct cairo_paint_result)); out_result->displayed = 1; - struct cairo_color c; - bm_cairo_color_from_menu_color(menu, BM_COLOR_BG, &c); - cairo_set_source_rgb(cairo->cr, c.r, c.g, c.b); + cairo_set_source_rgb(cairo->cr, 0, 0, 0); cairo_rectangle(cairo->cr, 0, 0, width, height); cairo_fill(cairo->cr); -- cgit v1.2.3-70-g09d2