mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Kobo: Refactor various aspects of the Kaleido/MTK support (#12221)
* UIManager: Let the fb backend deal with Kaleido wfm promotion. This fixes a number of quirks that poisoned the refresh queue with spurious full-screen refreshes. See https://github.com/koreader/koreader-base/pull/1865 for more details. * This also means we now disable Kaleido waveform modes when color rendering is disabled (remember to trash your thumbnail cache if you don't want to mix color w/ grayscale thumbnails, though). * UIManager: Merge refreshes that share an edge, because that was driving me nuts (and would have most likely been merged by the kernel anyway). A perfect test-case is the FM, which trips two separate refreshes because of its title bar. * ReaderFlipping: Use sensible dimensions, so that we only refresh the icon's region. * ReaderBookmark: Only refresh the dogear instead of the whole page when toggling bookmarks. * NetworkSetting: Make it a real boy, so it consistently refreshes properly on dismiss instead of relying on UIManager saving the day. * Kobo: Aggressively prevent *both* suspend & standby while MTK devices are plugged-in, as both will horribly implode the kernel (we previously only prevent standby while charging). * Kobo: Switch to 8bpp on B&W MTK devices (or when color rendering is disabled on Kaleido panels).
This commit is contained in:
@@ -239,16 +239,16 @@ function ListMenuItem:update()
|
||||
height_overflow_show_ellipsis = true,
|
||||
}
|
||||
widget = OverlapGroup:new{
|
||||
dimen = dimen,
|
||||
dimen = dimen:copy(),
|
||||
LeftContainer:new{
|
||||
dimen = dimen,
|
||||
dimen = dimen:copy(),
|
||||
HorizontalGroup:new{
|
||||
HorizontalSpan:new{ width = pad_width },
|
||||
wleft,
|
||||
}
|
||||
},
|
||||
RightContainer:new{
|
||||
dimen = dimen,
|
||||
dimen = dimen:copy(),
|
||||
HorizontalGroup:new{
|
||||
wright,
|
||||
HorizontalSpan:new{ width = pad_width },
|
||||
@@ -639,7 +639,7 @@ function ListMenuItem:update()
|
||||
end
|
||||
|
||||
local wmain = LeftContainer:new{
|
||||
dimen = dimen,
|
||||
dimen = dimen:copy(),
|
||||
VerticalGroup:new{
|
||||
wtitle,
|
||||
wauthors,
|
||||
@@ -648,7 +648,7 @@ function ListMenuItem:update()
|
||||
|
||||
-- Build the final widget
|
||||
widget = OverlapGroup:new{
|
||||
dimen = dimen,
|
||||
dimen = dimen:copy(),
|
||||
}
|
||||
if self.do_cover_image then
|
||||
-- add left widget
|
||||
@@ -673,13 +673,13 @@ function ListMenuItem:update()
|
||||
end
|
||||
-- add padded main widget
|
||||
table.insert(widget, LeftContainer:new{
|
||||
dimen = dimen,
|
||||
dimen = dimen:copy(),
|
||||
wmain
|
||||
})
|
||||
-- add right widget
|
||||
if wright then
|
||||
table.insert(widget, RightContainer:new{
|
||||
dimen = dimen,
|
||||
dimen = dimen:copy(),
|
||||
HorizontalGroup:new{
|
||||
wright,
|
||||
HorizontalSpan:new{ width = wright_right_padding },
|
||||
@@ -758,7 +758,7 @@ function ListMenuItem:update()
|
||||
fontsize_no_bookinfo = fontsize_no_bookinfo - fontsize_dec_step
|
||||
until text_widget:getSize().h <= dimen.h
|
||||
widget = LeftContainer:new{
|
||||
dimen = dimen,
|
||||
dimen = dimen:copy(),
|
||||
HorizontalGroup:new{
|
||||
HorizontalSpan:new{ width = Screen:scaleBySize(10) },
|
||||
text_widget
|
||||
@@ -766,10 +766,10 @@ function ListMenuItem:update()
|
||||
}
|
||||
if wright then -- last read date, in History, even for deleted files
|
||||
widget = OverlapGroup:new{
|
||||
dimen = dimen,
|
||||
dimen = dimen:copy(),
|
||||
widget,
|
||||
RightContainer:new{
|
||||
dimen = dimen,
|
||||
dimen = dimen:copy(),
|
||||
HorizontalGroup:new{
|
||||
wright,
|
||||
HorizontalSpan:new{ width = wright_right_padding },
|
||||
|
||||
Reference in New Issue
Block a user