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
368c75cc
Commit
368c75cc
authored
15 years ago
by
Andrew Polunin
Browse files
Options
Downloads
Patches
Plain Diff
no ticket. static variables renamed according to convention.
--HG-- branch : product-engine
parent
dc8cd050
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/llavatarlistitem.cpp
+19
-19
19 additions, 19 deletions
indra/newview/llavatarlistitem.cpp
indra/newview/llavatarlistitem.h
+5
-5
5 additions, 5 deletions
indra/newview/llavatarlistitem.h
with
24 additions
and
24 deletions
indra/newview/llavatarlistitem.cpp
+
19
−
19
View file @
368c75cc
...
@@ -43,11 +43,11 @@
...
@@ -43,11 +43,11 @@
#include
"lltextutil.h"
#include
"lltextutil.h"
#include
"llbutton.h"
#include
"llbutton.h"
bool
LLAvatarListItem
::
m
StaticInitialized
=
false
;
bool
LLAvatarListItem
::
s
StaticInitialized
=
false
;
S32
LLAvatarListItem
::
m
IconWidth
=
0
;
S32
LLAvatarListItem
::
s
IconWidth
=
0
;
S32
LLAvatarListItem
::
m
InfoBtnWidth
=
0
;
S32
LLAvatarListItem
::
s
InfoBtnWidth
=
0
;
S32
LLAvatarListItem
::
m
ProfileBtnWidth
=
0
;
S32
LLAvatarListItem
::
s
ProfileBtnWidth
=
0
;
S32
LLAvatarListItem
::
m
SpeakingIndicatorWidth
=
0
;
S32
LLAvatarListItem
::
s
SpeakingIndicatorWidth
=
0
;
LLAvatarListItem
::
LLAvatarListItem
(
bool
not_from_ui_factory
/* = true*/
)
LLAvatarListItem
::
LLAvatarListItem
(
bool
not_from_ui_factory
/* = true*/
)
:
LLPanel
(),
:
LLPanel
(),
...
@@ -94,14 +94,14 @@ BOOL LLAvatarListItem::postBuild()
...
@@ -94,14 +94,14 @@ BOOL LLAvatarListItem::postBuild()
// Remember avatar icon width including its padding from the name text box,
// Remember avatar icon width including its padding from the name text box,
// so that we can hide and show the icon again later.
// so that we can hide and show the icon again later.
if
(
!
m
StaticInitialized
)
if
(
!
s
StaticInitialized
)
{
{
m
IconWidth
=
mAvatarName
->
getRect
().
mLeft
-
mAvatarIcon
->
getRect
().
mLeft
;
s
IconWidth
=
mAvatarName
->
getRect
().
mLeft
-
mAvatarIcon
->
getRect
().
mLeft
;
m
InfoBtnWidth
=
mInfoBtn
->
getRect
().
mRight
-
mSpeakingIndicator
->
getRect
().
mRight
;
s
InfoBtnWidth
=
mInfoBtn
->
getRect
().
mRight
-
mSpeakingIndicator
->
getRect
().
mRight
;
m
ProfileBtnWidth
=
mProfileBtn
->
getRect
().
mRight
-
mInfoBtn
->
getRect
().
mRight
;
s
ProfileBtnWidth
=
mProfileBtn
->
getRect
().
mRight
-
mInfoBtn
->
getRect
().
mRight
;
m
SpeakingIndicatorWidth
=
mSpeakingIndicator
->
getRect
().
mRight
-
mAvatarName
->
getRect
().
mRight
;
s
SpeakingIndicatorWidth
=
mSpeakingIndicator
->
getRect
().
mRight
-
mAvatarName
->
getRect
().
mRight
;
m
StaticInitialized
=
true
;
s
StaticInitialized
=
true
;
}
}
/*
/*
...
@@ -225,7 +225,7 @@ void LLAvatarListItem::setShowInfoBtn(bool show)
...
@@ -225,7 +225,7 @@ void LLAvatarListItem::setShowInfoBtn(bool show)
if
(
mShowInfoBtn
==
show
)
if
(
mShowInfoBtn
==
show
)
return
;
return
;
mShowInfoBtn
=
show
;
mShowInfoBtn
=
show
;
S32
width_delta
=
show
?
-
m
InfoBtnWidth
:
m
InfoBtnWidth
;
S32
width_delta
=
show
?
-
s
InfoBtnWidth
:
s
InfoBtnWidth
;
//Translating speaking indicator
//Translating speaking indicator
mSpeakingIndicator
->
translate
(
width_delta
,
0
);
mSpeakingIndicator
->
translate
(
width_delta
,
0
);
...
@@ -239,7 +239,7 @@ void LLAvatarListItem::setShowProfileBtn(bool show)
...
@@ -239,7 +239,7 @@ void LLAvatarListItem::setShowProfileBtn(bool show)
if
(
mShowProfileBtn
==
show
)
if
(
mShowProfileBtn
==
show
)
return
;
return
;
mShowProfileBtn
=
show
;
mShowProfileBtn
=
show
;
S32
width_delta
=
show
?
-
m
ProfileBtnWidth
:
m
ProfileBtnWidth
;
S32
width_delta
=
show
?
-
s
ProfileBtnWidth
:
s
ProfileBtnWidth
;
//Translating speaking indicator
//Translating speaking indicator
mSpeakingIndicator
->
translate
(
width_delta
,
0
);
mSpeakingIndicator
->
translate
(
width_delta
,
0
);
...
@@ -253,7 +253,7 @@ void LLAvatarListItem::setSpeakingIndicatorVisible(bool visible)
...
@@ -253,7 +253,7 @@ void LLAvatarListItem::setSpeakingIndicatorVisible(bool visible)
if
(
mSpeakingIndicator
->
getVisible
()
==
(
BOOL
)
visible
)
if
(
mSpeakingIndicator
->
getVisible
()
==
(
BOOL
)
visible
)
return
;
return
;
mSpeakingIndicator
->
setVisible
(
visible
);
mSpeakingIndicator
->
setVisible
(
visible
);
S32
width_delta
=
visible
?
-
m
SpeakingIndicatorWidth
:
m
SpeakingIndicatorWidth
;
S32
width_delta
=
visible
?
-
s
SpeakingIndicatorWidth
:
s
SpeakingIndicatorWidth
;
//Reshaping avatar name
//Reshaping avatar name
mAvatarName
->
reshape
(
mAvatarName
->
getRect
().
getWidth
()
+
width_delta
,
mAvatarName
->
getRect
().
getHeight
());
mAvatarName
->
reshape
(
mAvatarName
->
getRect
().
getWidth
()
+
width_delta
,
mAvatarName
->
getRect
().
getHeight
());
...
@@ -270,7 +270,7 @@ void LLAvatarListItem::setAvatarIconVisible(bool visible)
...
@@ -270,7 +270,7 @@ void LLAvatarListItem::setAvatarIconVisible(bool visible)
// Move the avatar name horizontally by icon size + its distance from the avatar name.
// Move the avatar name horizontally by icon size + its distance from the avatar name.
LLRect
name_rect
=
mAvatarName
->
getRect
();
LLRect
name_rect
=
mAvatarName
->
getRect
();
name_rect
.
mLeft
+=
visible
?
m
IconWidth
:
-
m
IconWidth
;
name_rect
.
mLeft
+=
visible
?
s
IconWidth
:
-
s
IconWidth
;
mAvatarName
->
setRect
(
name_rect
);
mAvatarName
->
setRect
(
name_rect
);
}
}
...
@@ -338,10 +338,10 @@ void LLAvatarListItem::onNameCache(const std::string& first_name, const std::str
...
@@ -338,10 +338,10 @@ void LLAvatarListItem::onNameCache(const std::string& first_name, const std::str
void
LLAvatarListItem
::
reshapeAvatarName
()
void
LLAvatarListItem
::
reshapeAvatarName
()
{
{
S32
width_delta
=
0
;
S32
width_delta
=
0
;
width_delta
+=
mShowProfileBtn
?
m
ProfileBtnWidth
:
0
;
width_delta
+=
mShowProfileBtn
?
s
ProfileBtnWidth
:
0
;
width_delta
+=
mSpeakingIndicator
->
getVisible
()
?
m
SpeakingIndicatorWidth
:
0
;
width_delta
+=
mSpeakingIndicator
->
getVisible
()
?
s
SpeakingIndicatorWidth
:
0
;
width_delta
+=
mAvatarIcon
->
getVisible
()
?
m
IconWidth
:
0
;
width_delta
+=
mAvatarIcon
->
getVisible
()
?
s
IconWidth
:
0
;
width_delta
+=
mShowInfoBtn
?
m
InfoBtnWidth
:
0
;
width_delta
+=
mShowInfoBtn
?
s
InfoBtnWidth
:
0
;
width_delta
+=
mLastInteractionTime
->
getVisible
()
?
mLastInteractionTime
->
getRect
().
getWidth
()
:
0
;
width_delta
+=
mLastInteractionTime
->
getVisible
()
?
mLastInteractionTime
->
getRect
().
getWidth
()
:
0
;
S32
height
=
mAvatarName
->
getRect
().
getHeight
();
S32
height
=
mAvatarName
->
getRect
().
getHeight
();
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llavatarlistitem.h
+
5
−
5
View file @
368c75cc
...
@@ -136,11 +136,11 @@ class LLAvatarListItem : public LLPanel, public LLFriendObserver
...
@@ -136,11 +136,11 @@ class LLAvatarListItem : public LLPanel, public LLFriendObserver
bool
mShowInfoBtn
;
bool
mShowInfoBtn
;
bool
mShowProfileBtn
;
bool
mShowProfileBtn
;
static
bool
m
StaticInitialized
;
// this variable is introduced to improve code readability
static
bool
s
StaticInitialized
;
// this variable is introduced to improve code readability
static
S32
m
IconWidth
;
// icon width + padding
static
S32
s
IconWidth
;
// icon width + padding
static
S32
m
InfoBtnWidth
;
//info btn width + padding
static
S32
s
InfoBtnWidth
;
//info btn width + padding
static
S32
m
ProfileBtnWidth
;
//profile btn width + padding
static
S32
s
ProfileBtnWidth
;
//profile btn width + padding
static
S32
m
SpeakingIndicatorWidth
;
//speaking indicator width + padding
static
S32
s
SpeakingIndicatorWidth
;
//speaking indicator width + padding
};
};
#endif //LL_LLAVATARLISTITEM_H
#endif //LL_LLAVATARLISTITEM_H
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