37#define DEFAULT_SCROLLBAR_WIDTH 8
43 G_GNUC_UNUSED
const int width) {
62 short handle = sb->
widget.
h - r;
63 double sec = ((r) / (double)(sb->
length - 1));
64 short half_handle = handle / 2;
66 y = MIN(MAX(0, y), sb->
widget.
h - 2 * half_handle);
68 unsigned int sel = ((y) / sec);
69 return MIN(sel, sb->
length - 1);
79 G_GNUC_UNUSED gint x, gint y,
80 G_GNUC_UNUSED
void *user_data) {
133 sb->
length = MAX(1u, max);
166 unsigned int handle = wid->
h - r;
167 double sec = ((r) / (double)(sb->
length - 1));
168 unsigned int height = handle;
169 unsigned int y = sb->
pos * sec;
171 y = MIN(y, wh - handle);
173 height = MAX(2, height);
181 float radius = ((width < height) ? width : height) / 2;
184 cairo_new_sub_path(draw);
185 cairo_arc(draw, x + width - radius, y + radius, radius, -G_PI_2, 0);
186 cairo_arc(draw, x + width - radius, y + height - radius, radius, 0, G_PI_2);
187 cairo_arc(draw, x + radius, y + height - radius, radius, G_PI_2, G_PI);
188 cairo_arc(draw, x + radius, y + radius, radius, G_PI, 1.5 * G_PI);
189 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)