Skip to content

Commit f34af8f

Browse files
committed
#3398 Remove 3p logos from the viewer
1 parent eb48eea commit f34af8f

File tree

13 files changed

+4
-198
lines changed

13 files changed

+4
-198
lines changed

indra/newview/llprogressview.cpp

Lines changed: 0 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ bool LLProgressView::postBuild()
8181
{
8282
mProgressBar = getChild<LLProgressBar>("login_progress_bar");
8383

84-
mLogosLabel = getChild<LLTextBox>("logos_lbl");
85-
8684
mProgressText = getChild<LLTextBox>("progress_text");
8785
mMessageText = getChild<LLTextBox>("message_text");
8886

@@ -234,33 +232,6 @@ void LLProgressView::drawStartTexture(F32 alpha)
234232
gGL.popMatrix();
235233
}
236234

237-
void LLProgressView::drawLogos(F32 alpha)
238-
{
239-
if (mLogosList.empty())
240-
{
241-
return;
242-
}
243-
244-
// logos are tied to label,
245-
// due to potential resizes we have to figure offsets out on draw or resize
246-
S32 offset_x, offset_y;
247-
mLogosLabel->localPointToScreen(0, 0, &offset_x, &offset_y);
248-
std::vector<TextureData>::const_iterator iter = mLogosList.begin();
249-
std::vector<TextureData>::const_iterator end = mLogosList.end();
250-
for (; iter != end; iter++)
251-
{
252-
gl_draw_scaled_image_with_border(iter->mDrawRect.mLeft + offset_x,
253-
iter->mDrawRect.mBottom + offset_y,
254-
iter->mDrawRect.getWidth(),
255-
iter->mDrawRect.getHeight(),
256-
iter->mTexturep.get(),
257-
UI_VERTEX_COLOR % alpha,
258-
false,
259-
iter->mClipRect,
260-
iter->mOffsetRect);
261-
}
262-
}
263-
264235
void LLProgressView::draw()
265236
{
266237
static LLTimer timer;
@@ -276,7 +247,6 @@ void LLProgressView::draw()
276247
}
277248

278249
LLPanel::draw();
279-
drawLogos(alpha);
280250
return;
281251
}
282252

@@ -289,7 +259,6 @@ void LLProgressView::draw()
289259

290260
drawStartTexture(alpha);
291261
LLPanel::draw();
292-
drawLogos(alpha);
293262

294263
// faded out completely - remove panel and reveal world
295264
if (mFadeToWorldTimer.getElapsedTimeF32() > FADE_TO_WORLD_TIME )
@@ -324,7 +293,6 @@ void LLProgressView::draw()
324293
drawStartTexture(1.0f);
325294
// draw children
326295
LLPanel::draw();
327-
drawLogos(1.0f);
328296
}
329297

330298
void LLProgressView::setText(const std::string& text)
@@ -343,90 +311,6 @@ void LLProgressView::setMessage(const std::string& msg)
343311
mMessageText->setValue(mMessage);
344312
}
345313

