diff options
Diffstat (limited to 'source/theme.c')
-rw-r--r-- | source/theme.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/theme.c b/source/theme.c index 219daf4f..f70f0c45 100644 --- a/source/theme.c +++ b/source/theme.c @@ -1015,6 +1015,15 @@ gboolean rofi_theme_get_image ( const widget *widget, const char *property, cair case ROFI_DIRECTION_TOP: pat = cairo_pattern_create_linear (0.0,widget->h, 0.0, 0.0); break; + case ROFI_DIRECTION_ANGLE: + { + double offsety1 = sin(G_PI*2*p->value.image.angle)*(widget->h/2.0); + double offsetx1 = cos(G_PI*2*p->value.image.angle)*(widget->w/2.0); + pat = cairo_pattern_create_linear ( + widget->w/2.0 - offsetx1, widget->h/2.0 - offsety1, + widget->w/2.0 + offsetx1, widget->h/2.0 + offsety1 ); + break; + } }; guint length = g_list_length ( p->value.image.colors ); if ( length > 1 ){ |