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
b6119253
Commit
b6119253
authored
5 years ago
by
andreykproductengine
Browse files
Options
Downloads
Patches
Plain Diff
SL-12484 EXP-696 Remade "Remember Password" checkbox to be multiline
parent
b006dc46
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/llui/llcheckboxctrl.cpp
+26
-8
26 additions, 8 deletions
indra/llui/llcheckboxctrl.cpp
indra/llui/lltextbase.h
+2
-0
2 additions, 0 deletions
indra/llui/lltextbase.h
indra/newview/skins/default/xui/en/panel_login.xml
+3
-1
3 additions, 1 deletion
indra/newview/skins/default/xui/en/panel_login.xml
with
31 additions
and
9 deletions
indra/llui/llcheckboxctrl.cpp
+
26
−
8
View file @
b6119253
...
...
@@ -87,18 +87,27 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
}
mLabel
=
LLUICtrlFactory
::
create
<
LLTextBox
>
(
tbparams
);
mLabel
->
reshapeToFitText
();
addChild
(
mLabel
);
LLRect
label_rect
=
mLabel
->
getRect
();
if
(
mLabel
->
getLineCount
()
>
1
)
{
// reshapeToFitText uses LLView::reshape() which always reshapes
// from bottom to top, but we want to extend the bottom
// Note: might be better idea to use getRect().mTop of LLCheckBoxCtrl (+pad) as top point of new rect
S32
delta
=
ll_round
((
F32
)
mLabel
->
getFont
()
->
getLineHeight
()
*
mLabel
->
getLineSpacingMult
())
-
label_rect
.
getHeight
();
label_rect
.
translate
(
0
,
delta
);
mLabel
->
setRect
(
label_rect
);
}
addChild
(
mLabel
);
// Button
// Note: button cover the label by extending all the way to the right.
// Note: button cover the label by extending all the way to the right
and down
.
LLRect
btn_rect
=
p
.
check_button
.
rect
();
btn_rect
.
setOriginAndSize
(
btn_rect
.
mLeft
,
btn_rect
.
mBottom
,
llmin
(
btn_rect
.
mBottom
,
label_rect
.
mBottom
),
llmax
(
btn_rect
.
mRight
,
label_rect
.
mRight
-
btn_rect
.
mLeft
),
llmax
(
label_rect
.
getHeight
(),
btn_rect
.
mTop
));
llmax
(
label_rect
.
getHeight
(),
btn_rect
.
mTop
));
std
::
string
active_true_id
,
active_false_id
;
std
::
string
inactive_true_id
,
inactive_false_id
;
...
...
@@ -152,17 +161,26 @@ void LLCheckBoxCtrl::clear()
void
LLCheckBoxCtrl
::
reshape
(
S32
width
,
S32
height
,
BOOL
called_from_parent
)
{
S32
label_top
=
mLabel
->
getRect
().
mTop
;
mLabel
->
reshapeToFitText
();
LLRect
label_rect
=
mLabel
->
getRect
();
if
(
label_top
!=
label_rect
.
mTop
)
{
// reshapeToFitText uses LLView::reshape() which always reshapes
// from bottom to top, but we want to extend the bottom so
// reposition control
S32
delta
=
label_top
-
label_rect
.
mTop
;
label_rect
.
translate
(
0
,
delta
);
mLabel
->
setRect
(
label_rect
);
}
// Button
// Note: button cover the label by extending all the way to the right.
// Note: button cover the label by extending all the way to the right
and down
.
LLRect
btn_rect
=
mButton
->
getRect
();
btn_rect
.
setOriginAndSize
(
btn_rect
.
mLeft
,
btn_rect
.
mBottom
,
llmin
(
btn_rect
.
mBottom
,
label_rect
.
mBottom
),
llmax
(
btn_rect
.
getWidth
(),
label_rect
.
mRight
-
btn_rect
.
mLeft
),
llmax
(
label_rect
.
mTop
-
btn_rect
.
mBottom
,
btn_rect
.
getHeight
()));
mButton
->
setShape
(
btn_rect
);
...
...
This diff is collapsed.
Click to expand it.
indra/llui/lltextbase.h
+
2
−
0
View file @
b6119253
...
...
@@ -441,6 +441,8 @@ class LLTextBase
S32
getVPad
()
{
return
mVPad
;
}
S32
getHPad
()
{
return
mHPad
;
}
F32
getLineSpacingMult
()
{
return
mLineSpacingMult
;
}
S32
getLineSpacingPixels
()
{
return
mLineSpacingPixels
;
}
// only for multiline
S32
getDocIndexFromLocalCoord
(
S32
local_x
,
S32
local_y
,
BOOL
round
,
bool
hit_past_end_of_line
=
true
)
const
;
LLRect
getLocalRectFromDocIndex
(
S32
pos
)
const
;
...
...
This diff is collapsed.
Click to expand it.
indra/newview/skins/default/xui/en/panel_login.xml
+
3
−
1
View file @
b6119253
...
...
@@ -148,9 +148,11 @@
left=
"408"
bottom_delta=
"0"
label=
"Remember password"
label_text.word_wrap=
"true"
label_text.width=
"150"
check_button.bottom=
"3"
name=
"remember_check"
width=
"1
45
"
/>
width=
"1
70
"
/>
<combo_box
allow_text_entry=
"false"
font=
"SansSerifTiny"
...
...
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