Commit 6d9fe46c authored by Youness Alaoui's avatar Youness Alaoui
Browse files

Improve default design and use a grey theme

Remove the reflection on buttons.
Make the default background into a black->grey gradient.
Remove --background-gradient from whiptail wrapper script.
Make the frame have a diagonal gradient instead of on a top-bottom path.
invert colors from the frame gradient with regard to the background.
Make the title grey.
Change the selected button color from blue to light grey.
Increase the dropshadow to 8 pixels.
parent 37cfa745
......@@ -292,13 +292,13 @@ cairo_menu_create_default_background (int width, int height,
cairo_set_source (cr, linpat);
cairo_paint (cr);
/*
cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 0.2);
cairo_new_path (cr);
cairo_arc (cr, width / 2, - (width * 4) + (height / 2),
width * 4, 0, M_PI * 2);
cairo_close_path (cr);
cairo_fill (cr);
cairo_fill (cr);*/
cairo_destroy (cr);
cairo_pattern_destroy (linpat);
......
......@@ -246,6 +246,12 @@ int parse_whiptail_args (int argc, char **argv, whiptail_args *args)
args->no_button = "No";
args->ok_button = "OK";
args->cancel_button = "Cancel";
args->background_grad_rgb[0] = 0;
args->background_grad_rgb[1] = 0;
args->background_grad_rgb[2] = 0;
args->background_grad_rgb[3] = 0.6;
args->background_grad_rgb[4] = 0.6;
args->background_grad_rgb[5] = 0.6;
for (i = 1; i < argc; i++) {
if (end_of_args == 0 && strcmp (argv[i], "-h") == 0) {
......
......@@ -137,12 +137,10 @@ create_standard_menu_frame (Menu *menu)
cairo_pattern_destroy (linpat);
// Create frame gradient
linpat = cairo_pattern_create_linear (width, 0, width, height);
linpat = cairo_pattern_create_linear (0, 0, width, height);
cairo_pattern_add_color_stop_rgb (linpat, 0.0, 0.03, 0.07, 0.10);
cairo_pattern_add_color_stop_rgb (linpat, 0.1, 0.04, 0.09, 0.16);
cairo_pattern_add_color_stop_rgb (linpat, 0.5, 0.05, 0.20, 0.35);
cairo_pattern_add_color_stop_rgb (linpat, 1.0, 0.06, 0.55, 0.75);
cairo_pattern_add_color_stop_rgb (linpat, 0.0, 0.5, 0.5, 0.5);
cairo_pattern_add_color_stop_rgb (linpat, 1.0, 0.1, 0.1, 0.1);
cairo_utils_clip_round_edge (cr, width, height,
STANDARD_MENU_FRAME_CORNER_RADIUS + STANDARD_MENU_FRAME_BORDER_WIDTH,
......@@ -165,7 +163,7 @@ create_standard_menu_frame (Menu *menu)
y = (STANDARD_MENU_FRAME_TOP / 2) + (fex.ascent / 2);
x = ((width - tex.width) / 2) - tex.x_bearing;
cairo_move_to(cr, x, y);
cairo_set_source_rgb (cr, 0.0, 0.3, 0.5);
cairo_set_source_rgb (cr, 0.5, 0.5, 0.5);
cairo_show_text (cr, menu->title);
cairo_destroy (cr);
......@@ -418,7 +416,7 @@ standard_menu_create (const char *title, char * text,
text_height = cairo_utils_get_surface_height (menu->text.surface);
background = create_standard_background (button_width, button_height, 0, 0, 0);
selected_background = create_standard_background (button_width, button_height,
0.05, 0.30, 0.60);
0.4, 0.4, 0.4);
disabled = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
button_width, button_height);
......
......@@ -118,7 +118,7 @@ typedef struct {
#define STANDARD_MENU_TITLE_FONT_SIZE 25
#define MAIN_MENU_FONT_SIZE 15
#define FRAME_DROPSHADOW_DISTANCE 5
#define FRAME_DROPSHADOW_DISTANCE 8
#define BACKGROUND_GRADIENT_START_R 0
#define BACKGROUND_GRADIENT_START_G 0.3
......
#!/bin/sh
fbwhiptail --notags --background-gradient 0 0 0 150 150 150 "$@"
fbwhiptail --notags "$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment