diff options
Diffstat (limited to 'indra/llui/llbutton.cpp')
-rw-r--r-- | indra/llui/llbutton.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 8028f397f3..49d275997a 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -203,7 +203,8 @@ LLButton::LLButton(const LLButton::Params& p) } // Hack to make sure there is space for at least one character - if (getRect().getWidth() - (mRightHPad + mLeftHPad) < mGLFont->getWidth(std::string(" "))) + if (getRect().mRight >= 0 && getRect().getWidth() > 0 && + getRect().getWidth() - (mRightHPad + mLeftHPad) < mGLFont->getWidth(std::string(" "))) { // Use old defaults mLeftHPad = llbutton_orig_h_pad; @@ -942,11 +943,8 @@ void LLButton::draw() break; } - S32 y_offset = 2 + (getRect().getHeight() - 20)/2; - if (pressed && mDisplayPressedState) { - y_offset--; x++; } |