forked from Mirrors/apostrophe
Merge pull request #144 from goncalossilva/various-improvements
Fix opening recents popover affecting font sizegithub/fork/yochananmarqos/patch-1
commit
2b5140dada
|
@ -4,6 +4,7 @@
|
|||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkRecentFilter" id="recent_md_filter">
|
||||
<mime-types>
|
||||
<mime-type>text/markdown</mime-type>
|
||||
<mime-type>text/x-markdown</mime-type>
|
||||
</mime-types>
|
||||
</object>
|
||||
|
|
|
@ -141,7 +141,7 @@ def buttons(app):
|
|||
btn.open_recent.pack_start(open_button, False, False, 0)
|
||||
btn.open_recent.pack_end(recents_button, False, False, 0)
|
||||
|
||||
btn.search.set_tooltip_text(_("Search and replace"))
|
||||
btn.search.set_tooltip_text(_("Search and Replace"))
|
||||
btn.menu.set_tooltip_text(_("Menu"))
|
||||
btn.menu.set_image(Gtk.Image.new_from_icon_name("open-menu-symbolic",
|
||||
Gtk.IconSize.BUTTON))
|
||||
|
|
|
@ -262,6 +262,11 @@ class Window(Gtk.ApplicationWindow):
|
|||
"""set paddings dependant of the window size
|
||||
"""
|
||||
|
||||
# Ensure the window receiving the event is the one we care about, ie. the main window.
|
||||
# On Wayland (bug?), sub-windows such as the recents popover will also trigger this.
|
||||
if event and event.window != window.get_window():
|
||||
return
|
||||
|
||||
# Adjust text editor width depending on window width, so that:
|
||||
# - The number of characters per line is adequate (http://webtypography.net/2.1.2)
|
||||
# - The number of characters stays constant while resizing the window / font
|
||||
|
|
Loading…
Reference in New Issue