Merge pull request #41 from mindeunix/awesome3.6

Replace radical.widgets.checkbox with wibox.widget.checkbox
This commit is contained in:
Emmanuel Lepage Vallée 2016-10-22 17:30:13 -04:00 committed by GitHub
commit 5a22d8b86b
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,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

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