From 52aeaa32841e7d0b37abab0a2a2540c2be2f16b7 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 7 Jul 2009 00:53:05 +0000 Subject: Merge skinning-14 to viewer-2, including refactoring many floaters to register them with LLFloaterReg, support for introspection of ParamBlock based UI widgets to dump XML schema, splitting llfolderview.cpp into three separate files to unravel dependencies and skeleton for for LLListView widget. Resolved conflicts in these files: lldraghandle.h, lluictrl.h, llchiclet.cpp, llfolderview.h/cpp, lliinventorybridge.cpp, llpanelpicks.cpp, llviewermenu.cpp, floater_mute.xml, floater_preferences.xml, notifications.xml, panel_preferences_audio.xml, panel_preferences_graphics1.xml, panel_region_general.xml svn merge -r124961:126284 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-14 --- indra/llui/llscrollbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llscrollbar.cpp') diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp index 3f1ff34419..3312064131 100644 --- a/indra/llui/llscrollbar.cpp +++ b/indra/llui/llscrollbar.cpp @@ -48,7 +48,7 @@ #include "llrender.h" #include "lluictrlfactory.h" -static LLDefaultWidgetRegistry::Register register_scrollbar("scroll_bar"); +static LLDefaultChildRegistry::Register register_scrollbar("scroll_bar"); LLScrollbar::Params::Params() : orientation ("orientation", HORIZONTAL), -- cgit v1.2.3 From eb853f55c07ae4a3c3f2aa05fbabcf2e4b4dc115 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 4 Aug 2009 01:12:59 +0000 Subject: svn merge -r 128442:129343 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-18 into svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3 --- indra/llui/llscrollbar.cpp | 73 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 22 deletions(-) (limited to 'indra/llui/llscrollbar.cpp') diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp index 3312064131..bc489592d4 100644 --- a/indra/llui/llscrollbar.cpp +++ b/indra/llui/llscrollbar.cpp @@ -56,8 +56,10 @@ LLScrollbar::Params::Params() doc_pos ("doc_pos", 0), page_size ("page_size", 0), step_size ("step_size", 1), - thumb_image("thumb_image"), - track_image("track_image"), + thumb_image_vertical("thumb_image_vertical"), + thumb_image_horizontal("thumb_image_horizontal"), + track_image_vertical("track_image_vertical"), + track_image_horizontal("track_image_horizontal"), track_color("track_color"), thumb_color("thumb_color"), thickness("thickness"), @@ -86,8 +88,10 @@ LLScrollbar::LLScrollbar(const Params & p) mThumbColor ( p.thumb_color() ), mOnScrollEndCallback( NULL ), mOnScrollEndData( NULL ), - mThumbImage(p.thumb_image), - mTrackImage(p.track_image), + mThumbImageV(p.thumb_image_vertical), + mThumbImageH(p.thumb_image_horizontal), + mTrackImageV(p.track_image_vertical), + mTrackImageH(p.track_image_horizontal), mThickness(p.thickness.isProvided() ? p.thickness : LLUI::sSettingGroups["config"]->getS32("UIScrollbarSize")) { updateThumbRect(); @@ -493,7 +497,8 @@ void LLScrollbar::draw() } // Draw background and thumb. - if (mTrackImage.isNull() || mThumbImage.isNull()) + if ( ( mOrientation == VERTICAL&&(mThumbImageV.isNull() || mThumbImageV.isNull()) ) + || (mOrientation == HORIZONTAL&&(mTrackImageH.isNull() || mThumbImageH.isNull()) )) { gl_rect_2d(mOrientation == HORIZONTAL ? mThickness : 0, mOrientation == VERTICAL ? getRect().getHeight() - 2 * mThickness : getRect().getHeight(), @@ -505,30 +510,54 @@ void LLScrollbar::draw() } else { - // Background - mTrackImage->drawSolid(mOrientation == HORIZONTAL ? mThickness : 0, - mOrientation == VERTICAL ? mThickness : 0, - mOrientation == HORIZONTAL ? getRect().getWidth() - 2 * mThickness : getRect().getWidth(), - mOrientation == VERTICAL ? getRect().getHeight() - 2 * mThickness : getRect().getHeight(), - mTrackColor.get()); - // Thumb LLRect outline_rect = mThumbRect; outline_rect.stretch(2); - - if (gFocusMgr.getKeyboardFocus() == this) + S32 rect_fix = 0; + // Background + + if(mOrientation == HORIZONTAL) { - mTrackImage->draw(outline_rect, gFocusMgr.getFocusColor()); + mTrackImageH->drawSolid(mThickness //S32 x + , 0 //S32 y + , getRect().getWidth() - 2 * mThickness //S32 width + , getRect().getHeight()- rect_fix //S32 height + , mTrackColor.get()); //const LLColor4& color + + if (gFocusMgr.getKeyboardFocus() == this) + { + mTrackImageH->draw(outline_rect, gFocusMgr.getFocusColor()); + } + + mThumbImageH->draw(mThumbRect, mThumbColor.get()); + if (mCurGlowStrength > 0.01f) + { + gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA); + mThumbImageH->drawSolid(mThumbRect, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); + gGL.setSceneBlendType(LLRender::BT_ALPHA); + } + } - - mThumbImage->draw(mThumbRect, mThumbColor.get()); - if (mCurGlowStrength > 0.01f) + else if(mOrientation == VERTICAL) { - gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA); - mThumbImage->drawSolid(mThumbRect, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); - gGL.setSceneBlendType(LLRender::BT_ALPHA); + mTrackImageV->drawSolid( 0+rect_fix //S32 x + , mThickness //S32 y + , getRect().getWidth() //S32 width + , getRect().getHeight() - 2 * mThickness //S32 height + , mTrackColor.get()); //const LLColor4& color + if (gFocusMgr.getKeyboardFocus() == this) + { + mTrackImageV->draw(outline_rect, gFocusMgr.getFocusColor()); + } + + mThumbImageV->draw(mThumbRect, mThumbColor.get()); + if (mCurGlowStrength > 0.01f) + { + gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA); + mThumbImageV->drawSolid(mThumbRect, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); + gGL.setSceneBlendType(LLRender::BT_ALPHA); + } } - } BOOL was_scrolled_to_bottom = (getDocPos() == getDocPosMax()); -- cgit v1.2.3