summaryrefslogtreecommitdiff
path: root/indra/llui/llcheckboxctrl.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-03-31 11:39:06 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-03-31 11:39:06 -0400
commit1be9d68468e51be7de5b632f0276dc6708e75dc6 (patch)
treeba80104fa9531a51291d2ad067b23fa75cb58fc9 /indra/llui/llcheckboxctrl.cpp
parent0dd7b362a6e77d8f3dff450376ddf2d4ffaf752c (diff)
parentc7053a6928fd5eafdc935453742e92951ae4e0c1 (diff)
DRTVWR-573: Merge branch 'main' into fix-monterey
Diffstat (limited to 'indra/llui/llcheckboxctrl.cpp')
-rw-r--r--indra/llui/llcheckboxctrl.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index 08da599ef2..362fe0c19e 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -203,11 +203,9 @@ void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
// it will work fine in case of decrease of space, but if we get more space or text
// becomes longer, label will fail to grow so reinit label's dimentions.
- static LLUICachedControl<S32> llcheckboxctrl_hpad("UICheckboxctrlHPad", 0);
LLRect label_rect = mLabel->getRect();
- S32 new_width = getRect().getWidth() - label_rect.mLeft - llcheckboxctrl_hpad;
- label_rect.mRight = label_rect.mLeft + new_width;
- mLabel->setRect(label_rect);
+ S32 new_width = rect.getWidth() - label_rect.mLeft;
+ mLabel->reshape(new_width, label_rect.getHeight(), TRUE);
S32 label_top = label_rect.mTop;
mLabel->reshapeToFitText(TRUE);