From ace65ad586126f01c405735c5436f128cd349042 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Tue, 31 Dec 2013 15:55:51 -0500 Subject: [PATCH] Fix scroll widget --- init.lua | 1 + item_style/basic.lua | 6 +++--- widgets/scroll.lua | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 5574b64..2e72298 100644 --- a/init.lua +++ b/init.lua @@ -9,4 +9,5 @@ return { style = require( "radical.style" ), item_style = require( "radical.item_style" ), widgets = require( "radical.widgets" ), + tooltip = require( "radical.tooltip" ) } \ No newline at end of file diff --git a/item_style/basic.lua b/item_style/basic.lua index 95372b0..3775543 100644 --- a/item_style/basic.lua +++ b/item_style/basic.lua @@ -10,11 +10,11 @@ local module = { } } -local function draw(data,item,is_focussed,is_pressed) +local function draw(data,item,is_focussed,is_pressed,col) if is_focussed or (item._tmp_menu) then - item.widget:set_bg(data.bg_focus) + item.widget:set_bg(col or data.bg_focus) else - item.widget:set_bg(nil) + item.widget:set_bg(col or nil) end end diff --git a/widgets/scroll.lua b/widgets/scroll.lua index c2d6c73..c374331 100644 --- a/widgets/scroll.lua +++ b/widgets/scroll.lua @@ -14,8 +14,8 @@ local isinit = false local function init() local size = beautiful.menu_height or 16 - arr_down = cairo.ImageSurface(cairo.Format.ARGB32, size,size) - arr_up = cairo.ImageSurface(cairo.Format.ARGB32, size,size) + arr_down = cairo.ImageSurface(cairo.Format.ARGB32, 10,size) + arr_up = cairo.ImageSurface(cairo.Format.ARGB32, 10,size) local cr2 = cairo.Context(arr_down) local cr = cairo.Context(arr_up) cr:set_source(color(beautiful.fg_normal))