Add linemargin between handle and rows.

This commit is contained in:
Dave Davenport 2015-09-04 17:55:54 +02:00
parent 5031cdd228
commit 1e4721b275
2 changed files with 4 additions and 4 deletions

View File

@ -1022,8 +1022,8 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
x_offset, y_offset,
state.element_width, element_height, NORMAL, "" );
}
state.scrollbar = scrollbar_create ( main_window, &vinfo, map, state.w - config.padding - 8, state.top_offset,
8, ( state.max_rows - 1 ) * ( element_height + config.line_margin ) + element_height );
state.scrollbar = scrollbar_create ( main_window, &vinfo, map, state.w - config.padding-config.line_margin- 8, state.top_offset,
config.line_margin+8, ( state.max_rows - 1 ) * ( element_height + config.line_margin ) + element_height );
scrollbar_set_max_value ( state.scrollbar, state.num_lines );

View File

@ -32,7 +32,7 @@
#include <X11/Xft/Xft.h>
#include <glib.h>
#include "scrollbar.h"
#include "rofi.h"
#include "x11-helper.h"
extern Display *display;
@ -115,7 +115,7 @@ void scrollbar_draw ( scrollbar *sb )
// Redraw base window
XClearWindow ( display, sb->window );
// Paint the handle.
XFillRectangle ( display, sb->window, sb->gc, 0, y, sb->w, height );
XFillRectangle ( display, sb->window, sb->gc, config.line_margin, y, sb->w-config.line_margin, height );
}
unsigned int scrollbar_clicked ( scrollbar *sb, int y )