FROM : glenn andreas
DATE : Mon Feb 18 18:39:45 2008
On Feb 18, 2008, at 11:22 AM, Daniel Jalkut wrote:
> On Feb 18, 2008, at 10:23 AM, glenn andreas wrote:
>
>> The significantly easier way is to use:
>>
>> [window setContentAspectRatio: 1.0];
>>
>> (Available from 10.3 on)
>
> I think the aspect ratio setting is not enforced precisely enough or
> in enough cases. I've had trouble with it not always working. If I
> remember correctly it has shortcomings when it comes to zooming a
> window, and perhaps is ignored when setting the frame programatically.
>
I've not seen that personally, though setAspectRatio suffers from such
a fate (since it includes the title bar in the aspect ratio, making it
basically useless).
>
> I can't remember all the reasons, but in my crossword solving
> application it's important to keep the window a size that allows the
> puzzle grid to be an even pixel multiple. I ended up enforcing it in
> windowWillResize and windowWillUseStandardFrame.
>
> Daniel
Since you needed pixel multiples, you'd also need to use
setContentResizeIncrements:
There may be a bug that the zooming doesn't use
setContentResizeIncrements (I've never needed that functionality) but
from what I remember, setAspectRatio worked fine with zooming.
Glenn Andreas <email_removed>
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build,
mutate, evolve, animate
DATE : Mon Feb 18 18:39:45 2008
On Feb 18, 2008, at 11:22 AM, Daniel Jalkut wrote:
> On Feb 18, 2008, at 10:23 AM, glenn andreas wrote:
>
>> The significantly easier way is to use:
>>
>> [window setContentAspectRatio: 1.0];
>>
>> (Available from 10.3 on)
>
> I think the aspect ratio setting is not enforced precisely enough or
> in enough cases. I've had trouble with it not always working. If I
> remember correctly it has shortcomings when it comes to zooming a
> window, and perhaps is ignored when setting the frame programatically.
>
I've not seen that personally, though setAspectRatio suffers from such
a fate (since it includes the title bar in the aspect ratio, making it
basically useless).
>
> I can't remember all the reasons, but in my crossword solving
> application it's important to keep the window a size that allows the
> puzzle grid to be an even pixel multiple. I ended up enforcing it in
> windowWillResize and windowWillUseStandardFrame.
>
> Daniel
Since you needed pixel multiples, you'd also need to use
setContentResizeIncrements:
There may be a bug that the zooming doesn't use
setContentResizeIncrements (I've never needed that functionality) but
from what I remember, setAspectRatio worked fine with zooming.
Glenn Andreas <email_removed>
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build,
mutate, evolve, animate
| Related mails | Author | Date |
|---|---|---|
| Aaron MacDonald | Feb 17, 16:44 | |
| j o a r | Feb 17, 18:21 | |
| Jens Alfke | Feb 17, 23:52 | |
| Aaron MacDonald | Feb 18, 04:20 | |
| j o a r | Feb 18, 04:36 | |
| Jens Alfke | Feb 18, 05:48 | |
| glenn andreas | Feb 18, 16:23 | |
| Daniel Jalkut | Feb 18, 18:22 | |
| glenn andreas | Feb 18, 18:39 | |
| j o a r | Feb 18, 18:49 |






Cocoa mail archive

