1. Make sure we initialize desired chat bar width before using it.
2. Don't attempt shrinking chat bar by negative amount of pixels
(i.e. effectively extending it). This change may be irrelevant
to the bug I'm fixing, but won't hurt anyway.
Fixing a regression introduced in tier 1: not displaying the bottom tray buttons
added when bottom tray was not wide enough display them, even after increasing
the width to show all visible buttons.
The fix is to mark such buttons as auto-hidden so that they appear
as soon as we have enough free space.
When user manually toggles a button (via context menu),
show it regardless of whether it has been auto-hidden.
Tech note:
Added showButton() method which does the same as processShowButton() did
but the check for the button being auto-hidden.
* When there is some free space and all auto-hidden buttons have been already shown,
first extend the Speak button, then the others (was: vice versa).
* Made the Speak button always have fixed width.
- To decrease code duplication:
* Added RS_BUTTON_SPEAK to the button->panel mapping (mStateProcessedObjectMap).
* Replaces all lookups in mStateProcessedObjectMap with calls to getButtonPanel().
- Added some comments.
Cumulative diff of changes made by Wolfpup, Richard and me.
Description:
* Ability to hide the Speak button with the bottom tray context menu.
* Made the chat input resize handle visible, so that the feature is easily discoverable.
* Applied Richard's fix to layout panel resizing logic.
Bug was caused by counting only width added by last resize as usable for Speak button extending, so widening viewer window by few pixels many times when Speak is shrink would never let it expand regardless of available space.
- Added check for possible chiclet panel shrinking width- cause spare space goes to it when extending. If there is enough space to give from chiclets to Speak, Speak is extended.
The bug was caused by moving nearby chat bar into panel inside layout panel instead of being layout panel itself in changeset 741eb25e921c without modifying get_panel_min_width() call which used that layout panel. This broke behaviour of LLBottomTray::processWidthDecreased().
- Fixed it by using this new nearby chat container layout panel in this call.