diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-12-11 17:13:26 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-12-11 17:13:26 +0100 |
commit | a0096f52c4958398419058ee098a632f96137db3 (patch) | |
tree | b2b4d327e741c77f2ec5b1e3c6c169f9b94c1521 | |
parent | 78abbeb7101da0cb1eb708d915fc918b945b0970 (diff) |
Border width via new config system.
-rw-r--r-- | source/view.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/view.c b/source/view.c index 8a462e97..f52588c6 100644 --- a/source/view.c +++ b/source/view.c @@ -794,14 +794,15 @@ void rofi_view_update ( RofiViewState *state ) color_border ( d ); rofi_theme_get_color ( "window" , "foreground", d ); - if ( config.menu_bw > 0 ) { + int bw = rofi_theme_get_integer ( "window", "border-width" , config.menu_bw); + if ( bw > 0 ) { cairo_save ( d ); - cairo_set_line_width ( d, config.menu_bw ); + cairo_set_line_width ( d, bw ); cairo_rectangle ( d, - config.menu_bw / 2.0, - config.menu_bw / 2.0, - state->width - config.menu_bw, - state->height - config.menu_bw ); + bw / 2.0, + bw / 2.0, + state->width - bw, + state->height - bw ); cairo_stroke ( d ); cairo_restore ( d ); } @@ -1539,9 +1540,10 @@ int rofi_view_error_dialog ( const char *msg, int markup ) { RofiViewState *state = __rofi_view_state_create (); state->retv = MENU_CANCEL; - state->border = config.padding + config.menu_bw; state->menu_flags = MENU_ERROR_DIALOG; state->finalize = process_result; + state->border = rofi_theme_get_integer ( "window", "padding" , config.padding ); + state->border += rofi_theme_get_integer ( "window", "border-width" , config.menu_bw); rofi_view_calculate_window_and_element_width ( state ); state->main_box = box_create ( "mainbox.box", BOX_VERTICAL, |