unify color specification

colors were a mixture of 4bpp integers (0=white, 15=black) and
fractional blackness levels (0=white, 1.0=black) before. This is
now unified to use the color specification of the Blitbuffer API.
This commit is contained in:
Hans-Werner Hilse
2014-10-22 15:34:11 +02:00
parent 03ac887d46
commit 5982e24d57
34 changed files with 140 additions and 104 deletions

View File

@@ -21,6 +21,7 @@ local Font = require("ui/font")
local DEBUG = require("dbg")
local _ = require("gettext")
local NetworkMgr = require("ui/networkmgr")
local Blitbuffer = require("ffi/blitbuffer")
--[[
TouchMenuItem widget
@@ -71,7 +72,7 @@ function TouchMenuItem:init()
self.item_frame = FrameContainer:new{
width = self.dimen.w,
bordersize = 0,
color = 15,
color = Blitbuffer.COLOR_BLACK,
HorizontalGroup:new {
align = "center",
CenterContainer:new{
@@ -80,7 +81,7 @@ function TouchMenuItem:init()
},
TextWidget:new{
text = self.item.text or self.item.text_func(),
fgcolor = item_enabled ~= false and 1.0 or 0.5,
fgcolor = Blitbuffer.gray(item_enabled ~= false and 1.0 or 0.5),
face = self.face,
},
},
@@ -362,7 +363,7 @@ function TouchMenu:init()
self[1] = FrameContainer:new{
padding = self.padding,
bordersize = self.bordersize,
background = 0,
background = Blitbuffer.COLOR_WHITE,
-- menubar and footer will be inserted in
-- item_group in updateItems
self.item_group,