Replace radical.widgets.checkbox with wibox.widget.checkbox

Radical checkbox widget is no longer needed, it still here,
but no longer used, maybe @Elv13 have some plans with it.
This commit is contained in:
minde 2016-10-22 18:05:38 +03:00
parent 71cdd0e34e
commit a79f630a37
4 changed files with 8 additions and 22 deletions

View File

@ -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

View File

@ -1,6 +1,5 @@
local wibox = require( "wibox" )
local beautiful = require( "beautiful" )
local module = {}
-- Apply icon transformation
@ -59,24 +58,15 @@ end
-- Setup the checkbox
function module.setup_checked(item, data)
if item.checkable then
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
end
local ck = wibox.widget.checkbox(item.checked or false)
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
item.set_checked = function(_,value)
ck.checked = value
item._internal.has_changed = true
end
item.get_checked = function()
return ck.checked
end
return ck
end
end

View File

@ -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" )

View File

@ -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" ),