summaryrefslogtreecommitdiff
path: root/indra/llui/llbutton.cpp
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-06-16 08:42:23 +0200
committerGuru <alexandrgproductengine@lindenlab.com>2023-06-20 10:47:57 +0200
commit2a035c080dec2aa16b9628aac7b120e4f15135c2 (patch)
tree8b6bf2361555014c210f1066b40d0bd7b9ca37bf /indra/llui/llbutton.cpp
parent93ab02b672efc5388230629bafb5519e725a3683 (diff)
SL-18977 Borders of inventory view in inventory floater seem to be cut a bit
Diffstat (limited to 'indra/llui/llbutton.cpp')
-rw-r--r--indra/llui/llbutton.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 8028f397f3..a38b3323be 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;