Community
    • Login

    Zoom feedback

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 424 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DevForFunD
      DevForFun
      last edited by DevForFun

      Hi, love Notepad++,
      This is a suggestion. Wouldn’t dare to make a request for such a great product that I get to use for free :)
      The suggestion is to show some feedback at the bottom (similar to the feedback about which line and col you are at) to show the zoom you are using. Ideally would use a % as Word does. But I think showing the font size would work better for Notepad++.
      This is helpful for example when you work with two documents side-by-side and want to make them the same zoom.
      Thank you thank you!
      Pablo

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @DevForFun
        last edited by

        @DevForFun

        A pythonscript solution could look like this

        from Npp import notepad, editor, editor1, editor2, NOTIFICATION, SCINTILLANOTIFICATION, STATUSBARSECTION
        
        def check_zoom_level():
            if notepad.isSingleView():
                zoom_level = 'zoom level: {}'.format(editor.getZoom())
            else:
                zoom_level = 'zoom level view0:{} view1:{}'.format(editor1.getZoom(), editor2.getZoom())
            notepad.setStatusBar(STATUSBARSECTION.DOCTYPE, zoom_level)
                
        def on_zoom(args):
            check_zoom_level()
            
            
        def on_buffer_activated(args):
            check_zoom_level()
            
        def main():
            notepad.callback(on_buffer_activated, [NOTIFICATION.BUFFERACTIVATED])
            editor.callbackSync(on_zoom, [SCINTILLANOTIFICATION.ZOOM])
            on_buffer_activated(None)
            
        main()
        
        1 Reply Last reply Reply Quote 4
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors