diff --git a/README.md b/README.md index ddadafb..e6406fb 100644 --- a/README.md +++ b/README.md @@ -353,7 +353,6 @@ Radical also use the some of the same theme options as awful.menu, plus some: | menu_corner_radius | Arrow based menu corner radius | Number (default = 10) | | dock_corner_radius | The dock menu type corner radius | Number (default 10) | | menu_outline_color | Arrow menu outer border color | String/Gradient/Pattern | -| menu_checkbox_style | The style used for checkboxes | "holo" or "default" | Styling can also be done using the icon_transformation option. This feature diff --git a/item/common.lua b/item/common.lua index 06ddfa7..e1656ec 100644 --- a/item/common.lua +++ b/item/common.lua @@ -1,6 +1,5 @@ local wibox = require( "wibox" ) local beautiful = require( "beautiful" ) - local module = {} -- Apply icon transformation @@ -59,26 +58,17 @@ end -- Setup the checkbox function module.setup_checked(item, data) if item.checkable then + local ck = wibox.widget.checkbox(item.checked or false) + + item.set_checked = function(_,value) + ck.checked = value + end item.get_checked = function() - if type(item._private_data.checked) == "function" then - return item._private_data.checked(data,item) - else - return item._private_data.checked - end + return ck.checked end - local ck = wibox.widget.checkbox(item.checked or false, { - style = beautiful.menu_checkbox_style, - color = beautiful.fg_normal - }) - - item.set_checked = function (_,value) - item._private_data.checked = value - ck.checked = value - item._internal.has_changed = true - end - return ck - end + return ck + end end -- Proxy all events to the parent diff --git a/radial.lua b/radial.lua index d6dd88a..c098ac0 100644 --- a/radial.lua +++ b/radial.lua @@ -7,7 +7,6 @@ local base = require( "radical.base" ) local awful = require( "awful" ) local util = require( "awful.util" ) local button = require( "awful.button" ) -local checkbox = require( "radical.widgets.checkbox" ) local beautiful = require( "beautiful" ) local naughty = require( "naughty" ) local wibox = require( "wibox" ) diff --git a/widgets/init.lua b/widgets/init.lua index 34d817f..59c7e72 100644 --- a/widgets/init.lua +++ b/widgets/init.lua @@ -2,11 +2,9 @@ local wibox = require("wibox") wibox.layout.grid = require( "radical.widgets.grid" ) -wibox.widget.checkbox = require( "radical.widgets.checkbox" ) wibox.widget.slider = require( "radical.widgets.slider" ) return { - checkbox = require( "radical.widgets.checkbox" ), scroll = require( "radical.widgets.scroll" ), filter = require( "radical.widgets.filter" ), fkey = require( "radical.widgets.fkey" ),