When you open an image with Sublime and try to zoom in, you change the font size of other open documents but you don’t zoom in. Maybe you should not be able to change the font size when you only have an image open, since it only changes without giving you feedback that you even did that.
Font size changing when it should not
If you are finding yourself accidentally using ctrl + (+/- | scroll_wheel) to increase/decrease the image size (which is not possible yet), you can set up a simple listener that blocks the relevant commands when the open view is an image.
import sublime
import sublime_plugin
class DontResizeViewWhenInImageListener(sublime_plugin.EventListener):
def on_window_command(self, window, command_name, args):
if command_name in ("increase_font_size", "decrease_font_size"):
if isinstance(window.active_sheet(), sublime.ImageSheet):
window.status_message("Can't resize the image")
return ("noop", {})
1 Like
LalaGhost
#3
Thanks for the response!
I just hope that in the end you won’t scale up an image and increase the font size at the same time, since you cannot even have image and text in on tab open at the same time.
0 Likes