diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2023-01-23 16:29:38 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2023-01-23 16:29:56 +0200 |
commit | 111fc04e5df60e1d509b9ec80a1340bab4383cce (patch) | |
tree | aed67acff4dd7497cf39e3a5c3632cacd57126c9 /indra/llui/llcheckboxctrl.cpp | |
parent | 819eec6f8c3abbf71ec3bdaaf4891068574fdc46 (diff) | |
parent | a0c3d69c620a92d73a1008f218680fb4d0ef9255 (diff) |
Merge branch 'main' into DRTVWR-567
Diffstat (limited to 'indra/llui/llcheckboxctrl.cpp')
-rw-r--r-- | indra/llui/llcheckboxctrl.cpp | 6 |
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); |