Home Download Buy Blog Forum Support

Auto-resizing Columns

Auto-resizing Columns

Postby Cydonia on Fri Jun 21, 2013 9:18 am

I'm considering attempting to implement this feature as a plugin:

viewtopic.php?f=4&t=12817

Cydonia wrote:I usually use ST with 2 panels (columns). What would be extremely handy though, would be for columns to automatically enlarge (and shrink the other column) when under focus. This would be particularly useful on smaller screens.


Has anyone got any idea how to implement this? One idea I have at this stage is to listen to "view" change events, then when changes are detected, check which column is active, and then run a "set_layout" command somehow. (I don't have any experience writing ST plugins as of yet, in case it isn't obvious).
Cydonia
 
Posts: 4
Joined: Fri Jun 21, 2013 9:04 am

Re: Auto-resizing Columns

Postby sublimator on Fri Jun 21, 2013 1:03 pm

This would definitely be doable. There's a `on_activated` event for views to listen to.

Wouldn't hurt to try but it might be annoying in practice though?
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Auto-resizing Columns

Postby adzenith on Fri Jun 21, 2013 3:28 pm

Checking back at the original thread, it looks like someone's already done it:

adzenith
 
Posts: 1214
Joined: Mon Oct 19, 2009 9:12 pm

Re: Auto-resizing Columns

Postby Cydonia on Sun Jul 07, 2013 7:35 am

Good stuff. I can verify that this works great. Personally, I don't find it annoying at all.
Cydonia
 
Posts: 4
Joined: Fri Jun 21, 2013 9:04 am


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 3 guests