346-
void LLProgressView::loadLogo(const std::string &path,
347-
const U8 image_codec,
348-
const LLRect &pos_rect,
349-
const LLRectf &clip_rect,
350-
const LLRectf &offset_rect)
351-
{
352-
// We need these images very early, so we have to force-load them, otherwise they might not load in time.
353-
if (!gDirUtilp->fileExists(path))
354-
{
355-
return;
356-
}
357-
358-
LLPointer<LLImageFormatted> start_image_frmted = LLImageFormatted::createFromType(image_codec);
359-
if (!start_image_frmted->load(path))
360-
{
361-
LL_WARNS("AppInit") << "Image load failed: " << path << LL_ENDL;
362-
return;
363-
}
364-
365-
LLPointer<LLImageRaw> raw = new LLImageRaw;
366-
if (!start_image_frmted->decode(raw, 0.0f))
367-
{
368-
LL_WARNS("AppInit") << "Image decode failed " << path << LL_ENDL;
369-
return;
370-
}
371-
// HACK: getLocalTexture allows only power of two dimentions
372-
raw->expandToPowerOfTwo();
373-
374-
TextureData data;
375-
data.mTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), false);
376-
data.mDrawRect = pos_rect;
377-
data.mClipRect = clip_rect;
378-
data.mOffsetRect = offset_rect;
379-
mLogosList.push_back(data);
380-
}
381-
382-
void LLProgressView::initLogos()
383-
{
384-
mLogosList.clear();
385-
386-
const U8 image_codec = IMG_CODEC_PNG;
387-
const LLRectf default_clip(0.f, 1.f, 1.f, 0.f);
388-
const S32 default_height = 28;
389-
const S32 default_pad = 15;
390-
391-
S32 icon_width, icon_height;
392-
393-
// We don't know final screen rect yet, so we can't precalculate position fully
394-
S32 texture_start_x = (S32)mLogosLabel->getFont()->getWidthF32(mLogosLabel->getWText().c_str()) + default_pad;
395-
S32 texture_start_y = -7;
396-
397-
// Normally we would just preload these textures from textures.xml,
398-
// and display them via icon control, but they are only needed on
399-
// startup and preloaded/UI ones stay forever
400-
// (and this code was done already so simply reused it)
401-
std::string temp_str = gDirUtilp->getExpandedFilename(LL_PATH_DEFAULT_SKIN, "textures", "3p_icons");
402-
403-
temp_str += gDirUtilp->getDirDelimiter();
404-
405-
#ifdef LL_HAVOK
406-
// original image size is 342x113, central element is on a larger side
407-
// plus internal padding, so it gets slightly more height than desired 32
408-
icon_width = 88;
409-
icon_height = 29;
410-
S32 pad_havok_y = -1;
411-
loadLogo(temp_str + "havok_logo.png",
412-
image_codec,
413-
LLRect(texture_start_x, texture_start_y + pad_havok_y + icon_height, texture_start_x + icon_width, texture_start_y + pad_havok_y),
414-
default_clip,
415-
default_clip);
416-
417-
texture_start_x += icon_width + default_pad;
418-
#endif //LL_HAVOK
419-
420-
// 108x41
421-
icon_width = 74;
422-
icon_height = default_height;
423-
loadLogo(temp_str + "vivox_logo.png",
424-
image_codec,
425-
LLRect(texture_start_x, texture_start_y + icon_height, texture_start_x + icon_width, texture_start_y),
426-
default_clip,
427-
default_clip);
428-
}
429-
430314
void LLProgressView::initStartTexture(S32 location_id, bool is_in_production)
431315
{
432316
if (gStartTexture.notNull())
@@ -505,19 +389,11 @@ void LLProgressView::initStartTexture(S32 location_id, bool is_in_production)
505389
void LLProgressView::initTextures(S32 location_id, bool is_in_production)
506390
{
507391
initStartTexture(location_id, is_in_production);
508-
initLogos();
509-
510-
childSetVisible("panel_icons", !mLogosList.empty());
511-
childSetVisible("panel_top_spacer", mLogosList.empty());
512392
}
513393

514394
void LLProgressView::releaseTextures()
515395
{
516396
gStartTexture = NULL;
517-
mLogosList.clear();
518-
519-
childSetVisible("panel_top_spacer", true);
520-
childSetVisible("panel_icons", false);
521397
}
522398

523399
void LLProgressView::setCancelButtonVisible(bool b, const std::string& label)

indra/newview/llprogressview.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ class LLProgressView :
5353

5454
/*virtual*/ void draw();
5555
void drawStartTexture(F32 alpha);
56-
void drawLogos(F32 alpha);
5756

5857
/*virtual*/ bool handleHover(S32 x, S32 y, MASK mask);
5958
/*virtual*/ bool handleKeyHere(KEY key, MASK mask);
@@ -86,7 +85,6 @@ class LLProgressView :
8685
protected:
8786
LLProgressBar* mProgressBar;
8887
LLMediaCtrl* mMediaCtrl;
89-
LLTextBox* mLogosLabel = nullptr;
9088
LLTextBox* mProgressText = nullptr;
9189
LLTextBox* mMessageText = nullptr;
9290
F32 mPercentDone;
@@ -105,25 +103,8 @@ class LLProgressView :
105103

106104
bool handleUpdate(const LLSD& event_data);
107105
static void onIdle(void* user_data);
108-
void loadLogo(const std::string &path, const U8 image_codec, const LLRect &pos_rect, const LLRectf &clip_rect, const LLRectf &offset_rect);
109-
// logos have unusual location and need to be preloaded to not appear grey, then deleted
110-
void initLogos();
111106
// Loads a bitmap to display during load
112107
void initStartTexture(S32 location_id, bool is_in_production);
113-
114-
private:
115-
// We need to draw textures on login, but only once.
116-
// So this vector gets filled up for textures to render and gets cleaned later
117-
// Some textures have unusual requirements, so we are rendering directly
118-
class TextureData
119-
{
120-
public:
121-
LLPointer<LLViewerTexture> mTexturep;
122-
LLRect mDrawRect;
123-
LLRectf mClipRect;
124-
LLRectf mOffsetRect;
125-
};
126-
std::vector<TextureData> mLogosList;
127108
};
128109

