YesNoOk
avatar

Avatar layouting (Read 4105 times)

Started by Nightwish, November 15, 2004, 18:13:48

0 Members and 1 Guest are viewing this.
#1
Avatar layouting |
November 15, 2004, 18:13:48
I think, I have finally finished the dynamic avatar resizing. It is now smart enough to make best use of the available screenspace without disturbing the dialog layout, regardless how small or how large the avatar image is.

Basicall, it uses 2 different layouts - you probably already know them from the static layout, because they are available as two different alignment options (align for maximum log size and align for full width button bar).

 This is layout "1" - it is used by default and allows the avatar to take space from the button bar. The problem with this layout is that it may crush the button bar if the avatar gets too large (in the case you raise the splitter). Buttons may disappear because of this, and I consider this an ugly behaviour.


 This is layout "2" - The "smart" resizing code uses it whenever the avatars width becomes too large to fit into layout 1 without disturbing the button bar layout. This layout will result in a smaller avatar (assuming the same splitter position), but the button bar will stay intact. The code is smart enough to recalculate the layout whenever you move the splitter or resize the window. It also automatically calculates the space requirements of the button bar, depending on which elements are visible on it. Hiding the send button for example gives you about 40 pixels more horizontal space for the avatar using layout "1".


This code is only available when using the "dynamic avatar resizing" which has been added recently. The old behaviour of having the avatar at a fixed size is still available though. The dynamic avatar resizing also helps with a global splitter position, because the avatar will never have an impact on the window splitter at all (splitter position is enforced).

Because the dynamic resizing can almost never screw up the window layout, avatar limits have been raised to 1024x768 pixels when using dynamic resizing

All this stuff will be available in the next build - the current released build contains dynamic resizing, but not the "smart" resizing code which will contantly watch the dimensions of the avatar, the message window and the button bar to adjust the layout accordingly.

There is also an addidtional safety check - the avatar may not use more than 80% of the horizontal window width, otherwise it might end up with an invisible message input area, which wouldn't exactly be helpful :)

Normally, the apect ratio of the picture is preserved, but this safety check will hard-limit the width of the avatar and thus might screw up the aspect ratio of the avatar picture.

__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
#2
Avatar layouting |
November 15, 2004, 18:58:52
That's awesome. :-)

Thanks and I'll be looking forward to testing!
#3
Avatar layouting |
November 15, 2004, 20:29:19
Hi Nightwish,

thx for this feature. Hey, your Iconset is better as the iconset in the zip-file ;)

greez
mdg-webmaster
#4
Avatar layouting |
November 16, 2004, 11:22:52
Hey Nightwish, where can we finde such a nice iconset as yours...? :D
#5
Avatar layouting |
November 16, 2004, 13:55:48
"nowotny" said:
Hey Nightwish, where can we finde such a nice iconset as yours...? :D
I'am using the Qute icons.

They are not OpenSource or in the public domain, so I cannot distribute them or use them for the default icon pack.
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork