Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
f1b1dbab
Commit
f1b1dbab
authored
14 years ago
by
Seth ProductEngine
Browse files
Options
Downloads
Patches
Plain Diff
STORM-250 FIXED "More" link being toggled in expandable textbox after reshaping.
parent
458a063c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llexpandabletextbox.cpp
+18
-15
18 additions, 15 deletions
indra/newview/llexpandabletextbox.cpp
indra/newview/llexpandabletextbox.h
+6
-0
6 additions, 0 deletions
indra/newview/llexpandabletextbox.h
with
24 additions
and
15 deletions
indra/newview/llexpandabletextbox.cpp
+
18
−
15
View file @
f1b1dbab
...
@@ -123,10 +123,7 @@ void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL calle
...
@@ -123,10 +123,7 @@ void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL calle
{
{
LLTextEditor
::
reshape
(
width
,
height
,
called_from_parent
);
LLTextEditor
::
reshape
(
width
,
height
,
called_from_parent
);
if
(
getTextPixelHeight
()
>
getRect
().
getHeight
())
hideOrShowExpandTextAsNeeded
();
{
showExpandText
();
}
}
}
void
LLExpandableTextBox
::
LLTextBoxEx
::
setText
(
const
LLStringExplicit
&
text
,
const
LLStyle
::
Params
&
input_params
)
void
LLExpandableTextBox
::
LLTextBoxEx
::
setText
(
const
LLStringExplicit
&
text
,
const
LLStyle
::
Params
&
input_params
)
...
@@ -136,17 +133,7 @@ void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,cons
...
@@ -136,17 +133,7 @@ void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,cons
mExpanderVisible
=
false
;
mExpanderVisible
=
false
;
LLTextEditor
::
setText
(
text
,
input_params
);
LLTextEditor
::
setText
(
text
,
input_params
);
// text contents have changed, segments are cleared out
hideOrShowExpandTextAsNeeded
();
// so hide the expander and determine if we need it
//mExpanderVisible = false;
if
(
getTextPixelHeight
()
>
getRect
().
getHeight
())
{
showExpandText
();
}
else
{
hideExpandText
();
}
}
}
...
@@ -200,6 +187,22 @@ S32 LLExpandableTextBox::LLTextBoxEx::getTextPixelHeight()
...
@@ -200,6 +187,22 @@ S32 LLExpandableTextBox::LLTextBoxEx::getTextPixelHeight()
return
getTextBoundingRect
().
getHeight
();
return
getTextBoundingRect
().
getHeight
();
}
}
void
LLExpandableTextBox
::
LLTextBoxEx
::
hideOrShowExpandTextAsNeeded
()
{
// Restore the text box contents to calculate the text height properly,
// otherwise if a part of the text is hidden under "More" link
// getTextPixelHeight() returns only the height of currently visible text
// including the "More" link. See STORM-250.
hideExpandText
();
// Show the expander a.k.a. "More" link if we need it, depending on text
// contents height. If not, keep it hidden.
if
(
getTextPixelHeight
()
>
getRect
().
getHeight
())
{
showExpandText
();
}
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llexpandabletextbox.h
+
6
−
0
View file @
f1b1dbab
...
@@ -77,6 +77,12 @@ class LLExpandableTextBox : public LLUICtrl
...
@@ -77,6 +77,12 @@ class LLExpandableTextBox : public LLUICtrl
*/
*/
void
hideExpandText
();
void
hideExpandText
();
/**
* Shows the "More" link if the text is too high to be completely
* visible without expanding the text box. Hides that link otherwise.
*/
void
hideOrShowExpandTextAsNeeded
();
protected
:
protected
:
LLTextBoxEx
(
const
Params
&
p
);
LLTextBoxEx
(
const
Params
&
p
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment