summaryrefslogtreecommitdiff
path: root/indra/llui/llcheckboxctrl.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-12-13 16:14:05 -0600
committerDave Parks <davep@lindenlab.com>2022-12-13 16:14:05 -0600
commit9e7829c9cb140f994c9aa12dddcd4518c4c43a40 (patch)
tree01a24506c244b875bdeb402498bf3cb11658debb /indra/llui/llcheckboxctrl.cpp
parent5fcfe95422b4c3a5434b3eb711cd12401d4329d3 (diff)
parenta4397723b7ed1e5a8c86b104fd5a8b94da03abb9 (diff)
Merge branch 'DRTVWR-559' of github.com:secondlife/viewer into DRTVWR-559
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);