Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions linden/indra/llimage/llpngwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ void LLPngWrapper::normalizeImage()
}
if (mColorType == PNG_COLOR_TYPE_GRAY && mBitDepth < 8)
{
png_set_gray_1_2_4_to_8(mReadPngPtr);
/*png_set_gray_1_2_4_to_8(mReadPngPtr);*/
png_set_expand_gray_1_2_4_to_8(mReadPngPtr);
}
if (mColorType == PNG_COLOR_TYPE_GRAY
|| mColorType == PNG_COLOR_TYPE_GRAY_ALPHA)
Expand Down Expand Up @@ -364,7 +365,8 @@ void LLPngWrapper::releaseResources()
{
if (mReadPngPtr || mReadInfoPtr)
{
png_destroy_read_struct(&mReadPngPtr, &mReadInfoPtr, png_infopp_NULL);
png_destroy_read_struct(&mReadPngPtr, &mReadInfoPtr, NULL);
/*png_destroy_read_struct(&mReadPngPtr, &mReadInfoPtr, png_infopp_NULL);*/
mReadPngPtr = NULL;
mReadInfoPtr = NULL;
}
Expand Down
3 changes: 2 additions & 1 deletion linden/indra/llimage/llpngwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
#ifndef LL_LLPNGWRAPPER_H
#define LL_LLPNGWRAPPER_H

#include "libpng12/png.h"
#include "libpng14/png.h"
/*#include "libpng12/png.h"*/
#include "llimage.h"

class LLPngWrapper
Expand Down
42 changes: 40 additions & 2 deletions linden/indra/llui/llmenugl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2233,13 +2233,32 @@ void LLMenuGL::arrange( void )
if (mHorizontalLayout)
{
item_list_t::iterator item_iter;
item_list_t::iterator next_item_iter;
for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
{
if ((*item_iter)->getVisible())
{

// Add the next item in the list to be checked. This is done
// to make sure that there is not just one extra item in the spillover
// list. You do not want to just keep the last one if it is too long
// in case it is drop down list.
U32 testWidth = width;
next_item_iter = item_iter;
if(++next_item_iter != mItems.end()) {
testWidth += (*next_item_iter)->getNominalWidth();
if( ((*next_item_iter)->getType() == "separator") ||
((*next_item_iter)->getType() == "tearoff_menu") ) {
if(++next_item_iter != mItems.end()) {
testWidth += (*next_item_iter)->getNominalWidth();
}
}

}

if (!getTornOff()
&& item_iter != mItems.begin() // Don't spillover the first item!
&& width + (*item_iter)->getNominalWidth() > max_width - spillover_item_width)
&& testWidth + (*item_iter)->getNominalWidth() > max_width - spillover_item_width)
{
// no room for any more items
createSpilloverBranch();
Expand Down Expand Up @@ -2272,13 +2291,32 @@ void LLMenuGL::arrange( void )
else
{
item_list_t::iterator item_iter;
item_list_t::iterator next_item_iter;
for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
{
if ((*item_iter)->getVisible())
{

// Add the next item in the list to be checked. This is done
// to make sure that there is not just one extra item in the spillover
// list. You do not want to just keep the last one if it is too long
// in case it is drop down list.
U32 testHeight = height;
next_item_iter = item_iter;
if(++next_item_iter != mItems.end()) {
testHeight += (*next_item_iter)->getNominalHeight();
if( ((*next_item_iter)->getType() == "separator") ||
((*next_item_iter)->getType() == "tearoff_menu") ) {
if(++next_item_iter != mItems.end()) {
testHeight += (*next_item_iter)->getNominalHeight();
}
}

}

if (!getTornOff()
&& item_iter != mItems.begin() // Don't spillover the first item!
&& height + (*item_iter)->getNominalHeight() > max_height - spillover_item_height)
&& testHeight + (*item_iter)->getNominalHeight() > max_height - spillover_item_height)
{
// no room for any more items
createSpilloverBranch();
Expand Down