summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llslider.cpp134
-rw-r--r--indra/llui/llslider.h21
-rw-r--r--indra/newview/app_settings/settings.xml4
-rw-r--r--indra/newview/llagent.cpp4
-rw-r--r--indra/newview/llavatarlistitem.cpp15
-rw-r--r--indra/newview/llavatarlistitem.h2
-rw-r--r--indra/newview/llbottomtray.cpp264
-rw-r--r--indra/newview/llbottomtray.h2
-rw-r--r--indra/newview/llchathistory.cpp12
-rw-r--r--indra/newview/llchiclet.cpp52
-rw-r--r--indra/newview/llfloatercamera.cpp92
-rw-r--r--indra/newview/llfloatercamera.h3
-rw-r--r--indra/newview/llimfloater.cpp3
-rw-r--r--indra/newview/llimview.cpp6
-rw-r--r--indra/newview/llnearbychathandler.cpp2
-rw-r--r--indra/newview/llparticipantlist.cpp2
-rw-r--r--indra/newview/llscreenchannel.cpp28
-rw-r--r--indra/newview/llscreenchannel.h7
-rw-r--r--indra/newview/llsyswellwindow.cpp9
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml69
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_slider.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_activeim_row.xml42
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_toast.xml28
-rw-r--r--indra/newview/skins/default/xui/en/widgets/slider_bar.xml8
26 files changed, 549 insertions, 272 deletions
diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp
index f86776384a..da2fc7c68b 100644
--- a/indra/llui/llslider.cpp
+++ b/indra/llui/llslider.cpp
@@ -47,14 +47,17 @@ static LLDefaultChildRegistry::Register<LLSlider> r1("slider_bar");
// have ambigious template lookup problem
LLSlider::Params::Params()
-: track_color("track_color"),
+: orientation ("orientation", std::string ("horizontal")),
+ track_color("track_color"),
thumb_outline_color("thumb_outline_color"),
thumb_center_color("thumb_center_color"),
thumb_image("thumb_image"),
thumb_image_pressed("thumb_image_pressed"),
thumb_image_disabled("thumb_image_disabled"),
- track_image("track_image"),
- track_highlight_image("track_highlight_image"),
+ track_image_horizontal("track_image_horizontal"),
+ track_image_vertical("track_image_vertical"),
+ track_highlight_horizontal_image("track_highlight_horizontal_image"),
+ track_highlight_vertical_image("track_highlight_vertical_image"),
mouse_down_callback("mouse_down_callback"),
mouse_up_callback("mouse_up_callback")
{
@@ -64,14 +67,17 @@ LLSlider::Params::Params()
LLSlider::LLSlider(const LLSlider::Params& p)
: LLF32UICtrl(p),
mMouseOffset( 0 ),
+ mOrientation ((p.orientation() == "horizontal") ? HORIZONTAL : VERTICAL),
mTrackColor(p.track_color()),
mThumbOutlineColor(p.thumb_outline_color()),
mThumbCenterColor(p.thumb_center_color()),
mThumbImage(p.thumb_image),
mThumbImagePressed(p.thumb_image_pressed),
mThumbImageDisabled(p.thumb_image_disabled),
- mTrackImage(p.track_image),
- mTrackHighlightImage(p.track_highlight_image)
+ mTrackImageHorizontal(p.track_image_horizontal),
+ mTrackImageVertical(p.track_image_vertical),
+ mTrackHighlightHorizontalImage(p.track_highlight_horizontal_image),
+ mTrackHighlightVerticalImage(p.track_highlight_vertical_image)
{
mViewModel->setValue(p.initial_value);
updateThumbRect();
@@ -111,14 +117,29 @@ void LLSlider::updateThumbRect()
S32 thumb_width = mThumbImage ? mThumbImage->getWidth() : DEFAULT_THUMB_SIZE;
S32 thumb_height = mThumbImage ? mThumbImage->getHeight() : DEFAULT_THUMB_SIZE;
- S32 left_edge = (thumb_width / 2);
- S32 right_edge = getRect().getWidth() - (thumb_width / 2);
-
- S32 x = left_edge + S32( t * (right_edge - left_edge) );
- mThumbRect.mLeft = x - (thumb_width / 2);
- mThumbRect.mRight = mThumbRect.mLeft + thumb_width;
- mThumbRect.mBottom = getLocalRect().getCenterY() - (thumb_height / 2);
- mThumbRect.mTop = mThumbRect.mBottom + thumb_height;
+
+ if ( mOrientation == HORIZONTAL )
+ {
+ S32 left_edge = (thumb_width / 2);
+ S32 right_edge = getRect().getWidth() - (thumb_width / 2);
+
+ S32 x = left_edge + S32( t * (right_edge - left_edge) );
+ mThumbRect.mLeft = x - (thumb_width / 2);
+ mThumbRect.mRight = mThumbRect.mLeft + thumb_width;
+ mThumbRect.mBottom = getLocalRect().getCenterY() - (thumb_height / 2);
+ mThumbRect.mTop = mThumbRect.mBottom + thumb_height;
+ }
+ else
+ {
+ S32 top_edge = (thumb_height / 2);
+ S32 bottom_edge = getRect().getHeight() - (thumb_height / 2);
+
+ S32 y = top_edge + S32( t * (bottom_edge - top_edge) );
+ mThumbRect.mLeft = getLocalRect().getCenterX() - (thumb_width / 2);
+ mThumbRect.mRight = mThumbRect.mLeft + thumb_width;
+ mThumbRect.mBottom = y - (thumb_height / 2);
+ mThumbRect.mTop = mThumbRect.mBottom + thumb_height;
+ }
}
@@ -138,18 +159,32 @@ BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask)
{
if( hasMouseCapture() )
{
- S32 thumb_half_width = mThumbImage->getWidth()/2;
- S32 left_edge = thumb_half_width;
- S32 right_edge = getRect().getWidth() - (thumb_half_width);
+ if ( mOrientation == HORIZONTAL )
+ {
+ S32 thumb_half_width = mThumbImage->getWidth()/2;
+ S32 left_edge = thumb_half_width;
+ S32 right_edge = getRect().getWidth() - (thumb_half_width);
- x += mMouseOffset;
- x = llclamp( x, left_edge, right_edge );
+ x += mMouseOffset;
+ x = llclamp( x, left_edge, right_edge );
- F32 t = F32(x - left_edge) / (right_edge - left_edge);
- setValueAndCommit(t * (mMaxValue - mMinValue) + mMinValue );
+ F32 t = F32(x - left_edge) / (right_edge - left_edge);
+ setValueAndCommit(t * (mMaxValue - mMinValue) + mMinValue );
+ }
+ else // mOrientation == VERTICAL
+ {
+ S32 thumb_half_height = mThumbImage->getHeight()/2;
+ S32 top_edge = thumb_half_height;
+ S32 bottom_edge = getRect().getHeight() - (thumb_half_height);
+
+ y += mMouseOffset;
+ y = llclamp(y, top_edge, bottom_edge);
+ F32 t = F32(y - top_edge) / (bottom_edge - top_edge);
+ setValueAndCommit(t * (mMaxValue - mMinValue) + mMinValue );
+ }
getWindow()->setCursor(UI_CURSOR_ARROW);
- lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl;
+ lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl;
}
else
{
@@ -198,7 +233,9 @@ BOOL LLSlider::handleMouseDown(S32 x, S32 y, MASK mask)
// Find the offset of the actual mouse location from the center of the thumb.
if (mThumbRect.pointInRect(x,y))
{
- mMouseOffset = (mThumbRect.mLeft + mThumbImage->getWidth()/2) - x;
+ mMouseOffset = (mOrientation == HORIZONTAL)
+ ? (mThumbRect.mLeft + mThumbImage->getWidth()/2) - x
+ : (mThumbRect.mBottom + mThumbImage->getHeight()/2) - y;
}
else
{
@@ -220,15 +257,12 @@ BOOL LLSlider::handleKeyHere(KEY key, MASK mask)
BOOL handled = FALSE;
switch(key)
{
- case KEY_UP:
case KEY_DOWN:
- // eat up and down keys to be consistent
- handled = TRUE;
- break;
case KEY_LEFT:
setValueAndCommit(getValueF32() - getIncrement());
handled = TRUE;
break;
+ case KEY_UP:
case KEY_RIGHT:
setValueAndCommit(getValueF32() + getIncrement());
handled = TRUE;
@@ -239,6 +273,17 @@ BOOL LLSlider::handleKeyHere(KEY key, MASK mask)
return handled;
}
+BOOL LLSlider::handleScrollWheel(S32 x, S32 y, S32 clicks)
+{
+ if ( mOrientation == VERTICAL )
+ {
+ F32 new_val = getValueF32() - clicks * getIncrement();
+ setValueAndCommit(new_val);
+ return TRUE;
+ }
+ return LLF32UICtrl::handleScrollWheel(x,y,clicks);
+}
+
void LLSlider::draw()
{
F32 alpha = getDrawContext().mAlpha;
@@ -252,13 +297,36 @@ void LLSlider::draw()
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
// Track
- LLRect track_rect(mThumbImage->getWidth() / 2,
- getLocalRect().getCenterY() + (mTrackImage->getHeight() / 2),
- getRect().getWidth() - mThumbImage->getWidth() / 2,
- getLocalRect().getCenterY() - (mTrackImage->getHeight() / 2) );
- LLRect highlight_rect(track_rect.mLeft, track_rect.mTop, mThumbRect.getCenterX(), track_rect.mBottom);
- mTrackImage->draw(track_rect, LLColor4::white % alpha);
- mTrackHighlightImage->draw(highlight_rect, LLColor4::white % alpha);
+ LLPointer<LLUIImage>& trackImage = ( mOrientation == HORIZONTAL )
+ ? mTrackImageHorizontal
+ : mTrackImageVertical;
+
+ LLPointer<LLUIImage>& trackHighlightImage = ( mOrientation == HORIZONTAL )
+ ? mTrackHighlightHorizontalImage
+ : mTrackHighlightVerticalImage;
+
+ LLRect track_rect;
+ LLRect highlight_rect;
+
+ if ( mOrientation == HORIZONTAL )
+ {
+ track_rect.set(mThumbImage->getWidth() / 2,
+ getLocalRect().getCenterY() + (trackImage->getHeight() / 2),
+ getRect().getWidth() - mThumbImage->getWidth() / 2,
+ getLocalRect().getCenterY() - (trackImage->getHeight() / 2) );
+ highlight_rect.set(track_rect.mLeft, track_rect.mTop, mThumbRect.getCenterX(), track_rect.mBottom);
+ }
+ else
+ {
+ track_rect.set(getLocalRect().getCenterX() - (trackImage->getWidth() / 2),
+ getRect().getHeight(),
+ getLocalRect().getCenterX() + (trackImage->getWidth() / 2),
+ 0);
+ highlight_rect.set(track_rect.mLeft, track_rect.mTop, track_rect.mRight, track_rect.mBottom);
+ }
+
+ trackImage->draw(track_rect, LLColor4::white % alpha);
+ trackHighlightImage->draw(highlight_rect, LLColor4::white % alpha);
// Thumb
if (hasFocus())
diff --git a/indra/llui/llslider.h b/indra/llui/llslider.h
index e2a94e4d8c..6ab0ed7922 100644
--- a/indra/llui/llslider.h
+++ b/indra/llui/llslider.h
@@ -39,8 +39,12 @@
class LLSlider : public LLF32UICtrl
{
public:
+ enum ORIENTATION { HORIZONTAL, VERTICAL };
+
struct Params : public LLInitParam::Block<Params, LLF32UICtrl::Params>
{
+ Optional<std::string> orientation;
+
Optional<LLUIColor> track_color,
thumb_outline_color,
thumb_center_color;
@@ -48,8 +52,10 @@ public:
Optional<LLUIImage*> thumb_image,
thumb_image_pressed,
thumb_image_disabled,
- track_image,
- track_highlight_image;
+ track_image_horizontal,
+ track_image_vertical,
+ track_highlight_horizontal_image,
+ track_highlight_vertical_image;
Optional<CommitCallbackParam> mouse_down_callback,
mouse_up_callback;
@@ -77,6 +83,7 @@ public:
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleKeyHere(KEY key, MASK mask);
+ virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
virtual void draw();
private:
@@ -90,10 +97,14 @@ private:
LLPointer<LLUIImage> mThumbImage;
LLPointer<LLUIImage> mThumbImagePressed;
LLPointer<LLUIImage> mThumbImageDisabled;
- LLPointer<LLUIImage> mTrackImage;
- LLPointer<LLUIImage> mTrackHighlightImage;
+ LLPointer<LLUIImage> mTrackImageHorizontal;
+ LLPointer<LLUIImage> mTrackImageVertical;
+ LLPointer<LLUIImage> mTrackHighlightHorizontalImage;
+ LLPointer<LLUIImage> mTrackHighlightVerticalImage;
+
+ const ORIENTATION mOrientation;
- LLRect mThumbRect;
+ LLRect mThumbRect;
LLUIColor mTrackColor;
LLUIColor mThumbOutlineColor;
LLUIColor mThumbCenterColor;
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index eb4148f92f..8ad52784d3 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3563,7 +3563,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>400</integer>
+ <integer>305</integer>
</map>
<key>HelpUseLocal</key>
<map>
@@ -4917,7 +4917,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>350</integer>
+ <integer>305</integer>
</map>
<key>NotificationToastLifeTime</key>
<map>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index d2c8558f0b..ca1688ad1f 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3080,10 +3080,6 @@ void LLAgent::updateCamera()
mOrbitLeftKey > 0.f, // right
mOrbitDownKey > 0.f); // bottom
- camera_floater->mZoom->setToggleState(
- mOrbitInKey > 0.f, // top
- mOrbitOutKey > 0.f); // bottom
-
camera_floater->mTrack->setToggleState(
mPanLeftKey > 0.f, // left
mPanUpKey > 0.f, // top
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 7df278d887..c670a65bcc 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -311,3 +311,18 @@ void LLAvatarListItem::onNameCache(const std::string& first_name, const std::str
mAvatarName->setValue(name);
mAvatarName->setToolTip(name);
}
+
+void LLAvatarListItem::reshapeAvatarName()
+{
+ S32 width_delta = 0;
+ width_delta += mShowProfileBtn ? mProfileBtnWidth : 0;
+ width_delta += mSpeakingIndicator->getVisible() ? mSpeakingIndicatorWidth : 0;
+ width_delta += mAvatarIcon->getVisible() ? mIconWidth : 0;
+ width_delta += mShowInfoBtn ? mInfoBtnWidth : 0;
+ width_delta += mLastInteractionTime->getVisible() ? mLastInteractionTime->getRect().getWidth() : 0;
+
+ S32 height = mAvatarName->getRect().getHeight();
+ S32 width = getRect().getWidth() - width_delta;
+
+ mAvatarName->reshape(width, height);
+}
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index d379797a46..9d48101a44 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -82,6 +82,8 @@ public:
void setContextMenu(ContextMenu* menu) { mContextMenu = menu; }
+ void reshapeAvatarName();
+
private:
typedef enum e_online_status {
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index ab685b69ad..8d57c68cf2 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -261,22 +261,22 @@ void LLBottomTray::showBottomTrayContextMenu(S32 x, S32 y, MASK mask)
void LLBottomTray::showGestureButton(BOOL visible)
{
- mGesturePanel->setVisible(visible);
+ showTrayButton(RS_BUTTON_GESTURES, visible);
}
void LLBottomTray::showMoveButton(BOOL visible)
{
- mMovementPanel->setVisible(visible);
+ showTrayButton(RS_BUTTON_MOVEMENT, visible);
}
void LLBottomTray::showCameraButton(BOOL visible)
{
- mCamPanel->setVisible(visible);
+ showTrayButton(RS_BUTTON_CAMERA, visible);
}
void LLBottomTray::showSnapshotButton(BOOL visible)
{
- mSnapshotPanel->setVisible(visible);
+ showTrayButton(RS_BUTTON_SNAPSHOT, visible);
}
namespace
@@ -401,8 +401,6 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent)
void LLBottomTray::updateResizeState(S32 new_width, S32 cur_width)
{
mResizeState = RS_NORESIZE;
- MASK compensative_view_item_mask = RS_CHATBAR_INPUT;
- LLPanel* compansative_view = mNearbyChatBar;
S32 delta_width = new_width - cur_width;
// if (delta_width == 0) return;
@@ -422,153 +420,113 @@ void LLBottomTray::updateResizeState(S32 new_width, S32 cur_width)
<< ", chiclet_panel_min_width: " << chiclet_panel_min_width
<< llendl;
- bool still_should_be_processed = true;
// bottom tray is narrowed
if (shrink)
{
- S32 compensative_delta_width = 0;
- if (chiclet_panel_width > chiclet_panel_min_width)
- {
- // we have some space to decrease chiclet panel
- S32 panel_delta_min = chiclet_panel_width - chiclet_panel_min_width;
- mResizeState |= RS_CHICLET_PANEL;
-
- S32 delta_panel = llmin(-delta_width, panel_delta_min);
+ processWidthDecreased(delta_width);
+ }
+ // bottom tray is widen
+ else
+ {
+ processWidthIncreased(delta_width);
+ }
- lldebugs << "delta_width: " << delta_width
- << ", panel_delta_min: " << panel_delta_min
- << ", delta_panel: " << delta_panel
- << llendl;
+ lldebugs << "New resize state: " << mResizeState << llendl;
+}
- // is chiclet panel width enough to process resizing?
- delta_width += panel_delta_min;
+void LLBottomTray::processWidthDecreased(S32 delta_width)
+{
+ bool still_should_be_processed = true;
- still_should_be_processed = delta_width < 0;
+ const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth();
+ const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth();
- mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - delta_panel, mChicletPanel->getParent()->getRect().getHeight());
- log(mChicletPanel, "after processing panel decreasing via chiclet panel");
+ if (chiclet_panel_width > chiclet_panel_min_width)
+ {
+ // we have some space to decrease chiclet panel
+ S32 panel_delta_min = chiclet_panel_width - chiclet_panel_min_width;
+ mResizeState |= RS_CHICLET_PANEL;
- lldebugs << "RS_CHICLET_PANEL"
- << ", delta_width: " << delta_width
- << llendl;
- }
-
- if (still_should_be_processed && chatbar_panel_width > chatbar_panel_min_width)
- {
- // we have some space to decrease chatbar panel
- S32 panel_delta_min = chatbar_panel_width - chatbar_panel_min_width;
- mResizeState |= RS_CHATBAR_INPUT;
+ S32 delta_panel = llmin(-delta_width, panel_delta_min);
- S32 delta_panel = llmin(-delta_width, panel_delta_min);
+ lldebugs << "delta_width: " << delta_width
+ << ", panel_delta_min: " << panel_delta_min
+ << ", delta_panel: " << delta_panel
+ << llendl;
- // is chatbar panel width enough to process resizing?
- delta_width += panel_delta_min;
-
+ // is chiclet panel width enough to process resizing?
+ delta_width += panel_delta_min;
- still_should_be_processed = delta_width < 0;
+ still_should_be_processed = delta_width < 0;
- mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mNearbyChatBar->getRect().getHeight());
+ mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - delta_panel, mChicletPanel->getParent()->getRect().getHeight());
+ log(mChicletPanel, "after processing panel decreasing via chiclet panel");
- lldebugs << "RS_CHATBAR_INPUT"
- << ", delta_panel: " << delta_panel
- << ", delta_width: " << delta_width
- << llendl;
+ lldebugs << "RS_CHICLET_PANEL"
+ << ", delta_width: " << delta_width
+ << llendl;
+ }
- log(mChicletPanel, "after nearby was processed");
+ const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth();
+ const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth();
+ if (still_should_be_processed && chatbar_panel_width > chatbar_panel_min_width)
+ {
+ // we have some space to decrease chatbar panel
+ S32 panel_delta_min = chatbar_panel_width - chatbar_panel_min_width;
+ mResizeState |= RS_CHATBAR_INPUT;
- }
- if (still_should_be_processed)
- {
- mResizeState |= compensative_view_item_mask;
+ S32 delta_panel = llmin(-delta_width, panel_delta_min);
- if (mSnapshotPanel->getVisible())
- {
- mResizeState |= RS_BUTTON_SNAPSHOT;
- delta_width += mSnapshotPanel->getRect().getWidth();
-
- if (delta_width > 0)
- {
- compensative_delta_width += delta_width;
- }
- lldebugs << "RS_BUTTON_SNAPSHOT"
- << ", compensative_delta_width: " << compensative_delta_width
- << ", delta_width: " << delta_width
- << llendl;
- showSnapshotButton(false);
- }
+ // is chatbar panel width enough to process resizing?
+ delta_width += panel_delta_min;
- if (delta_width < 0 && mCamPanel->getVisible())
- {
- mResizeState |= RS_BUTTON_CAMERA;
- delta_width += mCamPanel->getRect().getWidth();
- if (delta_width > 0)
- {
- compensative_delta_width += delta_width;
- }
- lldebugs << "RS_BUTTON_CAMERA"
- << ", compensative_delta_width: " << compensative_delta_width
- << ", delta_width: " << delta_width
- << llendl;
- showCameraButton(false);
- }
- if (delta_width < 0 && mMovementPanel->getVisible())
- {
- mResizeState |= RS_BUTTON_MOVEMENT;
- delta_width += mMovementPanel->getRect().getWidth();
- if (delta_width > 0)
- {
- compensative_delta_width += delta_width;
- }
- lldebugs << "RS_BUTTON_MOVEMENT"
- << ", compensative_delta_width: " << compensative_delta_width
- << ", delta_width: " << delta_width
- << llendl;
- showMoveButton(false);
- }
+ still_should_be_processed = delta_width < 0;
- if (delta_width < 0 && mGesturePanel->getVisible())
- {
- mResizeState |= RS_BUTTON_GESTURES;
- delta_width += mGesturePanel->getRect().getWidth();
- if (delta_width > 0)
- {
- compensative_delta_width += delta_width;
- }
- lldebugs << "RS_BUTTON_GESTURES"
- << ", compensative_delta_width: " << compensative_delta_width
- << ", delta_width: " << delta_width
- << llendl;
- showGestureButton(false);
- }
+ mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mNearbyChatBar->getRect().getHeight());
- if (delta_width < 0)
- {
- llwarns << "WARNING: there is no enough room for bottom tray, resizing still should be processed" << llendl;
- }
+ lldebugs << "RS_CHATBAR_INPUT"
+ << ", delta_panel: " << delta_panel
+ << ", delta_width: " << delta_width
+ << llendl;
- if (compensative_delta_width != 0)
- {
- if (compansative_view) log(compansative_view, "before applying compensative width: ");
- compansative_view->reshape(compansative_view->getRect().getWidth() + compensative_delta_width, compansative_view->getRect().getHeight() );
- if (compansative_view) log(compansative_view, "after applying compensative width: ");
- lldebugs << compensative_delta_width << llendl;
+ log(mChicletPanel, "after nearby was processed");
- }
- }
}
- // bottom tray is widen
- else
+
+ S32 buttons_freed_width = 0;
+ if (still_should_be_processed)
{
- processWidthIncreased(delta_width);
- }
+ processHideButton(RS_BUTTON_SNAPSHOT, &delta_width, &buttons_freed_width);
- lldebugs << "New resize state: " << mResizeState << llendl;
-}
+ if (delta_width < 0)
+ {
+ processHideButton(RS_BUTTON_CAMERA, &delta_width, &buttons_freed_width);
+ }
-void LLBottomTray::processWidthDecreased(S32 delta_width)
-{
+ if (delta_width < 0)
+ {
+ processHideButton(RS_BUTTON_MOVEMENT, &delta_width, &buttons_freed_width);
+ }
+ if (delta_width < 0)
+ {
+ processHideButton(RS_BUTTON_GESTURES, &delta_width, &buttons_freed_width);
+ }
+
+ if (delta_width < 0)
+ {
+ llwarns << "WARNING: there is no enough room for bottom tray, resizing still should be processed" << llendl;
+ }
+
+ if (buttons_freed_width > 0)
+ {
+ log(mNearbyChatBar, "before applying compensative width");
+ mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() + buttons_freed_width, mNearbyChatBar->getRect().getHeight() );
+ log(mNearbyChatBar, "after applying compensative width");
+ lldebugs << buttons_freed_width << llendl;
+ }
+ }
}
void LLBottomTray::processWidthIncreased(S32 delta_width)
@@ -627,9 +585,9 @@ void LLBottomTray::processWidthIncreased(S32 delta_width)
chatbar_shrink_width = chatbar_available_shrink_width;
}
- log(mNearbyChatBar, "increase width: before applying compensative width: ");
+ log(mNearbyChatBar, "increase width: before applying compensative width");
mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - chatbar_shrink_width, mNearbyChatBar->getRect().getHeight() );
- if (mNearbyChatBar) log(mNearbyChatBar, "after applying compensative width: ");
+ if (mNearbyChatBar) log(mNearbyChatBar, "after applying compensative width");
lldebugs << chatbar_shrink_width << llendl;
// 3. use width available via decreasing of chiclet panel
@@ -678,24 +636,42 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa
*available_width -= required_width;
*buttons_required_width += required_width;
- switch (shown_object_type)
- {
- case RS_BUTTON_GESTURES: showGestureButton(true); break;
- case RS_BUTTON_MOVEMENT: showMoveButton(true); break;
- case RS_BUTTON_CAMERA: showCameraButton(true); break;
- case RS_BUTTON_SNAPSHOT: showSnapshotButton(true); break;
- default:
- llwarns << "Unexpected type of button to be shown: " << shown_object_type << llendl;
- }
+ showTrayButton(shown_object_type, true);
lldebugs << "processing object type: " << shown_object_type
- << ", buttons_required_width: " << buttons_required_width
+ << ", buttons_required_width: " << *buttons_required_width
<< llendl;
}
}
return can_be_shown;
}
+void LLBottomTray::processHideButton(EResizeState shown_object_type, S32* required_width, S32* buttons_freed_width)
+{
+ LLPanel* panel = mStateProcessedObjectMap[shown_object_type];
+ if (NULL == panel)
+ {
+ lldebugs << "There is no object to process for state: " << shown_object_type << llendl;
+ return;
+ }
+
+ if (panel->getVisible())
+ {
+ *required_width += panel->getRect().getWidth();
+
+ if (*required_width > 0)
+ {
+ *buttons_freed_width += *required_width;
+ }
+
+ showTrayButton(shown_object_type, false);
+
+ lldebugs << "processing object type: " << shown_object_type
+ << ", buttons_freed_width: " << *buttons_freed_width
+ << llendl;
+ }
+}
+
bool LLBottomTray::canButtonBeShown(LLPanel* panel) const
{
bool can_be_shown = !panel->getVisible();
@@ -713,4 +689,16 @@ void LLBottomTray::initStateProcessedObjectMap()
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, mCamPanel));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, mSnapshotPanel));
}
+
+void LLBottomTray::showTrayButton(EResizeState shown_object_type, bool visible)
+{
+ LLPanel* panel = mStateProcessedObjectMap[shown_object_type];
+ if (NULL == panel)
+ {
+ lldebugs << "There is no object to show for state: " << shown_object_type << llendl;
+ return;
+ }
+
+ panel->setVisible(visible);
+}
//EOF
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index c88bdeda1c..3847168ae1 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -107,8 +107,10 @@ private:
void processWidthIncreased(S32 delta_width);
void log(LLView* panel, const std::string& descr);
bool processShowButton(EResizeState shown_object_type, S32* available_width, S32* buttons_required_width);
+ void processHideButton(EResizeState shown_object_type, S32* required_width, S32* buttons_freed_width);
bool canButtonBeShown(LLPanel* panel) const;
void initStateProcessedObjectMap();
+ void showTrayButton(EResizeState shown_object_type, bool visible);
MASK mResizeState;
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index d1922cfd6e..046e1d92dc 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -131,7 +131,7 @@ public:
menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mPopupMenuHandleObject = menu->getHandle();
- setMouseDownCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4));
+ setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4));
return LLPanel::postBuild();
}
@@ -167,7 +167,15 @@ public:
void onHeaderPanelClick(S32 x, S32 y, MASK mask)
{
- LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", mAvatarID));
+ if (mSourceType == CHAT_SOURCE_OBJECT)
+ {
+ LLFloaterReg::showInstance("inspect_object", LLSD().insert("object_id", mAvatarID));
+ }
+ else if (mSourceType == CHAT_SOURCE_AGENT)
+ {
+ LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", mAvatarID));
+ }
+ //if chat source is system, you may add "else" here to define behaviour.
}
const LLUUID& getAvatarId () const { return mAvatarID;}
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index b919195fb2..fd86192650 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -54,10 +54,12 @@ static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel");
static LLDefaultChildRegistry::Register<LLNotificationChiclet> t2("chiclet_notification");
static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t3("chiclet_im_p2p");
static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t4("chiclet_im_group");
+static LLDefaultChildRegistry::Register<LLAdHocChiclet> t5("chiclet_im_adhoc");
static const LLRect CHICLET_RECT(0, 25, 25, 0);
-static const LLRect CHICLET_ICON_RECT(0, 24, 24, 0);
+static const LLRect CHICLET_ICON_RECT(0, 22, 22, 0);
static const LLRect VOICE_INDICATOR_RECT(25, 25, 45, 0);
+static const S32 OVERLAY_ICON_SHIFT = 2; // used for shifting of an overlay icon for new massages in a chiclet
// static
const S32 LLChicletPanel::s_scroll_ratio = 10;
@@ -217,13 +219,15 @@ LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p)
icon_params.visible = false;
icon_params.image = LLUI::getUIImage(p.new_messages_icon_name);
mNewMessagesIcon = LLUICtrlFactory::create<LLIconCtrl>(icon_params);
+ addChild(mNewMessagesIcon);
+
// adjust size and position of an icon
LLRect chiclet_rect = p.rect;
- LLRect overlay_icon_rect = LLRect(chiclet_rect.getWidth()/2, chiclet_rect.mTop, chiclet_rect.mRight, chiclet_rect.getHeight()/2);
- // shift an icon a little bit to the right and up corner of a chiclet
- overlay_icon_rect.translate(overlay_icon_rect.getWidth()/5, overlay_icon_rect.getHeight()/5);
+ LLRect overlay_icon_rect = LLRect(chiclet_rect.getWidth()/2, chiclet_rect.getHeight(), chiclet_rect.getWidth(), chiclet_rect.getHeight()/2);
mNewMessagesIcon->setRect(overlay_icon_rect);
- addChild(mNewMessagesIcon);
+
+ // shift an icon a little bit to the right and up corner of a chiclet
+ overlay_icon_rect.translate(OVERLAY_ICON_SHIFT, OVERLAY_ICON_SHIFT);
setShowCounter(false);
}
@@ -423,7 +427,6 @@ void LLIMP2PChiclet::updateMenuItems()
bool is_friend = LLAvatarActions::isFriend(getOtherParticipantId());
mPopupMenu->getChild<LLUICtrl>("Add Friend")->setEnabled(!is_friend);
- mPopupMenu->getChild<LLUICtrl>("Remove Friend")->setEnabled(is_friend);
}
BOOL LLIMP2PChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
@@ -602,6 +605,9 @@ BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
LLIMGroupChiclet::Params::Params()
: group_icon("group_icon")
+, unread_notifications("unread_notifications")
+, speaker("speaker")
+, show_speaker("show_speaker")
{
rect(CHICLET_RECT);
@@ -830,8 +836,13 @@ LLChicletPanel::~LLChicletPanel()
void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){
LLUUID session_id = data["session_id"].asUUID();
- S32 unread = data["num_unread"].asInteger();
+ LLUUID from_id = data["from_id"].asUUID();
+ const std::string from = data["from"].asString();
+
+ //we do not show balloon (indicator of new messages) for system messages and our own messages
+ if (from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from) return;
+ S32 unread = data["num_unread"].asInteger();
LLIMFloater* im_floater = LLIMFloater::findInstance(session_id);
if (im_floater && im_floater->getVisible())
{
@@ -880,19 +891,34 @@ BOOL LLChicletPanel::postBuild()
void LLChicletPanel::onCurrentVoiceChannelChanged(const LLUUID& session_id)
{
- for(chiclet_list_t::iterator it = mChicletList.begin(); it != mChicletList.end(); ++it)
+ static LLUUID s_previous_active_voice_session_id;
+
+ std::list<LLChiclet*> chiclets = LLIMChiclet::sFindChicletsSignal(session_id);
+
+ for(std::list<LLChiclet *>::iterator it = chiclets.begin(); it != chiclets.end(); ++it)
{
LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it);
if(chiclet)
{
- if(chiclet->getSessionId() == session_id)
+ chiclet->setShowSpeaker(true);
+ }
+ }
+
+ if(!s_previous_active_voice_session_id.isNull() && s_previous_active_voice_session_id != session_id)
+ {
+ chiclets = LLIMChiclet::sFindChicletsSignal(s_previous_active_voice_session_id);
+
+ for(std::list<LLChiclet *>::iterator it = chiclets.begin(); it != chiclets.end(); ++it)
+ {
+ LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it);
+ if(chiclet)
{
- chiclet->setShowSpeaker(true);
- continue;
+ chiclet->setShowSpeaker(false);
}
- chiclet->setShowSpeaker(false);
- }
+ }
}
+
+ s_previous_active_voice_session_id = session_id;
}
S32 LLChicletPanel::calcChickletPanleWidth()
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index d1317f7c36..92e958b32d 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -40,10 +40,12 @@
// Viewer includes
#include "lljoystickbutton.h"
#include "llviewercontrol.h"
+#include "llviewercamera.h"
#include "llbottomtray.h"
#include "llagent.h"
#include "lltoolmgr.h"
#include "lltoolfocus.h"
+#include "llslider.h"
// Constants
const F32 CAMERA_BUTTON_DELAY = 0.0f;
@@ -54,6 +56,93 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f;
#define PRESETS "camera_presets"
#define CONTROLS "controls"
+// Zoom the camera in and out
+class LLPanelCameraZoom
+: public LLPanel
+{
+ LOG_CLASS(LLPanelCameraZoom);
+public:
+ LLPanelCameraZoom();
+
+ /* virtual */ BOOL postBuild();
+ /* virtual */ void onOpen(const LLSD& key);
+
+protected:
+ void onZoomPlusHeldDown();
+ void onZoomMinusHeldDown();
+ void onSliderValueChanged();
+
+private:
+ F32 mSavedSliderVal;
+ LLButton* mPlusBtn;
+ LLButton* mMinusBtn;
+ LLSlider* mSlider;
+};
+
+static LLRegisterPanelClassWrapper<LLPanelCameraZoom> t_camera_zoom_panel("camera_zoom_panel");
+
+//-------------------------------------------------------------------------------
+// LLPanelCameraZoom
+//-------------------------------------------------------------------------------
+
+LLPanelCameraZoom::LLPanelCameraZoom()
+: mPlusBtn( NULL ),
+ mMinusBtn( NULL ),
+ mSlider( NULL ),
+ mSavedSliderVal(0.f)
+{
+ mCommitCallbackRegistrar.add("Zoom.minus", boost::bind(&LLPanelCameraZoom::onZoomPlusHeldDown, this));
+ mCommitCallbackRegistrar.add("Zoom.plus", boost::bind(&LLPanelCameraZoom::onZoomMinusHeldDown, this));
+ mCommitCallbackRegistrar.add("Slider.value_changed", boost::bind(&LLPanelCameraZoom::onSliderValueChanged, this));
+}
+
+BOOL LLPanelCameraZoom::postBuild()
+{
+ mPlusBtn = getChild <LLButton> ("zoom_plus_btn");
+ mMinusBtn = getChild <LLButton> ("zoom_minus_btn");
+ mSlider = getChild <LLSlider> ("zoom_slider");
+ mSlider->setMinValue(.0f);
+ mSlider->setMaxValue(8.f);
+ return LLPanel::postBuild();
+}
+
+void LLPanelCameraZoom::onOpen(const LLSD& key)
+{
+ LLVector3d to_focus = gAgent.getPosGlobalFromAgent(LLViewerCamera::getInstance()->getOrigin()) - gAgent.calcFocusPositionTargetGlobal();
+ mSavedSliderVal = 8.f - (F32)to_focus.magVec(); // maximum minus current
+ mSlider->setValue( mSavedSliderVal );
+}
+
+void LLPanelCameraZoom::onZoomPlusHeldDown()
+{
+ F32 val = mSlider->getValueF32();
+ F32 inc = mSlider->getIncrement();
+ mSlider->setValue(val - inc);
+ // commit only if value changed
+ if (val != mSlider->getValueF32())
+ mSlider->onCommit();
+}
+
+void LLPanelCameraZoom::onZoomMinusHeldDown()
+{
+ F32 val = mSlider->getValueF32();
+ F32 inc = mSlider->getIncrement();
+ mSlider->setValue(val + inc);
+ // commit only if value changed
+ if (val != mSlider->getValueF32())
+ mSlider->onCommit();
+}
+
+void LLPanelCameraZoom::onSliderValueChanged()
+{
+ F32 val = mSlider->getValueF32();
+ F32 rate = val - mSavedSliderVal;
+
+ gAgent.unlockView();
+ gAgent.cameraOrbitIn(rate);
+
+ mSavedSliderVal = val;
+}
//
// Member functions
@@ -125,6 +214,7 @@ void LLFloaterCamera::onOpen(const LLSD& key)
anchor_panel, this,
getDockTongue(), LLDockControl::TOP));
+ mZoom->onOpen(key);
}
void LLFloaterCamera::onClose(bool app_quitting)
@@ -147,7 +237,7 @@ BOOL LLFloaterCamera::postBuild()
setIsChrome(TRUE);
mRotate = getChild<LLJoystickCameraRotate>(ORBIT);
- mZoom = getChild<LLJoystickCameraZoom>(ZOOM);
+ mZoom = getChild<LLPanelCameraZoom>(ZOOM);
mTrack = getChild<LLJoystickCameraTrack>(PAN);
assignButton2Mode(CAMERA_CTRL_MODE_ORBIT, "orbit_btn");
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index 583f279e62..4873a34e00 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -39,6 +39,7 @@ class LLJoystickCameraRotate;
class LLJoystickCameraZoom;
class LLJoystickCameraTrack;
class LLFloaterReg;
+class LLPanelCameraZoom;
enum ECameraControlMode
{
@@ -74,7 +75,7 @@ public:
virtual void onClose(bool app_quitting);
LLJoystickCameraRotate* mRotate;
- LLJoystickCameraZoom* mZoom;
+ LLPanelCameraZoom* mZoom;
LLJoystickCameraTrack* mTrack;
private:
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 54fc6f02fb..5ea900e46d 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -211,6 +211,7 @@ BOOL LLIMFloater::postBuild()
}
mControlPanel->setSessionId(mSessionID);
+ mControlPanel->setVisible(gSavedSettings.getBOOL("IMShowControlPanel"));
LLButton* slide_left = getChild<LLButton>("slide_left_btn");
slide_left->setVisible(mControlPanel->getVisible());
@@ -356,8 +357,6 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
LLDockControl::TOP, boost::bind(&LLIMFloater::getAllowedRect, floater, _1)));
}
- floater->childSetVisible("panel_im_control_panel", gSavedSettings.getBOOL("IMShowControlPanel"));
-
return floater;
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index d48aaf8461..ee785e7ecb 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -441,11 +441,7 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co
addToHistory(session_id, from, from_id, utf8_text);
if (log2file) logToFile(session_id, from, from_id, utf8_text);
- //we do not count system messages and our messages
- if (from_id.notNull() && from_id != gAgentID && SYSTEM_FROM != from)
- {
- session->mNumUnread++;
- }
+ session->mNumUnread++;
// notify listeners
LLSD arg;
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index e10c506f08..b4e0ab198a 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -223,7 +223,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
void LLNearbyChatScreenChannel::arrangeToasts()
{
- if(m_active_toasts.size() == 0 || mIsHovering)
+ if(m_active_toasts.size() == 0 || isHovering())
return;
hideToastsFromScreen();
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index f5367c0477..13bd059d45 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -130,6 +130,7 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param)
{
name.erase(found, moderator_indicator_len);
item->setName(name);
+ item->reshapeAvatarName();
}
}
}
@@ -151,6 +152,7 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param)
name += " ";
name += moderator_indicator;
item->setName(name);
+ item->reshapeAvatarName();
}
}
}
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index b667fbf5fd..ed606d5457 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -63,7 +63,7 @@ LLScreenChannelBase::LLScreenChannelBase(const LLUUID& id) :
,mCanStoreToasts(true)
,mHiddenToastsNum(0)
,mOverflowToastHidden(false)
- ,mIsHovering(false)
+ ,mHoveredToast(NULL)
,mControlHovering(false)
,mShowToasts(true)
{
@@ -216,8 +216,10 @@ void LLScreenChannel::deleteToast(LLToast* toast)
// update channel's Hovering state
// turning hovering off manually because onMouseLeave won't happen if a toast was closed using a keyboard
- if(toast->hasFocus())
- setHovering(false);
+ if(mHoveredToast == toast)
+ {
+ mHoveredToast = NULL;
+ }
// close the toast
toast->closeFloater();
@@ -352,7 +354,7 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
//--------------------------------------------------------------------------
void LLScreenChannel::redrawToasts()
{
- if(mToastList.size() == 0 || mIsHovering)
+ if(mToastList.size() == 0 || isHovering())
return;
hideToastsFromScreen();
@@ -456,7 +458,6 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer)
mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::closeOverflowToastPanel, this));
LLTextBox* text_box = mOverflowToastPanel->getChild<LLTextBox>("toast_text");
- LLIconCtrl* icon = mOverflowToastPanel->getChild<LLIconCtrl>("icon");
std::string text = llformat(mOverflowFormatString.c_str(),mHiddenToastsNum);
if(mHiddenToastsNum == 1)
{
@@ -474,7 +475,6 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer)
text_box->setValue(text);
text_box->setVisible(TRUE);
- icon->setVisible(TRUE);
mOverflowToastPanel->setVisible(TRUE);
}
@@ -532,7 +532,6 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
mStartUpToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onStartUpToastHide, this));
LLTextBox* text_box = mStartUpToastPanel->getChild<LLTextBox>("toast_text");
- LLIconCtrl* icon = mStartUpToastPanel->getChild<LLIconCtrl>("icon");
std::string mStartUpFormatString;
@@ -555,8 +554,6 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
text_box->setValue(text);
text_box->setVisible(TRUE);
- icon->setVisible(TRUE);
-
addChild(mStartUpToastPanel);
mStartUpToastPanel->setVisible(TRUE);
@@ -654,7 +651,14 @@ void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter)
// we must check this to prevent incorrect setting for hovering in a channel
std::map<LLToast*, bool>::iterator it_first, it_second;
S32 stack_size = mToastEventStack.size();
- mIsHovering = mouse_enter;
+ if(mouse_enter)
+ {
+ mHoveredToast = toast;
+ }
+ else
+ {
+ mHoveredToast = NULL;
+ }
switch(stack_size)
{
@@ -666,7 +670,7 @@ void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter)
if((*it_first).second && !mouse_enter && ((*it_first).first != toast) )
{
mToastEventStack.clear();
- mIsHovering = true;
+ mHoveredToast = toast;
}
else
{
@@ -678,7 +682,7 @@ void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter)
LL_ERRS ("LLScreenChannel::onToastHover: stack size error " ) << stack_size << llendl;
}
- if(!mIsHovering)
+ if(!isHovering())
redrawToasts();
}
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index fd31690622..f39b94b89d 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -93,9 +93,10 @@ public:
// Channel's behavior-functions
// set whether a channel will control hovering inside itself or not
virtual void setControlHovering(bool control) { mControlHovering = control; }
- // set Hovering flag for a channel
- virtual void setHovering(bool hovering) { mIsHovering = hovering; }
+
+ bool isHovering() { return mHoveredToast != NULL; }
+
void setCanStoreToasts(bool store) { mCanStoreToasts = store; }
void setDisplayToastsAlways(bool display_toasts) { mDisplayToastsAlways = display_toasts; }
@@ -117,7 +118,7 @@ public:
protected:
// Channel's flags
bool mControlHovering;
- bool mIsHovering;
+ LLToast* mHoveredToast;
bool mCanStoreToasts;
bool mDisplayToastsAlways;
bool mOverflowToastHidden;
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 4422c4b672..2fb6550107 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -501,14 +501,14 @@ LLSysWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID&
switch (im_chiclet_type)
{
case LLIMChiclet::TYPE_GROUP:
+ mChiclet = getChild<LLIMGroupChiclet>("group_chiclet");
+ break;
case LLIMChiclet::TYPE_AD_HOC:
- mChiclet = getChild<LLIMChiclet>("group_chiclet");
- childSetVisible("p2p_chiclet", false);
+ mChiclet = getChild<LLAdHocChiclet>("adhoc_chiclet");
break;
case LLIMChiclet::TYPE_UNKNOWN: // assign mChiclet a non-null value anyway
case LLIMChiclet::TYPE_IM:
- mChiclet = getChild<LLIMChiclet>("p2p_chiclet");
- childSetVisible("group_chiclet", false);
+ mChiclet = getChild<LLIMP2PChiclet>("p2p_chiclet");
break;
}
@@ -517,6 +517,7 @@ LLSysWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID&
mChiclet->setSessionId(sessionId);
mChiclet->setIMSessionName(name);
mChiclet->setOtherParticipantId(otherParticipantId);
+ mChiclet->setVisible(true);
LLTextBox* contactName = getChild<LLTextBox>("contact_name");
contactName->setValue(name);
diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index 5c09bc3a02..2af451400e 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -49,22 +49,57 @@
top="22"
visible="false"
width="78" />
- <!--TODO: replace with slider, + - images -->
- <joystick_zoom
- follows="top|left"
- height="78"
- image_unselected="ScrollThumb_Vert"
- layout="topleft"
- left="7"
- minus_image="ScrollThumb_Vert"
- name="zoom"
- plus_image="ScrollThumb_Vert"
- quadrant="left"
- scale_image="false"
- sound_flags="3"
- tool_tip="Zoom camera toward focus"
- top="22"
- width="20" />
+ <!--TODO: replace + - images -->
+ <panel
+ border="false"
+ class="camera_zoom_panel"
+ height="94"
+ layout="topleft"
+ left="7"
+ mouse_opaque="false"
+ name="zoom"
+ top="22"
+ width="18">
+ <button
+ follows="top|left"
+ height="18"
+ image_disabled="AddItem_Disabled"
+ image_selected="AddItem_Press"
+ image_unselected="AddItem_Off"
+ layout="topleft"
+ name="zoom_plus_btn"
+ width="18">
+ <commit_callback
+ function="Zoom.plus" />
+ <mouse_held_callback
+ function="Zoom.plus" />
+ </button>
+ <slider_bar
+ height="48"
+ layout="topleft"
+ name="zoom_slider"
+ orientation="vertical"
+ tool_tip="Zoom camera toward focus"
+ top_pad="0"
+ width="18">
+ <commit_callback function="Slider.value_changed"/>
+ </slider_bar>
+ <button
+ follows="top|left"
+ height="18"
+ image_disabled="AddItem_Disabled"
+ image_selected="AddItem_Press"
+ image_unselected="AddItem_Off"
+ layout="topleft"
+ name="zoom_minus_btn"
+ top_pad="0"
+ width="18">
+ <commit_callback
+ function="Zoom.minus" />
+ <mouse_held_callback
+ function="Zoom.minus" />
+ </button>
+ </panel>
<joystick_rotate
follows="top|left"
height="78"
@@ -80,7 +115,7 @@
tool_tip="Orbit camera around focus"
top="22"
width="78" />
- <panel
+ <panel
height="78"
layout="topleft"
left="36"
diff --git a/indra/newview/skins/default/xui/en/floater_test_slider.xml b/indra/newview/skins/default/xui/en/floater_test_slider.xml
index 57d8e686ce..86ff82e01f 100644
--- a/indra/newview/skins/default/xui/en/floater_test_slider.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_slider.xml
@@ -57,6 +57,13 @@
width="200" />
<slider_bar
bottom="320"
+ height="100"
+ left="20"
+ name="slider_bar_vertical"
+ orientation="vertical"
+ width="20" />
+ <slider_bar
+ bottom="300"
height="20"
increment="1"
initial_value="2.0"
@@ -64,6 +71,7 @@
layout="topleft"
max_val="5"
min_val="1"
+ left_pad="20"
name="slider_bar"
width="300" />
<slider
diff --git a/indra/newview/skins/default/xui/en/panel_activeim_row.xml b/indra/newview/skins/default/xui/en/panel_activeim_row.xml
index 8b815b0f71..5562ec8406 100644
--- a/indra/newview/skins/default/xui/en/panel_activeim_row.xml
+++ b/indra/newview/skins/default/xui/en/panel_activeim_row.xml
@@ -15,7 +15,16 @@
top="3"
left="5"
height="25"
- width="25">
+ width="25"
+ visible="false"
+ speaker.name="speaker_p2p"
+ speaker.width="20"
+ speaker.height="25"
+ speaker.left="25"
+ speaker.top="25"
+ speaker.auto_update="true"
+ speaker.draw_border="false"
+ speaker.visible="false">
</chiclet_im_p2p>
<chiclet_im_group
name="group_chiclet"
@@ -24,14 +33,41 @@
top="3"
left="5"
height="25"
- width="25">
+ width="25"
+ visible="false"
+ speaker.name="speaker_grp"
+ speaker.width="20"
+ speaker.height="25"
+ speaker.left="25"
+ speaker.top="25"
+ speaker.auto_update="true"
+ speaker.draw_border="false"
+ speaker.visible="false">
</chiclet_im_group>
+ <chiclet_im_adhoc
+ name="adhoc_chiclet"
+ layout="topleft"
+ follows="left"
+ top="3"
+ left="5"
+ height="25"
+ width="25"
+ visible="false"
+ speaker.name="speaker_hoc"
+ speaker.width="20"
+ speaker.height="25"
+ speaker.left="25"
+ speaker.top="25"
+ speaker.auto_update="true"
+ speaker.draw_border="false"
+ speaker.visible="false">
+ </chiclet_im_adhoc>
<text
type="string"
name="contact_name"
layout="topleft"
top="10"
- left_pad="0"
+ left_pad="20"
height="14"
width="245"
length="1"
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
index 1ef845b769..a77094e942 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
@@ -27,7 +27,7 @@
name="chat_box"
tool_tip="Press Enter to say, Ctrl+Enter to shout"
top="0"
- width="250" />
+ width="279" />
<output_monitor
auto_update="true"
follows="right"
diff --git a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
index 9636e32187..566fc95230 100644
--- a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
+++ b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
@@ -227,7 +227,7 @@
right="-10"
top="10"
width="20"
- image_name="TabIcon_Inventory_Selected"/>
+ image_name="TabIcon_Things_Selected"/>
<text
follows="all"
height="90"
diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml
index 7f7777586c..f16329f8d7 100644
--- a/indra/newview/skins/default/xui/en/panel_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_toast.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!-- All our XML is utf-8 encoded. -->
-<!-- All this does is establish the position of the "close" button on the toast. -->
+<!-- Don't remove floater's height! It is needed for Overflow and Start-Up toasts!-->
<floater
legacy_header_height="18"
@@ -9,6 +9,7 @@
title=""
visible="false"
layout="topleft"
+ height="40"
width="305"
left="0"
top="0"
@@ -26,36 +27,21 @@
drop_shadow_visible = "false"
border = "false"
>
-
- <!--
+ <!-- Don't remove this wiget! It is needed for Overflow and Start-Up toasts!-->
<text
visible="false"
follows="left|top|right|bottom"
font="SansSerifBold"
- height="40"
+ height="20"
layout="topleft"
- left="60"
+ left="20"
name="toast_text"
word_wrap="true"
text_color="white"
- top="20"
- width="290">
+ top="5"
+ width="260">
Toast text;
</text>
- <icon
- top="20"
- left="10"
- width="32"
- height="32"
- follows="top|left"
- layout="topleft"
- visible="false"
- color="1 1 1 1"
- enabled="true"
- image_name="notify_tip_icon.tga"
- mouse_opaque="true"
- name="icon"
- />-->
<button
layout="topleft"
top="-6"
diff --git a/indra/newview/skins/default/xui/en/widgets/slider_bar.xml b/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
index bc1ca339a2..706c89f5ed 100644
--- a/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
@@ -4,6 +4,8 @@
thumb_center_color="SliderThumbCenterColor"
thumb_image="SliderThumb_Off"
thumb_image_pressed="SliderThumb_Press"
- thumb_image_disabled="SliderThumb_Disabled"
- track_image="SliderTrack_Horiz"
- track_highlight_image="SliderTrack_Horiz" />
+ thumb_image_disabled="SliderThumb_Disabled"
+ track_image_horizontal="SliderTrack_Horiz"
+ track_image_vertical="SliderTrack_Vert"
+ track_highlight_horizontal_image="SliderTrack_Horiz"
+ track_highlight_vertical_image="SliderTrack_Vert" />