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
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
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
Testicular Slingshot
Alchemy Viewer
Commits
4bc3b5f3
Commit
4bc3b5f3
authored
15 years ago
by
Erica Firment
Browse files
Options
Downloads
Plain Diff
merge
parents
d9b6c6cb
07f7247d
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/newview/llsidetray.cpp
+34
-27
34 additions, 27 deletions
indra/newview/llsidetray.cpp
indra/newview/llsidetray.h
+1
-1
1 addition, 1 deletion
indra/newview/llsidetray.h
indra/newview/skins/default/xui/en/panel_side_tray.xml
+4
-0
4 additions, 0 deletions
indra/newview/skins/default/xui/en/panel_side_tray.xml
with
39 additions
and
28 deletions
indra/newview/llsidetray.cpp
+
34
−
27
View file @
4bc3b5f3
...
...
@@ -334,14 +334,19 @@ LLSideTrayTab* LLSideTray::getTab(const std::string& name)
}
void
LLSideTray
::
toggleTabButton
(
LLSideTrayTab
*
tab
)
void
LLSideTray
::
toggleTabButton
(
LLSideTrayTab
*
tab
)
{
if
(
tab
==
NULL
)
return
;
string
name
=
tab
->
getName
();
std
::
map
<
std
::
string
,
LLButton
*>::
iterator
tIt
=
mTabButtons
.
find
(
name
);
if
(
tIt
!=
mTabButtons
.
end
())
tIt
->
second
->
setToggleState
(
!
tIt
->
second
->
getToggleState
());
std
::
string
name
=
tab
->
getName
();
std
::
map
<
std
::
string
,
LLButton
*>::
iterator
it
=
mTabButtons
.
find
(
name
);
if
(
it
!=
mTabButtons
.
end
())
{
LLButton
*
btn
=
it
->
second
;
bool
new_state
=
!
btn
->
getToggleState
();
btn
->
setToggleState
(
new_state
);
btn
->
setImageOverlay
(
new_state
?
tab
->
mImageSelected
:
tab
->
mImage
);
}
}
bool
LLSideTray
::
selectTabByIndex
(
size_t
index
)
...
...
@@ -349,9 +354,7 @@ bool LLSideTray::selectTabByIndex(size_t index)
if
(
index
>=
mTabs
.
size
())
return
false
;
LLSideTrayTab
*
sidebar_tab
=
dynamic_cast
<
LLSideTrayTab
*>
(
mTabs
[
index
]);
if
(
sidebar_tab
==
NULL
)
return
false
;
LLSideTrayTab
*
sidebar_tab
=
mTabs
[
index
];
return
selectTabByName
(
sidebar_tab
->
getName
());
}
...
...
@@ -380,9 +383,7 @@ bool LLSideTray::selectTabByName (const std::string& name)
child_vector_const_iter_t
child_it
;
for
(
child_it
=
mTabs
.
begin
();
child_it
!=
mTabs
.
end
();
++
child_it
)
{
LLSideTrayTab
*
sidebar_tab
=
dynamic_cast
<
LLSideTrayTab
*>
(
*
child_it
);
if
(
sidebar_tab
==
NULL
)
continue
;
LLSideTrayTab
*
sidebar_tab
=
*
child_it
;
sidebar_tab
->
setVisible
(
sidebar_tab
==
mActiveTab
);
}
return
true
;
...
...
@@ -439,9 +440,7 @@ void LLSideTray::createButtons ()
child_vector_const_iter_t
child_it
=
mTabs
.
begin
();
for
(
;
child_it
!=
mTabs
.
end
();
++
child_it
)
{
LLSideTrayTab
*
sidebar_tab
=
dynamic_cast
<
LLSideTrayTab
*>
(
*
child_it
);
if
(
sidebar_tab
==
NULL
)
continue
;
LLSideTrayTab
*
sidebar_tab
=
*
child_it
;
std
::
string
name
=
sidebar_tab
->
getName
();
...
...
@@ -527,9 +526,7 @@ void LLSideTray::arrange ()
int
offset
=
(
sidetray_params
.
default_button_height
+
sidetray_params
.
default_button_margin
)
*
2
;
for
(
child_it
=
mTabs
.
begin
();
child_it
!=
mTabs
.
end
();
++
child_it
)
{
LLSideTrayTab
*
sidebar_tab
=
dynamic_cast
<
LLSideTrayTab
*>
(
*
child_it
);
if
(
sidebar_tab
==
NULL
)
continue
;
LLSideTrayTab
*
sidebar_tab
=
*
child_it
;
ctrl_rect
.
setLeftTopAndSize
(
0
,
getRect
().
getHeight
()
-
offset
,
sidetray_params
.
default_button_width
...
...
@@ -552,10 +549,7 @@ void LLSideTray::arrange ()
//arrange tabs
for
(
child_it
=
mTabs
.
begin
();
child_it
!=
mTabs
.
end
();
++
child_it
)
{
LLSideTrayTab
*
sidebar_tab
=
dynamic_cast
<
LLSideTrayTab
*>
(
*
child_it
);
if
(
sidebar_tab
==
NULL
)
continue
;
LLSideTrayTab
*
sidebar_tab
=
*
child_it
;
sidebar_tab
->
setRect
(
ctrl_rect
);
sidebar_tab
->
arrange
(
mMaxBarWidth
,
getRect
().
getHeight
());
}
...
...
@@ -564,6 +558,23 @@ void LLSideTray::arrange ()
void
LLSideTray
::
collapseSideBar
()
{
mCollapsed
=
true
;
// Reset all overlay images, because there is no "selected" tab when the
// whole side tray is hidden.
child_vector_const_iter_t
it
=
mTabs
.
begin
();
for
(
;
it
!=
mTabs
.
end
();
++
it
)
{
LLSideTrayTab
*
tab
=
*
it
;
std
::
string
name
=
tab
->
getName
();
std
::
map
<
std
::
string
,
LLButton
*>::
const_iterator
btn_it
=
mTabButtons
.
find
(
name
);
if
(
btn_it
!=
mTabButtons
.
end
())
{
LLButton
*
btn
=
btn_it
->
second
;
btn
->
setImageOverlay
(
tab
->
mImage
);
}
}
// Home tab doesn't put its button in mTabButtons
LLSideTrayTab
*
home_tab
=
getTab
(
"sidebar_home"
);
if
(
home_tab
)
{
...
...
@@ -643,9 +654,7 @@ void LLSideTray::reshape (S32 width, S32 height, BOOL called_from_parent)
int
offset
=
(
sidetray_params
.
default_button_height
+
sidetray_params
.
default_button_margin
)
*
2
;
for
(
child_it
=
mTabs
.
begin
();
child_it
!=
mTabs
.
end
();
++
child_it
)
{
LLSideTrayTab
*
sidebar_tab
=
dynamic_cast
<
LLSideTrayTab
*>
(
*
child_it
);
if
(
sidebar_tab
==
NULL
)
continue
;
LLSideTrayTab
*
sidebar_tab
=
*
child_it
;
ctrl_rect
.
setLeftTopAndSize
(
0
,
getRect
().
getHeight
()
-
offset
,
sidetray_params
.
default_button_width
...
...
@@ -667,9 +676,7 @@ void LLSideTray::reshape (S32 width, S32 height, BOOL called_from_parent)
for
(
child_it
=
mTabs
.
begin
();
child_it
!=
mTabs
.
end
();
++
child_it
)
{
LLSideTrayTab
*
sidebar_tab
=
dynamic_cast
<
LLSideTrayTab
*>
(
*
child_it
);
if
(
sidebar_tab
==
NULL
)
continue
;
LLSideTrayTab
*
sidebar_tab
=
*
child_it
;
sidebar_tab
->
reshape
(
mMaxBarWidth
,
getRect
().
getHeight
());
ctrl_rect
.
setLeftTopAndSize
(
sidetray_params
.
default_button_width
,
getRect
().
getHeight
(),
mMaxBarWidth
,
getRect
().
getHeight
());
sidebar_tab
->
setRect
(
ctrl_rect
);
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llsidetray.h
+
1
−
1
View file @
4bc3b5f3
...
...
@@ -69,7 +69,7 @@ public:
static
bool
instanceCreated
();
protected
:
LLSideTray
(
Params
&
params
);
typedef
std
::
vector
<
LL
View
*>
child_vector_t
;
typedef
std
::
vector
<
LL
SideTrayTab
*>
child_vector_t
;
typedef
child_vector_t
::
iterator
child_vector_iter_t
;
typedef
child_vector_t
::
const_iterator
child_vector_const_iter_t
;
typedef
child_vector_t
::
reverse_iterator
child_vector_reverse_iter_t
;
...
...
This diff is collapsed.
Click to expand it.
indra/newview/skins/default/xui/en/panel_side_tray.xml
+
4
−
0
View file @
4bc3b5f3
...
...
@@ -35,6 +35,7 @@
tab_title=
"People"
description=
"Find your friends, contacts and people nearby."
image=
"TabIcon_People_Off"
image_selected=
"TabIcon_People_Selected"
mouse_opaque=
"false"
background_visible=
"true"
>
...
...
@@ -77,6 +78,7 @@
label=
"Places"
description=
"Find places to go and places you've visited before."
image=
"TabIcon_Places_Off"
image_selected=
"TabIcon_Places_Selected"
mouse_opaque=
"false"
background_visible=
"true"
>
...
...
@@ -95,6 +97,7 @@
tab_title=
"Me"
description=
"Edit your public profile and Picks."
image=
"TabIcon_Me_Off"
image_selected=
"TabIcon_Me_Selected"
mouse_opaque=
"false"
background_visible=
"true"
>
...
...
@@ -112,6 +115,7 @@
tab_title=
"Appearance"
description=
"Change your appearance and current look."
image=
"TabIcon_Appearance_Off"
image_selected=
"TabIcon_Appearance_Selected"
mouse_opaque=
"false"
background_visible=
"true"
>
...
...
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