From 39ef9e9dd6cbeb26b7e223888a17380a272370bb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Apr 2010 14:56:53 -0700 Subject: EXT-6492 - button halign=center doesn't take into account left and right pad --- indra/llui/llbutton.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llbutton.cpp') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 1d4dc35cee..33c6a8b6ac 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -824,7 +824,7 @@ void LLButton::draw() x = text_right; break; case LLFontGL::HCENTER: - x = getRect().getWidth() / 2; + x = text_left + (text_width / 2); break; case LLFontGL::LEFT: default: -- cgit v1.2.3 From edd0e47d5cb3eb173da4d6710ce6a83f771a0246 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 22 Apr 2010 12:40:36 +0300 Subject: Fixed EXT-6597(normal) - Clicking the maturity rating icons in the navbar need tooltips and clicking should link to a help article. Added LLButton::setImagePressed(), there was no way to set pressed image at run-time. The only place where pressed image is initialized was LLButton constructor. Replaced Maturity icon with button to simplify handling clicks. Icon does not provide click callback and we would need to handle mouse up/down events and track clicked widget. Added icon for Moderate regions. Did not find maturity help topic, added a "TODO". Reviewed by Sergey Litovchuk - https://codereview.productengine.com/secondlife/r/243/ --HG-- branch : product-engine --- indra/llui/llbutton.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llui/llbutton.cpp') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 33c6a8b6ac..0255061b12 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -1003,6 +1003,11 @@ void LLButton::setImageDisabledSelected(LLPointer image) mFadeWhenDisabled = TRUE; } +void LLButton::setImagePressed(LLPointer image) +{ + mImagePressed = image; +} + void LLButton::setImageHoverSelected(LLPointer image) { mImageHoverSelected = image; -- cgit v1.2.3