129110
#endif // LL_LLPROGRESSVIEW_H
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<?xml version="1.0" ?>
22
<panel name="login_progress_panel">
3-
<layout_panel name="panel_icons"/>
43
<layout_stack name="vertical_centering"/>
54
<layout_panel name="panel4"/>
65
<layout_panel name="center"/>
76
<layout_stack name="horizontal_centering">
8-
<text name="logos_lbl">Second Life verwendet</text>
97
</layout_stack>
108
</panel>

indra/newview/skins/default/xui/en/panel_progress.xml

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -44,38 +44,30 @@
4444
width="670" />
4545
<layout_panel
4646
auto_resize="false"
47-
height="275"
47+
height="240"
4848
layout="topleft"
49-
min_height="275"
49+
min_height="240"
5050
name="panel4"
5151
width="670">
5252
<icon
5353
color="LoginProgressBoxCenterColor"
5454
follows="left|right|bottom|top"
55-
height="275"
55+
height="240"
5656
image_name="Rounded_Square"
5757
layout="topleft"
5858
left="0"
5959
top="0"
6060
width="670" />
6161
<layout_stack
6262
follows="left|right|top|bottom"
63-
height="275"
63+
height="240"
6464
layout="topleft"
6565
left="0"
6666
orientation="vertical"
6767
name="vertical_centering"
6868
animate="false"
6969
top="0"
7070
width="670">
71-
<layout_panel
72-
auto_resize="false"
73-
height="30"
74-
layout="topleft"
75-
min_height="30"
76-
name="panel_top_spacer"
77-
width="670">
78-
</layout_panel>
7971
<layout_panel
8072
auto_resize="false"
8173
height="100"
@@ -142,30 +134,6 @@
142134
right="-90"
143135
word_wrap="true"/>
144136
</layout_panel>
145-
<layout_panel
146-
auto_resize="false"
147-
height="40"
148-
layout="topleft"
149-
min_height="40"
150-
name="panel_icons"
151-
width="670">
152-
<!--Logos are tied to following label from code-->
153-
<text
154-
follows="left|right|top"
155-
layout="topleft"
156-
font="SansSerifLarge"
157-
font_shadow="none"
158-
halign="left"
159-
height="16"
160-
width="240"
161-
left="47"
162-
top="6"
163-
line_spacing.pixels="2"
164-
name="logos_lbl"
165-
text_color="LoginProgressBoxTextColor">
166-
Second Life uses
167-
</text>
168-
</layout_panel>
169137
</layout_stack>
170138
</layout_panel>
171139
<layout_panel
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<?xml version="1.0" ?>
22
<panel name="login_progress_panel">
3-
<layout_panel name="panel_icons"/>
43
<layout_stack name="vertical_centering"/>
54
<layout_panel name="panel4"/>
65
<layout_panel name="center"/>
76
<layout_stack name="horizontal_centering">
8-
<text name="logos_lbl">Usos de Second Life</text>
97
</layout_stack>
108
</panel>
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<?xml version="1.0" ?>
22
<panel name="login_progress_panel">
3-
<layout_panel name="panel_icons"/>
43
<layout_stack name="vertical_centering"/>
54
<layout_panel name="panel4"/>
65
<layout_panel name="center"/>
76
<layout_stack name="horizontal_centering">
8-
<text name="logos_lbl">Second Life utilise</text>
97
</layout_stack>
108
</panel>
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<?xml version="1.0" ?>
22
<panel name="login_progress_panel">
3-
<layout_panel name="panel_icons"/>
43
<layout_stack name="vertical_centering"/>
54
<layout_panel name="panel4"/>
65
<layout_panel name="center"/>
76
<layout_stack name="horizontal_centering">
8-
<text name="logos_lbl">Utilizzi di Second Life</text>
97
</layout_stack>
108
</panel>

0 commit comments

Comments
 (0)