mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Various blitting related cleanups (#4789)
* Fix the "Enable debug logging" checkbox so that it properly disables "Enable verbose debug logging" when it gets disabled * Avoid asking ImageWidget for alpha-blending when it's not useful * Make ImageWidget's alpha-blending code-path double-check that alpha-blending actually is needed, and avoid it if possible * In the same vein, only do alpha-blending in textboxwidget when absolutely necessary * Prefer color constants over the gray() method, ensuring that they're part of the eInk palette Depends on https://github.com/koreader/koreader-base/pull/853 Fix #4774
This commit is contained in:
@@ -299,7 +299,7 @@ function FrontLightWidget:addWarmthWidgets(num_warmth, step, vertical_group)
|
||||
if self.powerd.auto_warmth then
|
||||
enable_button_plus = false
|
||||
enable_button_minus = false
|
||||
button_color = Blitbuffer.COLOR_GREY
|
||||
button_color = Blitbuffer.COLOR_DARK_GRAY
|
||||
else
|
||||
if math.floor(num_warmth / self.nl_scale) <= self.nl_min then enable_button_minus = false end
|
||||
if math.ceil(num_warmth / self.nl_scale) >= self.nl_max then enable_button_plus = false end
|
||||
@@ -413,7 +413,7 @@ function FrontLightWidget:addWarmthWidgets(num_warmth, step, vertical_group)
|
||||
face = self.larger_font_face,
|
||||
alignment = "right",
|
||||
fgcolor = self.powerd.auto_warmth and Blitbuffer.COLOR_BLACK or
|
||||
Blitbuffer.COLOR_GREY,
|
||||
Blitbuffer.COLOR_DARK_GRAY,
|
||||
width = self.screen_width * 0.3
|
||||
}
|
||||
local text_hour = TextBoxWidget:new{
|
||||
@@ -422,7 +422,7 @@ function FrontLightWidget:addWarmthWidgets(num_warmth, step, vertical_group)
|
||||
face = self.larger_font_face,
|
||||
alignment = "center",
|
||||
fgcolor =self.powerd.auto_warmth and Blitbuffer.COLOR_BLACK or
|
||||
Blitbuffer.COLOR_GREY,
|
||||
Blitbuffer.COLOR_DARK_GRAY,
|
||||
width = self.screen_width * 0.15
|
||||
}
|
||||
local button_minus_one_hour = Button:new{
|
||||
|
||||
Reference in New Issue
Block a user