Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added code for incremental sizing #32

Closed
wants to merge 8 commits into from

Conversation

chriscrowe
Copy link
Contributor

Right now it changes in increments of 1/12th of the screen (we could eventually make this user configurable). This uses only 2 hotkeys for increase and decrease-- it recognizes which side of the screen the window is touching and it will expand and contract away from that side.

I believe there might be a bug with incremental sizing on secondary monitors but I haven't been able to test this thoroughly.

@fikovnik
Copy link
Owner

Thanks! Good idea the anchored resizing. I integrated the code into the increase-reduce branch. Please have a look at 3b432e8 and 2b47863. The former is a slight modification of your original code - just to make things simple. The latter builds on the same idea, but it does not need to store what was the last action executed. What do you think?

The next whole week I do not have an access to external screen, so I won't be making any release.

@chriscrowe
Copy link
Contributor Author

Looks good to me. Though this math is making my brain tie itself into a knot:

EqualWithVicinity(a,b,e) ((a) >= ((b) - (e)) && (a) <= ((b) + (e)))
EqualPoints(p1,x1,y1,e) (EqualWithVicinity(((p1).x), (x1), (e)) && EqualWithVicinity(((p1).y), (y1), (e)))

I'm just gonna have to trust that it's correct-- hahaha

@chriscrowe
Copy link
Contributor Author

Wow I just noticed you added support for incremental sizing when the window is pushed to the corners of the screen. Nice touch!

@chriscrowe
Copy link
Contributor Author

I have just tested your new code structure for incremental sizing with 2 displays and it appears that the old bug has been fixed. Nice work ;)

@fikovnik
Copy link
Owner

fikovnik commented Feb 2, 2011

There is one more thing I need to do - properly readjust apps like terminal so they are well anchored. I will then ask you to take it for a spin and then if works ok I'll make a new release. Btw: really good idea with this way of resizing windows!

@fikovnik
Copy link
Owner

fikovnik commented Feb 6, 2011

The code is in increse-reduce branch. Can you please give it a try to see if it works well. I also add some preferences into the preferences dialog - a new tab. Not sure whether it is the best way how to present it,any comments are welcomed :)

@chriscrowe
Copy link
Contributor Author

I love it :)

Although I seem to be getting more desirable behavior after disabling the "margins" that you added for anchoring the window. With margins enabled, some windows would anchor to the opposing side if you expanded too far.

Otherwise, works great! I'll test it with multiple monitors at work tomorrow.

@fikovnik
Copy link
Owner

fikovnik commented Feb 6, 2011

I also have a bit of mixed feelings about the margins. The fact that the window would eventually anchor to the opposing side is actually correct (whether it does any good is another question :) ). When a window is in a margin zone its kind of locked. I added this mostly to fix the problem with terminal and other non-continuosly sizing apps. Perhaps it should be disabled by default?

@chriscrowe
Copy link
Contributor Author

I think I prefer it without the margins... Even on apps like the Terminal. Perhaps you should disable it by default.

@fikovnik
Copy link
Owner

fikovnik commented Feb 7, 2011

You are right. I will disable it by default.

@ghost ghost assigned fikovnik May 27, 2011
@fikovnik fikovnik closed this Dec 1, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants