mirror of
https://github.com/koreader/koreader
synced 2024-11-10 01:10:34 +00:00
PDF: no "Contrast set to" notification on opening (#12391)
This commit is contained in:
parent
64094435f2
commit
9c001a660a
@ -21,7 +21,7 @@ function ReaderKoptListener:onReadSettings(config)
|
|||||||
normal_zoom_mode = ReaderZooming.zoom_mode_label[normal_zoom_mode] and normal_zoom_mode or ReaderZooming.DEFAULT_ZOOM_MODE
|
normal_zoom_mode = ReaderZooming.zoom_mode_label[normal_zoom_mode] and normal_zoom_mode or ReaderZooming.DEFAULT_ZOOM_MODE
|
||||||
self.normal_zoom_mode = normal_zoom_mode
|
self.normal_zoom_mode = normal_zoom_mode
|
||||||
self:setZoomMode(normal_zoom_mode)
|
self:setZoomMode(normal_zoom_mode)
|
||||||
self.ui:handleEvent(Event:new("GammaUpdate", self.document.configurable.contrast))
|
self.ui:handleEvent(Event:new("GammaUpdate", self.document.configurable.contrast, true)) -- no notification
|
||||||
-- since K2pdfopt v2.21 negative value of word spacing is also used, for config
|
-- since K2pdfopt v2.21 negative value of word spacing is also used, for config
|
||||||
-- compatability we should manually change previous -1 to a more reasonable -0.2
|
-- compatability we should manually change previous -1 to a more reasonable -0.2
|
||||||
if self.document.configurable.word_spacing == -1 then
|
if self.document.configurable.word_spacing == -1 then
|
||||||
|
@ -955,13 +955,15 @@ function ReaderView:onReaderFooterVisibilityChange()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ReaderView:onGammaUpdate(gamma)
|
function ReaderView:onGammaUpdate(gamma, no_notification)
|
||||||
self.state.gamma = gamma
|
self.state.gamma = gamma
|
||||||
if self.page_scroll then
|
if self.page_scroll then
|
||||||
self.ui:handleEvent(Event:new("UpdateScrollPageGamma", gamma))
|
self.ui:handleEvent(Event:new("UpdateScrollPageGamma", gamma))
|
||||||
end
|
end
|
||||||
|
if not no_notification then
|
||||||
Notification:notify(T(_("Contrast set to: %1."), gamma))
|
Notification:notify(T(_("Contrast set to: %1."), gamma))
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- For ReaderKOptListener
|
-- For ReaderKOptListener
|
||||||
function ReaderView:onDitheringUpdate()
|
function ReaderView:onDitheringUpdate()
|
||||||
|
Loading…
Reference in New Issue
Block a user