[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #25236] NSToolbar: Window doesn't resize window when toolbar is
From: |
Richard Frith-Macdonald |
Subject: |
Re: [bug #25236] NSToolbar: Window doesn't resize window when toolbar is added. |
Date: |
Tue, 6 Jan 2009 08:32:44 +0000 |
On 6 Jan 2009, at 08:10, Fred Kiefer wrote:
We also need a more general mechanism to add new subviews to the
decoration
view. What about a subclass of NSView that knows about orientation
(the border
of the window the subview will be belong to) and priority (to allow
multiple
subviews on the same border, eg menu and toolbar at the top). That
subclass
will need a layout method that gets the current (or better the
remaining)
window content size and will return the size needed for the specific
view.
This will require a lot of interesting code on decoration view and I
currently
don't have the time for it :-)
I'm not sure about the need for general purpose addition ... perhaps a
specialised view would be simpler to code and maintain.
I haven't looked at the code at all, so please forgive me if this
makes no sense in that context but ...
eg. We simply have a view with seven ivars:
leftBorder,rightBorder,topBorder,bottomBorder,menuView,toolbarView,
contentView
We assume that the top and bottom borders (if present) are always
tiled to the edges and are constant height during a window resize.
We assume that the left and right borders (if present) are always
tiled to the sides of the screen and to the top/bottom borders.
We assume that the menu is variable width (touches the side borders)
and a fixed position relative to the top of the window.
We assume the same about the toolbar view.
We assume that the content view fills the space in the middle ... so
it is fixed relative to the edges of the decoration view.
Now, the normal autoresizing rules will handle that setup with no need
for intervention when the window is resized, so all we have to do is
provide an api to add/remove these views setting the appropriate ivar,
and code to re-tile according to those simple rules when any one of
the views is added or removed.
Did I miss something?
- [bug #25236] NSToolbar: Latest changes don't resize window properly when toolbar is added., (continued)
- [bug #25236] NSToolbar: Latest changes don't resize window properly when toolbar is added., Gregory John Casamento, 2009/01/02
- [bug #25236] NSToolbar: Window doesn't resize window when toolbar is added., Gregory John Casamento, 2009/01/02
- [bug #25236] NSToolbar: Window doesn't resize window when toolbar is added., Fred Kiefer, 2009/01/03
- [bug #25236] NSToolbar: Window doesn't resize window when toolbar is added., Richard Frith-Macdonald, 2009/01/03
- [bug #25236] NSToolbar: Window doesn't resize window when toolbar is added., Gregory John Casamento, 2009/01/03
- [bug #25236] NSToolbar: Window doesn't resize window when toolbar is added., Gregory John Casamento, 2009/01/03
- [bug #25236] NSToolbar: Window doesn't resize window when toolbar is added., Fred Kiefer, 2009/01/03
- [bug #25236] NSToolbar: Window doesn't resize window when toolbar is added., Richard Frith-Macdonald, 2009/01/03
- [bug #25236] NSToolbar: Window doesn't resize window when toolbar is added., Fred Kiefer, 2009/01/03
- [bug #25236] NSToolbar: Window doesn't resize window when toolbar is added., Fred Kiefer, 2009/01/06
- Re: [bug #25236] NSToolbar: Window doesn't resize window when toolbar is added.,
Richard Frith-Macdonald <=