forked from Mirrors/apostrophe
Make the overlay toggable
parent
d084f24d89
commit
772b1ba6db
|
@ -13,6 +13,14 @@
|
|||
asked to install them manually.
|
||||
</description>
|
||||
</key>
|
||||
<key name='gradient-overlay' type='b'>
|
||||
<default>true</default>
|
||||
<summary>Show gradient overlay</summary>
|
||||
<description>
|
||||
Show a gradient overlay over the text at the top anf bottom of the window.
|
||||
It can cause performance problems to some users
|
||||
</description>
|
||||
</key>
|
||||
<key name='open-file-path' type='s'>
|
||||
<default>"/tmp"</default>
|
||||
<summary>Open file base path</summary>
|
||||
|
|
|
@ -146,7 +146,12 @@ class UberwriterWindow(Gtk.ApplicationWindow):
|
|||
self.scrolled_window.add(self.text_editor)
|
||||
self.alignment_padding = 40
|
||||
self.editor_viewport = self.builder.get_object('editor_viewport')
|
||||
self.scrolled_window.connect_after("draw", self.draw_gradient)
|
||||
|
||||
# some people seems to have performance problems with the overlay.
|
||||
# Let them disable it
|
||||
|
||||
if self.settings.get_value("gradient-overlay"):
|
||||
self.scrolled_window.connect_after("draw", self.draw_gradient)
|
||||
|
||||
self.smooth_scroll_starttime = 0
|
||||
self.smooth_scroll_endtime = 0
|
||||
|
|
Loading…
Reference in New Issue