EXT-1478 Tool-tip background and border colors are being ignored
EXT-2082 Multifloater preview tab container extends outside window border EXT-773 odd notecard behaviour on closing an unsaved notcard reviewed by Richardmaster
parent
c9937716aa
commit
d181b84dfd
|
|
@ -51,6 +51,7 @@ LLStyle::Params::Params()
|
|||
LLStyle::LLStyle(const LLStyle::Params& p)
|
||||
: mVisible(p.visible),
|
||||
mColor(p.color()),
|
||||
mReadOnlyColor(p.readonly_color()),
|
||||
mFont(p.font()),
|
||||
mLink(p.link_href),
|
||||
mDropShadow(p.drop_shadow),
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ public:
|
|||
{
|
||||
Optional<bool> visible;
|
||||
Optional<LLFontGL::ShadowType> drop_shadow;
|
||||
Optional<LLUIColor> color;
|
||||
Optional<LLUIColor> color,
|
||||
readonly_color;
|
||||
Optional<const LLFontGL*> font;
|
||||
Optional<LLUIImage*> image;
|
||||
Optional<std::string> link_href;
|
||||
|
|
@ -57,6 +58,8 @@ public:
|
|||
const LLColor4& getColor() const { return mColor; }
|
||||
void setColor(const LLColor4 &color) { mColor = color; }
|
||||
|
||||
const LLColor4& getReadOnlyColor() const { return mReadOnlyColor; }
|
||||
|
||||
BOOL isVisible() const;
|
||||
void setVisible(BOOL is_visible);
|
||||
|
||||
|
|
@ -81,6 +84,7 @@ public:
|
|||
return
|
||||
mVisible == rhs.mVisible
|
||||
&& mColor == rhs.mColor
|
||||
&& mReadOnlyColor == rhs.mReadOnlyColor
|
||||
&& mFont == rhs.mFont
|
||||
&& mLink == rhs.mLink
|
||||
&& mImagep == rhs.mImagep
|
||||
|
|
@ -104,6 +108,7 @@ protected:
|
|||
private:
|
||||
BOOL mVisible;
|
||||
LLUIColor mColor;
|
||||
LLUIColor mReadOnlyColor;
|
||||
std::string mFontName;
|
||||
const LLFontGL* mFont; // cached for performance
|
||||
std::string mLink;
|
||||
|
|
|
|||
|
|
@ -346,7 +346,13 @@ void LLTabContainer::draw()
|
|||
}
|
||||
}
|
||||
|
||||
LLPanel::draw();
|
||||
{
|
||||
LLRect clip_rect = getLocalRect();
|
||||
clip_rect.mLeft+=(LLPANEL_BORDER_WIDTH + 2);
|
||||
clip_rect.mRight-=(LLPANEL_BORDER_WIDTH + 2);
|
||||
LLLocalClipRect clip(clip_rect);
|
||||
LLPanel::draw();
|
||||
}
|
||||
|
||||
// if tabs are hidden, don't draw them and leave them in the invisible state
|
||||
if (!getTabsHidden())
|
||||
|
|
@ -358,24 +364,6 @@ void LLTabContainer::draw()
|
|||
tuple->mButton->setVisible( TRUE );
|
||||
}
|
||||
|
||||
// Draw some of the buttons...
|
||||
LLRect clip_rect = getLocalRect();
|
||||
if (has_scroll_arrows)
|
||||
{
|
||||
// ...but clip them.
|
||||
if (mIsVertical)
|
||||
{
|
||||
clip_rect.mBottom = mNextArrowBtn->getRect().mTop + 3*tabcntrv_pad;
|
||||
clip_rect.mTop = mPrevArrowBtn->getRect().mBottom - 3*tabcntrv_pad;
|
||||
}
|
||||
else
|
||||
{
|
||||
clip_rect.mLeft = mPrevArrowBtn->getRect().mRight;
|
||||
clip_rect.mRight = mNextArrowBtn->getRect().mLeft;
|
||||
}
|
||||
}
|
||||
LLLocalClipRect clip(clip_rect);
|
||||
|
||||
S32 max_scroll_visible = getTabCount() - getMaxScrollPos() + getScrollPos();
|
||||
S32 idx = 0;
|
||||
for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
|
||||
|
|
@ -403,7 +391,7 @@ void LLTabContainer::draw()
|
|||
mNextArrowBtn->setFlashing( TRUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
idx++;
|
||||
}
|
||||
|
|
@ -1039,6 +1027,11 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
|
|||
{
|
||||
LLUICtrl::addChild(child, 1);
|
||||
}
|
||||
|
||||
sendChildToFront(mPrevArrowBtn);
|
||||
sendChildToFront(mNextArrowBtn);
|
||||
sendChildToFront(mJumpPrevArrowBtn);
|
||||
sendChildToFront(mJumpNextArrowBtn);
|
||||
|
||||
if( select )
|
||||
{
|
||||
|
|
@ -1672,23 +1665,23 @@ void LLTabContainer::initButtons()
|
|||
S32 btn_top = (getTabPosition() == TOP ) ? getRect().getHeight() - getTopBorderHeight() : tabcntr_arrow_btn_size + 1;
|
||||
|
||||
LLRect left_arrow_btn_rect;
|
||||
left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1+tabcntr_arrow_btn_size, btn_top + arrow_fudge, tabcntr_arrow_btn_size, tabcntr_arrow_btn_size );
|
||||
left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1+tabcntr_arrow_btn_size, btn_top + arrow_fudge, tabcntr_arrow_btn_size, mTabHeight );
|
||||
|
||||
LLRect jump_left_arrow_btn_rect;
|
||||
jump_left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1, btn_top + arrow_fudge, tabcntr_arrow_btn_size, tabcntr_arrow_btn_size );
|
||||
jump_left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1, btn_top + arrow_fudge, tabcntr_arrow_btn_size, mTabHeight );
|
||||
|
||||
S32 right_pad = tabcntr_arrow_btn_size + LLPANEL_BORDER_WIDTH + 1;
|
||||
|
||||
LLRect right_arrow_btn_rect;
|
||||
right_arrow_btn_rect.setLeftTopAndSize( getRect().getWidth() - mRightTabBtnOffset - right_pad - tabcntr_arrow_btn_size,
|
||||
btn_top + arrow_fudge,
|
||||
tabcntr_arrow_btn_size, tabcntr_arrow_btn_size );
|
||||
tabcntr_arrow_btn_size, mTabHeight );
|
||||
|
||||
|
||||
LLRect jump_right_arrow_btn_rect;
|
||||
jump_right_arrow_btn_rect.setLeftTopAndSize( getRect().getWidth() - mRightTabBtnOffset - right_pad,
|
||||
btn_top + arrow_fudge,
|
||||
tabcntr_arrow_btn_size, tabcntr_arrow_btn_size );
|
||||
tabcntr_arrow_btn_size, mTabHeight );
|
||||
|
||||
LLButton::Params p;
|
||||
p.name(std::string("Jump Left Arrow"));
|
||||
|
|
|
|||
|
|
@ -286,8 +286,7 @@ bool LLTextBase::truncate()
|
|||
|
||||
LLStyle::Params LLTextBase::getDefaultStyle()
|
||||
{
|
||||
LLColor4 text_color = ( mReadOnly ? mReadOnlyFgColor.get() : mFgColor.get() );
|
||||
return LLStyle::Params().color(text_color).font(mDefaultFont).drop_shadow(mFontShadow);
|
||||
return LLStyle::Params().color(mFgColor.get()).readonly_color(mReadOnlyFgColor.get()).font(mDefaultFont).drop_shadow(mFontShadow);
|
||||
}
|
||||
|
||||
void LLTextBase::onValueChange(S32 start, S32 end)
|
||||
|
|
@ -2232,7 +2231,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
|
|||
|
||||
const LLFontGL* font = mStyle->getFont();
|
||||
|
||||
LLColor4 color = mStyle->getColor() % alpha;
|
||||
LLColor4 color = (mEditor.getReadOnly() ? mStyle->getReadOnlyColor() : mStyle->getColor()) % alpha;
|
||||
|
||||
font = mStyle->getFont();
|
||||
|
||||
|
|
|
|||
|
|
@ -2005,7 +2005,8 @@ void LLTextEditor::setEnabled(BOOL enabled)
|
|||
bool read_only = !enabled;
|
||||
if (read_only != mReadOnly)
|
||||
{
|
||||
mReadOnly = read_only;
|
||||
//mReadOnly = read_only;
|
||||
LLTextBase::setReadOnly(read_only);
|
||||
updateSegments();
|
||||
updateAllowingLanguageInput();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,6 +137,10 @@ void LLToolTipView::drawStickyRect()
|
|||
{
|
||||
gl_rect_2d(LLToolTipMgr::instance().getMouseNearRect(), LLColor4::white, false);
|
||||
}
|
||||
|
||||
// defaults for floater param block pulled from widgets/floater.xml
|
||||
static LLWidgetNameRegistry::StaticRegistrar sRegisterInspectorParams(&typeid(LLInspector::Params), "inspector");
|
||||
|
||||
//
|
||||
// LLToolTip
|
||||
//
|
||||
|
|
|
|||
|
|
@ -116,6 +116,12 @@ private:
|
|||
S32 mPadding; // pixels
|
||||
};
|
||||
|
||||
// used for the inspector tooltips which need different background images etc.
|
||||
class LLInspector : public LLToolTip
|
||||
{
|
||||
public:
|
||||
struct Params : public LLInitParam::Block<Params, LLToolTip::Params> {};
|
||||
};
|
||||
|
||||
class LLToolTipMgr : public LLSingleton<LLToolTipMgr>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -142,6 +142,13 @@ namespace LLInitParam
|
|||
{
|
||||
LLUIImage* TypedParam<LLUIImage*>::getValueFromBlock() const
|
||||
{
|
||||
// The keyword "none" is specifically requesting a null image
|
||||
// do not default to current value. Used to overwrite template images.
|
||||
if (name() == "none")
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LLUIImage* imagep = LLUI::getUIImage(name());
|
||||
if (!imagep)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -700,13 +700,17 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask)
|
|||
|
||||
// *HACK: We may select this object, so pretend it was clicked
|
||||
mPick = mHoverPick;
|
||||
LLToolTipMgr::instance().show(LLToolTip::Params()
|
||||
.message(avatar_name)
|
||||
.image(LLUI::getUIImage("Info"))
|
||||
.click_callback(boost::bind(showAvatarInspector, hover_object->getID()))
|
||||
.visible_time_near(6.f)
|
||||
.visible_time_far(3.f)
|
||||
.wrap(false));
|
||||
LLInspector::Params p;
|
||||
p.message(avatar_name);
|
||||
p.image(LLUI::getUIImage("Info"));
|
||||
p.click_callback(boost::bind(showAvatarInspector, hover_object->getID()));
|
||||
p.visible_time_near(6.f);
|
||||
p.visible_time_far(3.f);
|
||||
p.wrap(false);
|
||||
|
||||
p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
|
||||
|
||||
LLToolTipMgr::instance().show(p);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -787,18 +791,22 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask)
|
|||
{
|
||||
// We may select this object, so pretend it was clicked
|
||||
mPick = mHoverPick;
|
||||
LLToolTipMgr::instance().show(LLToolTip::Params()
|
||||
.message(tooltip_msg)
|
||||
.image(LLUI::getUIImage("Info_Off"))
|
||||
.click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace))
|
||||
.time_based_media(is_time_based_media)
|
||||
.web_based_media(is_web_based_media)
|
||||
.media_playing(is_media_playing)
|
||||
.click_playmedia_callback(boost::bind(playCurrentMedia, mHoverPick))
|
||||
.click_homepage_callback(boost::bind(VisitHomePage, mHoverPick))
|
||||
.visible_time_near(6.f)
|
||||
.visible_time_far(3.f)
|
||||
.wrap(false));
|
||||
LLInspector::Params p;
|
||||
p.message(tooltip_msg);
|
||||
p.image(LLUI::getUIImage("Info_Off"));
|
||||
p.click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace));
|
||||
p.time_based_media(is_time_based_media);
|
||||
p.web_based_media(is_web_based_media);
|
||||
p.media_playing(is_media_playing);
|
||||
p.click_playmedia_callback(boost::bind(playCurrentMedia, mHoverPick));
|
||||
p.click_homepage_callback(boost::bind(VisitHomePage, mHoverPick));
|
||||
p.visible_time_near(6.f);
|
||||
p.visible_time_far(3.f);
|
||||
p.wrap(false);
|
||||
|
||||
p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
|
||||
|
||||
LLToolTipMgr::instance().show(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<!-- See also settings.xml UIFloater* settings for configuration -->
|
||||
<inspector name="inspector"
|
||||
bg_opaque_color="ToolTipBgColor"
|
||||
background_visible="true"
|
||||
bg_opaque_image="none"
|
||||
bg_alpha_image="none"
|
||||
/>
|
||||
Loading…
Reference in New Issue