39#define DEFAULT_SCROLLBAR_WIDTH 8
45 G_GNUC_UNUSED
const int width) {
64 short handle = sb->
widget.
h - r;
65 double sec = ((r) / (double)(sb->
length - 1));
66 short half_handle = handle / 2;
68 y = MIN(MAX(0, y), sb->
widget.
h - 2 * half_handle);
70 unsigned int sel = round((y) / sec);
71 return MIN(sel, sb->
length - 1);
81 G_GNUC_UNUSED gint x, gint y,
82 G_GNUC_UNUSED
void *user_data) {
135 sb->
length = MAX(1u, max);
168 unsigned int handle = wid->
h - r;
169 double sec = ((r) / (double)(sb->
length - 1));
170 unsigned int height = handle;
171 unsigned int y = sb->
pos * sec;
173 y = MIN(y, wh - handle);
175 height = MAX(2, height);
183 float radius = ((width < height) ? width : height) /
187 cairo_new_sub_path(draw);
188 cairo_arc(draw, x + width - radius, y + radius, radius, -G_PI_2, 0);
189 cairo_arc(draw, x + width - radius, y + height - radius, radius, 0, G_PI_2);
190 cairo_arc(draw, x + radius, y + height - radius, radius, G_PI_2, G_PI);
191 cairo_arc(draw, x + radius, y + radius, radius, G_PI, 1.5 * G_PI);
192 cairo_close_path(draw);
MouseBindingMouseDefaultAction
struct _listview listview
void listview_set_selected(listview *lv, unsigned int selected)
@ ROFI_ORIENTATION_HORIZONTAL
int distance_get_pixel(RofiDistance d, RofiOrientation ori)
int rofi_theme_get_boolean(const widget *wid, const char *property, int def)
RofiDistance rofi_theme_get_distance(const widget *wid, const char *property, int def)
void rofi_theme_get_color(const widget *wid, const char *property, cairo_t *d)