mirror of
https://github.com/davatorium/rofi.git
synced 2025-01-27 15:25:24 -05:00
Add linemargin between handle and rows.
This commit is contained in:
parent
5031cdd228
commit
1e4721b275
2 changed files with 4 additions and 4 deletions
|
@ -1022,8 +1022,8 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
|
||||||
x_offset, y_offset,
|
x_offset, y_offset,
|
||||||
state.element_width, element_height, NORMAL, "" );
|
state.element_width, element_height, NORMAL, "" );
|
||||||
}
|
}
|
||||||
state.scrollbar = scrollbar_create ( main_window, &vinfo, map, state.w - config.padding - 8, state.top_offset,
|
state.scrollbar = scrollbar_create ( main_window, &vinfo, map, state.w - config.padding-config.line_margin- 8, state.top_offset,
|
||||||
8, ( state.max_rows - 1 ) * ( element_height + config.line_margin ) + element_height );
|
config.line_margin+8, ( state.max_rows - 1 ) * ( element_height + config.line_margin ) + element_height );
|
||||||
|
|
||||||
|
|
||||||
scrollbar_set_max_value ( state.scrollbar, state.num_lines );
|
scrollbar_set_max_value ( state.scrollbar, state.num_lines );
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <X11/Xft/Xft.h>
|
#include <X11/Xft/Xft.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include "scrollbar.h"
|
#include "scrollbar.h"
|
||||||
|
#include "rofi.h"
|
||||||
#include "x11-helper.h"
|
#include "x11-helper.h"
|
||||||
|
|
||||||
extern Display *display;
|
extern Display *display;
|
||||||
|
@ -115,7 +115,7 @@ void scrollbar_draw ( scrollbar *sb )
|
||||||
// Redraw base window
|
// Redraw base window
|
||||||
XClearWindow ( display, sb->window );
|
XClearWindow ( display, sb->window );
|
||||||
// Paint the handle.
|
// 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 )
|
unsigned int scrollbar_clicked ( scrollbar *sb, int y )
|
||||||
|
|
Loading…
Add table
Reference in a new issue