PDF: no "Contrast set to" notification on opening (#12391)

reviewable/pr12407/r1
hius07 4 weeks ago committed by GitHub
parent 64094435f2
commit 9c001a660a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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
self.normal_zoom_mode = 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
-- compatability we should manually change previous -1 to a more reasonable -0.2
if self.document.configurable.word_spacing == -1 then

@ -955,13 +955,15 @@ function ReaderView:onReaderFooterVisibilityChange()
end
end
function ReaderView:onGammaUpdate(gamma)
function ReaderView:onGammaUpdate(gamma, no_notification)
self.state.gamma = gamma
if self.page_scroll then
self.ui:handleEvent(Event:new("UpdateScrollPageGamma", gamma))
end
if not no_notification then
Notification:notify(T(_("Contrast set to: %1."), gamma))
end
end
-- For ReaderKOptListener
function ReaderView:onDitheringUpdate()

Loading…
Cancel
Save