Merge pull request #1145 from NiLuJe/master

Some more refresh fixes...
pull/1152/head v2014.11.13-nightly
Huang Xin 10 years ago
commit 24d629d4e7

@ -267,21 +267,21 @@ function ReaderFooter:onTapFooter(arg, ges)
self.mode = 0 self.mode = 0
end end
self:applyFooterMode() self:applyFooterMode()
local region = Geom:new{
x = 0,
y = Screen:getHeight() - self.height,
w = Screen:getWidth(),
h = self.height
}
UIManager.update_regions_func = function()
return {region}
end
end end
if self.pageno then if self.pageno then
self:updateFooterPage() self:updateFooterPage()
else else
self:updateFooterPos() self:updateFooterPos()
end end
local region = Geom:new{
x = 0,
y = Screen:getHeight() - self.height,
w = Screen:getWidth(),
h = self.height
}
UIManager.update_regions_func = function()
return {region}
end
UIManager:setDirty(self.view.dialog, "partial") UIManager:setDirty(self.view.dialog, "partial")
G_reader_settings:saveSetting("reader_footer_mode", self.mode) G_reader_settings:saveSetting("reader_footer_mode", self.mode)
return true return true

@ -120,7 +120,7 @@ function ReaderHighlight:clear()
else else
self.ui.document:clearSelection() self.ui.document:clearSelection()
end end
UIManager:setDirty(self.dialog, "partial") UIManager:setDirty(self.dialog, "full")
if self.hold_pos then if self.hold_pos then
self.hold_pos = nil self.hold_pos = nil
self.selected_text = nil self.selected_text = nil

@ -125,8 +125,8 @@ function UIManager:init()
self.partial_refresh_waveform_mode = WAVEFORM_MODE_AUTO self.partial_refresh_waveform_mode = WAVEFORM_MODE_AUTO
end end
else else
-- See the note in the Kindle code path later, the stock reader might be using AUTO -- Let the driver handle it on those models (asking for NTX_WFM_MODE_GL16 appears to be a very bad idea, #1146)
self.partial_refresh_waveform_mode = NTX_WFM_MODE_GL16 self.partial_refresh_waveform_mode = WAVEFORM_MODE_AUTO
self.wait_for_every_marker = false self.wait_for_every_marker = false
end end
-- Let the driver decide what to do with PARTIAL UI updates... -- Let the driver decide what to do with PARTIAL UI updates...
@ -462,7 +462,7 @@ function UIManager:run()
end end
-- If the device is REAGL-aware, we're specifically asking for a REAGL update, and we're doing a PARTIAL *reader* refresh, apply some trickery to match the stock reader's behavior -- If the device is REAGL-aware, we're specifically asking for a REAGL update, and we're doing a PARTIAL *reader* refresh, apply some trickery to match the stock reader's behavior
-- (On most device, REAGL updates are always FULL, but there's no black flash. On devices where this isn't the case [H2O], we're letting the driver do the job by using AUTO). -- (On most device, REAGL updates are always FULL, but there's no black flash. On devices where this isn't the case [H2O], we're letting the driver do the job by using AUTO).
if not force_partial_refresh and refresh_type == UPDATE_MODE_PARTIAL and (waveform_mode == WAVEFORM_MODE_REAGL or waveform_mode == NTX_WFM_MODE_GLD16) then if not force_partial_refresh and not force_fast_refresh and refresh_type == UPDATE_MODE_PARTIAL and (waveform_mode == WAVEFORM_MODE_REAGL or waveform_mode == NTX_WFM_MODE_GLD16) then
refresh_type = UPDATE_MODE_FULL refresh_type = UPDATE_MODE_FULL
end end
-- On the other hand, if we asked for a PARTIAL *UI* refresh, fall back to the default waveform mode, which is tailored per-device to hopefully be more appropriate in this instance than the one we use in the reader. -- On the other hand, if we asked for a PARTIAL *UI* refresh, fall back to the default waveform mode, which is tailored per-device to hopefully be more appropriate in this instance than the one we use in the reader.

@ -77,6 +77,9 @@ function ScrollTextWidget:onScrollText(arg, ges)
self.text_widget:scrollUp() self.text_widget:scrollUp()
self:updateScrollBar(self.text_widget) self:updateScrollBar(self.text_widget)
end end
UIManager.update_regions_func = function()
return {self.dimen}
end
UIManager:setDirty(self.dialog, "partial") UIManager:setDirty(self.dialog, "partial")
end end

Loading…
Cancel
Save