mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -2,6 +2,7 @@ local Widget = require("ui/widget/widget")
|
||||
local Screen = require("ui/screen")
|
||||
local RenderText = require("ui/rendertext")
|
||||
local Geom = require("ui/geometry")
|
||||
local Blitbuffer = require("ffi/blitbuffer")
|
||||
|
||||
--[[
|
||||
A TextWidget puts a string on a single line
|
||||
@@ -10,7 +11,7 @@ local TextWidget = Widget:new{
|
||||
text = nil,
|
||||
face = nil,
|
||||
bold = nil,
|
||||
fgcolor = 1.0, -- [0.0, 1.0]
|
||||
fgcolor = Blitbuffer.COLOR_BLACK,
|
||||
_bb = nil,
|
||||
_length = 0,
|
||||
_height = 0,
|
||||
|
||||
Reference in New Issue
Block a user