Fixed LLUploadDialog to display it's text.
Also made the view rectangle have some minimal size (1/10th of the screens width and height). Increased the used font a bit. Fixed removal of the dialog in the case of uploading to profile feed.
This commit is contained in:
@@ -1185,7 +1185,7 @@ void LLView::drawChildren()
|
||||
{
|
||||
// Only draw views that are within the root view
|
||||
LLRect screen_rect = viewp->calcScreenRect();
|
||||
if ( rootp->getLocalRect().overlaps(screen_rect) )
|
||||
if ( rootp->getRect().overlaps(screen_rect) )
|
||||
{
|
||||
//gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
LLUI::pushMatrix();
|
||||
|
||||
@@ -251,7 +251,6 @@ public:
|
||||
/*virtual*/ void uploadComplete(const LLSD& content)
|
||||
{
|
||||
// we don't care about what the server returns from this post, just clean up the UI
|
||||
LLUploadDialog::modalUploadFinished();
|
||||
LLFloaterSnapshot::savePostcardDone(true, mSnapshotIndex);
|
||||
}
|
||||
/*virtual*/ void uploadFailure(const LLSD& content)
|
||||
@@ -313,8 +312,6 @@ void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data,
|
||||
{
|
||||
LLFloaterPostcard *self = (LLFloaterPostcard *)user_data;
|
||||
|
||||
LLUploadDialog::modalUploadFinished();
|
||||
|
||||
LLFloaterSnapshot::savePostcardDone(!result, self->mSnapshotIndex);
|
||||
|
||||
if (result)
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
#include "llworld.h"
|
||||
#include "llagentui.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "lluploaddialog.h"
|
||||
|
||||
#include "llgl.h"
|
||||
#include "llglheaders.h"
|
||||
@@ -2018,6 +2019,7 @@ void LLFloaterSnapshot::saveLocalDone(bool success, int index)
|
||||
//static
|
||||
void LLFloaterSnapshot::saveFeedDone(bool success, int index)
|
||||
{
|
||||
LLUploadDialog::modalUploadFinished();
|
||||
LLSnapshotLivePreview* previewp = LLFloaterSnapshot::Impl::getPreviewView();
|
||||
if (previewp)
|
||||
{
|
||||
@@ -2028,6 +2030,7 @@ void LLFloaterSnapshot::saveFeedDone(bool success, int index)
|
||||
//static
|
||||
void LLFloaterSnapshot::savePostcardDone(bool success, int index)
|
||||
{
|
||||
LLUploadDialog::modalUploadFinished();
|
||||
LLSnapshotLivePreview* previewp = LLFloaterSnapshot::Impl::getPreviewView();
|
||||
if (previewp)
|
||||
{
|
||||
|
||||
@@ -75,7 +75,7 @@ LLUploadDialog::LLUploadDialog( const std::string& msg)
|
||||
}
|
||||
LLUploadDialog::sDialog = this;
|
||||
|
||||
const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF );
|
||||
const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_BIG );
|
||||
LLRect msg_rect;
|
||||
for (int line_num=0; line_num<16; ++line_num)
|
||||
{
|
||||
@@ -91,7 +91,10 @@ LLUploadDialog::LLUploadDialog( const std::string& msg)
|
||||
|
||||
void LLUploadDialog::setMessage( const std::string& msg)
|
||||
{
|
||||
const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF );
|
||||
S32 const min_width = gViewerWindow->getWindowWidthRaw() / 10;
|
||||
S32 const min_height = gViewerWindow->getWindowHeightRaw() / 10;
|
||||
|
||||
const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_BIG );
|
||||
|
||||
const S32 VPAD = 16;
|
||||
const S32 HPAD = 25;
|
||||
@@ -127,14 +130,14 @@ void LLUploadDialog::setMessage( const std::string& msg)
|
||||
|
||||
|
||||
S32 line_height = S32( font->getLineHeight() + 0.99f );
|
||||
S32 dialog_width = max_msg_width + 2 * HPAD;
|
||||
S32 dialog_height = line_height * msg_lines.size() + 2 * VPAD;
|
||||
S32 dialog_width = llmax(max_msg_width + 2 * HPAD, min_width);
|
||||
S32 dialog_height = llmax(line_height * (S32)msg_lines.size() + 2 * VPAD, min_height);
|
||||
|
||||
reshape( dialog_width, dialog_height, FALSE );
|
||||
|
||||
// Message
|
||||
S32 msg_x = (getRect().getWidth() - max_msg_width) / 2;
|
||||
S32 msg_y = getRect().getHeight() - VPAD - line_height;
|
||||
S32 msg_y = (getRect().getHeight() + line_height * msg_lines.size()) / 2 - line_height;
|
||||
int line_num;
|
||||
for (line_num=0; line_num<16; ++line_num)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user