Merge branch 'DRTVWR-600-maint-A' of https://github.com/secondlife/viewer

# Conflicts:
#	indra/llwindow/llwindow.cpp
#	indra/llwindow/llwindowmacosx.cpp
#	indra/llwindow/llwindowmacosx.h
#	indra/llwindow/llwindowwin32.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/lltextureview.cpp
#	indra/newview/llviewerwindow.cpp
master
Ansariel 2024-02-15 21:41:29 +01:00
commit 33dfa20463
22 changed files with 152 additions and 93 deletions

View File

@ -23,3 +23,4 @@ jobs:
path-to-signatures: signatures.json
remote-organization-name: secondlife
remote-repository-name: cla-signatures
allowlist: callum@mbp.localdomain

View File

@ -420,7 +420,7 @@ LLWindow* LLWindowManager::createWindow(
U32 max_cores,
U32 max_vram,
F32 max_gl_version,
BOOL useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
bool useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
{
LLWindow* new_window;
@ -433,8 +433,8 @@ LLWindow* LLWindowManager::createWindow(
#elif LL_SDL
new_window = new LLWindowSDL(callbacks,
title, x, y, width, height, flags,
//fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
//fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_vram);
fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_vram, useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
#elif LL_WINDOWS
new_window = new LLWindowWin32(callbacks,
title, name, x, y, width, height, flags,
@ -443,8 +443,8 @@ LLWindow* LLWindowManager::createWindow(
#elif LL_DARWIN
new_window = new LLWindowMacOSX(callbacks,
title, name, x, y, width, height, flags,
//fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
//fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_vram);
fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_vram, useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
#endif
}
else

View File

@ -166,6 +166,7 @@ public:
// query VRAM usage
virtual U32 getAvailableVRAMMegabytes() = 0;
virtual void setMaxVRAMMegabytes(U32 max_vram) = 0;
virtual void beforeDialog() {}; // prepare to put up an OS dialog (if special measures are required, such as in fullscreen mode)
virtual void afterDialog() {}; // undo whatever was done in beforeDialog()
@ -317,7 +318,7 @@ public:
U32 max_cores = 0,
U32 max_vram = 0,
F32 max_gl_version = 4.6f,
BOOL useLegacyCursors = FALSE); // <FS:LO> Legacy cursor setting from main program
bool useLegacyCursors = false); // <FS:LO> Legacy cursor setting from main program
static BOOL destroyWindow(LLWindow* window);
static BOOL isWindowValid(LLWindow *window);
};

View File

@ -102,6 +102,7 @@ public:
/*virtual*/ void setNativeAspectRatio(F32 ratio) override {}
U32 getAvailableVRAMMegabytes() override { return 4096; }
void setMaxVRAMMegabytes(U32 max_vram) override {}
/*virtual*/ void *getPlatformWindow() override { return 0; }
/*virtual*/ void bringToFront() override {}

View File

@ -120,12 +120,13 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
BOOL fullscreen, BOOL clearBg,
BOOL enable_vsync, BOOL use_gl,
BOOL ignore_pixel_depth,
//U32 fsaa_samples,) // <FS:LO> Legacy cursor setting from main program
U32 fsaa_samples,
BOOL useLegacyCursors)
U32 max_vram,
bool useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
: LLWindow(NULL, fullscreen, flags)
, mMaxVRAM(max_vram)
, mUseLegacyCursors(useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
{
mUseLegacyCursors = useLegacyCursors; // <FS:LO> Legacy cursor setting from main program
// *HACK: During window construction we get lots of OS events for window
// reshape, activate, etc. that the viewer isn't ready to handle.
// Route them to a dummy callback structure until the end of constructor.
@ -1270,7 +1271,12 @@ U32 LLWindowMacOSX::getAvailableVRAMMegabytes() {
static const U32 mb = 1024*1024;
// We're asked for total available gpu memory, but we only have allocation info on texture usage. So estimate by doubling that.
static const U32 total_factor = 2; // estimated total/textures
return gGLManager.mVRAM - (LLImageGL::getTextureBytesAllocated() * total_factor/mb);
U32 total_vram = gGLManager.mVRAM;
if (mMaxVRAM)
{
total_vram = llmin(mMaxVRAM, total_vram);
}
return total_vram - (LLImageGL::getTextureBytesAllocated() * total_factor/mb);
}
//static SInt32 oldWindowLevel;

View File

@ -102,6 +102,7 @@ public:
// query VRAM usage
/*virtual*/ U32 getAvailableVRAMMegabytes() override;
virtual void setMaxVRAMMegabytes(U32 max_vram) override { mMaxVRAM = max_vram; }
void beforeDialog() override;
void afterDialog() override;
@ -152,8 +153,9 @@ protected:
const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags,
BOOL fullscreen, BOOL clearBg, BOOL enable_vsync, BOOL use_gl,
BOOL ignore_pixel_depth,
//U32 fsaa_samples);
U32 fsaa_samples, BOOL useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
U32 fsaa_samples,
U32 max_vram,
bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
~LLWindowMacOSX();
//void initCursors();
@ -228,6 +230,7 @@ protected:
BOOL mMinimized;
U32 mFSAASamples;
BOOL mForceRebuild;
U32 mMaxVRAM;
S32 mDragOverrideCursor;
@ -241,7 +244,7 @@ public:
friend class LLWindowManager;
public:
BOOL mUseLegacyCursors; // <FS:LO> Legacy cursor setting from main program
bool mUseLegacyCursors; // <FS:LO> Legacy cursor setting from main program
};

View File

@ -440,7 +440,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
BOOL enable_vsync, BOOL use_gl,
// <FS:LO> Legacy cursor setting from main program
//BOOL ignore_pixel_depth, U32 fsaa_samples,)
BOOL ignore_pixel_depth, U32 fsaa_samples, BOOL useLegacyCursors)
BOOL ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors)
: LLWindow(callbacks, fullscreen, flags),
Lock_Display(NULL),
//Unlock_Display(NULL), mGamma(1.0f)
@ -2347,7 +2347,7 @@ void LLWindowSDL::updateCursor()
}
//void LLWindowSDL::initCursors()
void LLWindowSDL::initCursors(BOOL useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
void LLWindowSDL::initCursors(bool useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
{
int i;
// Blank the cursor pointer array for those we may miss.

View File

@ -118,6 +118,9 @@ public:
/*virtual*/ F32 getPixelAspectRatio();
/*virtual*/ void setNativeAspectRatio(F32 ratio) { mOverrideAspectRatio = ratio; }
U32 getAvailableVRAMMegabytes() override { return 4096; };
/*virtual*/ void setMaxVRAMMegabytes(U32 max_vram) {}
/*virtual*/ void beforeDialog();
/*virtual*/ void afterDialog();
@ -161,14 +164,14 @@ protected:
const std::string& title, int x, int y, int width, int height, U32 flags,
BOOL fullscreen, BOOL clearBg, BOOL enable_vsync, BOOL use_gl,
//BOOL ignore_pixel_depth, U32 fsaa_samples);
BOOL ignore_pixel_depth, U32 fsaa_samples, BOOL useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
BOOL ignore_pixel_depth, U32 fsaa_samples, bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
~LLWindowSDL();
/*virtual*/ BOOL isValid();
/*virtual*/ LLSD getNativeKeyData();
//void initCursors();
void initCursors(BOOL useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
void initCursors(bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
void quitCursors();
void moveWindow(const LLCoordScreen& position,const LLCoordScreen& size);
@ -227,7 +230,7 @@ private:
SDLMod mKeyModifiers;
U32 mSDLSym; // <FS:ND/> Store the SDL Keysym too.
BOOL mUseLegacyCursors; // <FS:LO> Legacy cursor setting from main program
bool mUseLegacyCursors; // <FS:LO> Legacy cursor setting from main program
public:
#if LL_X11

View File

@ -385,7 +385,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
BOOL enable_vsync, BOOL use_gl,
// <FS:LO> Legacy cursor setting from main program
//BOOL ignore_pixel_depth, U32 fsaa_samples,)
BOOL ignore_pixel_depth, U32 fsaa_samples, BOOL useLegacyCursors)
BOOL ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors)
: LLWindow(callbacks, fullscreen, flags),
Lock_Display(NULL),
//Unlock_Display(NULL), mGamma(1.0f)
@ -2193,7 +2193,7 @@ void LLWindowSDL::updateCursor()
}
//void LLWindowSDL::initCursors()
void LLWindowSDL::initCursors(BOOL useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
void LLWindowSDL::initCursors(bool useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
{
int i;
// Blank the cursor pointer array for those we may miss.

View File

@ -121,6 +121,7 @@ public:
/*virtual*/ void setNativeAspectRatio(F32 ratio) { mOverrideAspectRatio = ratio; }
U32 getAvailableVRAMMegabytes() override;
/*virtual*/ void setMaxVRAMMegabytes(U32 max_vram) {}
/*virtual*/ void beforeDialog();
/*virtual*/ void afterDialog();
@ -166,14 +167,14 @@ protected:
const std::string& title, int x, int y, int width, int height, U32 flags,
BOOL fullscreen, BOOL clearBg, BOOL enable_vsync, BOOL use_gl,
//BOOL ignore_pixel_depth, U32 fsaa_samples);
BOOL ignore_pixel_depth, U32 fsaa_samples, BOOL useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
BOOL ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
~LLWindowSDL();
/*virtual*/ BOOL isValid();
/*virtual*/ LLSD getNativeKeyData();
//void initCursors();
void initCursors(BOOL useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
void initCursors(bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
void quitCursors();
void moveWindow(const LLCoordScreen& position,const LLCoordScreen& size);
@ -237,7 +238,7 @@ private:
U32 mKeyModifiers;
std::string mInputType;
BOOL mUseLegacyCursors; // <FS:LO> Legacy cursor setting from main program
bool mUseLegacyCursors; // <FS:LO> Legacy cursor setting from main program
public:
#if LL_X11

View File

@ -442,7 +442,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
U32 max_cores,
U32 max_vram,
F32 max_gl_version,
BOOL useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
bool useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
:
LLWindow(callbacks, fullscreen, flags),
mMaxGLVersion(max_gl_version),
@ -2124,7 +2124,7 @@ HCURSOR LLWindowWin32::loadColorCursor(LPCTSTR name)
}
//void LLWindowWin32::initCursors()
void LLWindowWin32::initCursors(BOOL useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
void LLWindowWin32::initCursors(bool useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
{
mCursor[ UI_CURSOR_ARROW ] = LoadCursor(NULL, IDC_ARROW);
mCursor[ UI_CURSOR_WAIT ] = LoadCursor(NULL, IDC_WAIT);
@ -4685,6 +4685,14 @@ U32 LLWindowWin32::getAvailableVRAMMegabytes()
return mWindowThread ? mWindowThread->getAvailableVRAMMegabytes() : 0;
}
void LLWindowWin32::setMaxVRAMMegabytes(U32 max_vram)
{
if (mWindowThread)
{
mWindowThread->mMaxVRAM = max_vram;
}
}
// <FS:ND> Allow to query for window chrome sizes.
void LLWindowWin32::getWindowChrome( U32 &aChromeW, U32 &aChromeH )
{

View File

@ -109,6 +109,7 @@ public:
/*virtual*/ void setNativeAspectRatio(F32 ratio) { mOverrideAspectRatio = ratio; }
U32 getAvailableVRAMMegabytes() override;
/*virtual*/ void setMaxVRAMMegabytes(U32 max_vram) override;
/*virtual*/ BOOL dialogColorPicker(F32 *r, F32 *g, F32 *b );
@ -141,11 +142,11 @@ protected:
const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags,
BOOL fullscreen, BOOL clearBg, BOOL enable_vsync, BOOL use_gl,
//BOOL ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, U32 max_vram, F32 max_gl_version);
BOOL ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, U32 max_vram, F32 max_gl_version, BOOL useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
BOOL ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, U32 max_vram, F32 max_gl_version, bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
~LLWindowWin32();
//void initCursors();
void initCursors(BOOL useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
void initCursors(bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
void initInputDevices();
HCURSOR loadColorCursor(LPCTSTR name);
BOOL isValid();

View File

@ -12376,7 +12376,7 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>RenderMaxVRAMBudget</key>
<map>
<key>Comment</key>
<string>Maximum amount of texture memory to budget for (in MB), or 0 for autodetect. Requires restart.</string>
<string>Maximum amount of texture memory to budget for (in MB), or 0 for autodetect.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>

View File

@ -3951,6 +3951,13 @@ void reset_login()
chat_channel->removeToastsFromChannel();
}
LLFloaterReg::hideVisibleInstances();
// <FS:Ansariel> Improved menu and navigation bar
//if (LLStartUp::getStartupState() > STATE_WORLD_INIT)
//{
// gViewerWindow->resetStatusBarContainer();
//}
// </FS:Ansariel>
LLStartUp::setStartupState( STATE_BROWSER_INIT );
if (LLVoiceClient::instanceExists())

View File

@ -1214,7 +1214,7 @@ void LLFloaterTexturePicker::onBtnRemove(void* userdata)
LLScrollListItem* list_item = *iter;
if (list_item)
{
LLSD data = self->mLocalScrollCtrl->getFirstSelected()->getValue();
LLSD data = list_item->getValue();
LLUUID tracking_id = data["id"];
S32 asset_type = data["type"].asInteger();

View File

@ -554,12 +554,13 @@ void LLGLTexMemBar::draw()
U32 texFetchLatMed = U32(recording.getMean(LLTextureFetch::sTexFetchLatency).value() * 1000.0f);
U32 texFetchLatMax = U32(recording.getMax(LLTextureFetch::sTexFetchLatency).value() * 1000.0f);
text = llformat("GL Free: %d MB Sys Free: %d MB GL Tex: %d MB FBO: %d MB Bias: %.2f Cache: %.1f/%.1f MB",
text = llformat("GL Free: %d MB Sys Free: %d MB GL Tex: %d MB FBO: %d MB Bias: %.2f (%d MB) Cache: %.1f/%.1f MB",
gViewerWindow->getWindow()->getAvailableVRAMMegabytes(),
LLMemory::getAvailableMemKB()/1024,
LLImageGL::getTextureBytesAllocated() / 1024 / 1024,
LLRenderTarget::sBytesAllocated/(1024*1024),
discard_bias,
(S32)LLViewerTexture::sFreeVRAMMegabytes,
cache_usage,
cache_max_usage);
//, cache_entries, cache_max_entries

View File

@ -108,6 +108,9 @@ U32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA;
bool LLViewerTexture::sFreezeImageUpdates = false;
F32 LLViewerTexture::sCurrentTime = 0.0f;
constexpr F32 MIN_VRAM_BUDGET = 768.f;
F32 LLViewerTexture::sFreeVRAMMegabytes = MIN_VRAM_BUDGET;
LLViewerTexture::EDebugTexels LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_OFF;
const F64 log_2 = log(2.0);
@ -538,7 +541,10 @@ void LLViewerTexture::getGPUMemoryForTextures(S32Megabytes &gpu, S32Megabytes &p
timer.reset();
{
gpu_res = (S32Megabytes)gViewerWindow->getWindow()->getAvailableVRAMMegabytes();
// For purposes of texture memory need to check both, actual free
// memory and estimated free texture memory from bias calculations
U32 free_memory = llmin(gViewerWindow->getWindow()->getAvailableVRAMMegabytes(), (U32)sFreeVRAMMegabytes);
gpu_res = (S32Megabytes)free_memory;
//check main memory, only works for windows and macos.
LLMemory::updateMemoryInfo();
@ -575,7 +581,8 @@ void LLViewerTexture::updateClass()
F32 budget = max_vram_budget == 0 ? gGLManager.mVRAM : max_vram_budget;
// try to leave half a GB for everyone else, but keep at least 768MB for ourselves
F32 target = llmax(budget - 512.f, 768.f);
F32 target = llmax(budget - 512.f, MIN_VRAM_BUDGET);
sFreeVRAMMegabytes = target - used;
F32 over_pct = llmax((used-target) / target, 0.f);
sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.f + over_pct);

View File

@ -239,6 +239,9 @@ public:
static LLUUID sInvisiprimTexture1 ;
static LLUUID sInvisiprimTexture2 ;
// estimated free memory for textures, by bias calculation
static F32 sFreeVRAMMegabytes;
enum EDebugTexels
{
DEBUG_TEXELS_OFF,

View File

@ -1956,7 +1956,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
}
BOOL useLegacyCursors = gSavedSettings.getBOOL("FSUseLegacyCursors");//<FS:LO> Legacy cursor setting from main program
bool useLegacyCursors = gSavedSettings.getBOOL("FSUseLegacyCursors");//<FS:LO> Legacy cursor setting from main program
/*
LLWindowCallbacks* callbacks,
@ -1970,8 +1970,16 @@ LLViewerWindow::LLViewerWindow(const Params& p)
// create window
U32 max_core_count = gSavedSettings.getU32("EmulateCoreCount");
U32 max_vram = gSavedSettings.getU32("RenderMaxVRAMBudget");
F32 max_gl_version = gSavedSettings.getF32("RenderMaxOpenGLVersion");
LLControlVariable* vram_control = gSavedSettings.getControl("RenderMaxVRAMBudget");
U32 max_vram = vram_control->getValue().asInteger();
mMaxVRAMControlConnection = vram_control->getSignal()->connect(
[this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
{
if (mWindow) mWindow->setMaxVRAMMegabytes(new_val.asInteger());
});
mWindow = LLWindowManager::createWindow(this,
p.title, p.name, p.x, p.y, p.width, p.height, 0,
@ -2385,52 +2393,65 @@ void LLViewerWindow::initWorldUI()
// Force gFloaterTools to initialize
LLFloaterReg::getInstance("build");
// <FS:Ansariel> Improved menu and navigation bar
//LLNavigationBar* navbar = LLNavigationBar::getInstance();
//if (!gStatusBar)
//{
// // Status bar
// LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
// gStatusBar = new LLStatusBar(status_bar_container->getLocalRect());
// gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_RIGHT);
// gStatusBar->setShape(status_bar_container->getLocalRect());
// // sync bg color with menu bar
// gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
// // add InBack so that gStatusBar won't be drawn over menu
// status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/);
// status_bar_container->setVisible(TRUE);
// // Navigation bar
// LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
// navbar->setShape(nav_bar_container->getLocalRect());
// navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
// nav_bar_container->addChild(navbar);
// nav_bar_container->setVisible(TRUE);
//}
//else
//{
// LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
// LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
// status_bar_container->setVisible(TRUE);
// nav_bar_container->setVisible(TRUE);
//}
//if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
//{
// navbar->setVisible(FALSE);
//}
//else
//{
// reshapeStatusBarContainer();
//}
// Status bar
LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
gStatusBar = new LLStatusBar(status_bar_container->getLocalRect());
// <FS:Ansariel> Undo weird LL messing around with main view
//gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_RIGHT);
gStatusBar->setFollowsAll();
gStatusBar->setShape(status_bar_container->getLocalRect());
// sync bg color with menu bar
gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() );
// add InBack so that gStatusBar won't be drawn over menu
// <FS:Ansariel> Undo weird LL messing around with main view
//status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/);
status_bar_container->addChildInBack(gStatusBar);
status_bar_container->setVisible(TRUE);
gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
status_bar_container->addChildInBack(gStatusBar);
status_bar_container->setVisible(TRUE);
// <FS:Zi> Make navigation bar part of the UI
// // Navigation bar
// LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
// LLNavigationBar* navbar = LLNavigationBar::getInstance();
// navbar->setShape(nav_bar_container->getLocalRect());
// navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
// nav_bar_container->addChild(navbar);
// nav_bar_container->setVisible(TRUE);
// if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
// {
// navbar->setVisible(FALSE);
// }
// else
// {
// reshapeStatusBarContainer();
//}
// Force navigation bar to initialize
LLNavigationBar::getInstance();
// set navbar container visible which is initially hidden on the login screen,
// the real visibility of navbar and favorites bar is done via visibility control -Zi
LLNavigationBar::instance().getView()->setVisible(TRUE);
// </FS:Zi>
if (!gSavedSettings.getBOOL("ShowMenuBarLocation"))
{
gStatusBar->childSetVisible("parcel_info_panel",FALSE);
gStatusBar->childSetVisible("parcel_info_panel", FALSE);
}
// </FS:Ansariel>
// <FS:Zi> We don't have the mini location bar, so no topinfo_bar required
// // Top Info bar
@ -2706,6 +2727,8 @@ LLViewerWindow::~LLViewerWindow()
LLViewerShaderMgr::releaseInstance();
LLViewerShaderMgr::sInitialized = FALSE;
}
mMaxVRAMControlConnection.disconnect();
}
@ -7355,6 +7378,23 @@ void LLViewerWindow::reshapeStatusBarContainer()
}
status_bar_container->reshape(new_width, new_height, TRUE);
}
// <FS:Ansariel> Improved menu and navigation bar
//void LLViewerWindow::resetStatusBarContainer()
//{
// LLNavigationBar* navbar = LLNavigationBar::getInstance();
// if (gSavedSettings.getBOOL("ShowNavbarNavigationPanel") || navbar->getVisible())
// {
// // was previously showing navigation bar
// LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
// LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
// S32 new_height = status_bar_container->getRect().getHeight();
// S32 new_width = status_bar_container->getRect().getWidth();
// new_height -= nav_bar_container->getRect().getHeight();
// status_bar_container->reshape(new_width, new_height, TRUE);
// }
//}
// </FS:Ansariel>
//----------------------------------------------------------------------------

View File

@ -183,6 +183,8 @@ public:
void handlePieMenu(S32 x, S32 y, MASK mask);
void reshapeStatusBarContainer();
// <FS:Ansariel> Improved menu and navigation bar
//void resetStatusBarContainer(); // undo changes done by resetStatusBarContainer on initWorldUI()
BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down, bool &is_toolmgr_action);
@ -549,6 +551,8 @@ private:
// Object temporarily hovered over while dragging
LLPointer<LLViewerObject> mDragHoveredObject;
boost::signals2::connection mMaxVRAMControlConnection;
static LLTrace::SampleStatHandle<> sMouseVelocityStat;
};

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="simple_outfit_snapshot" title="アウトフィットのスナップショット">
<ui_ctrl name="thumbnail_placeholder"/>
<button label="画像を撮影" name="new_snapshot_btn"/>
<button label="保存L$ [UPLOAD_COST]" name="save_btn"/>
<button label="キャンセル" name="cancel_btn"/>
</floater>

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="グリッド" name="grids">
<text name="add_grid_text">
新しいグリッドを追加:
</text>
<line_editor name="add_grid" label="ログインURIを入力"/>
<button label="追加" name="add_grid_commit"/>
<text name="manage_grid_text">
グリッド管理:
</text>
<scroll_list name="grid_list">
<scroll_list.columns label="グリッド名" name="grid_label"/>
<scroll_list.columns label="ログインURI" name="login_uri"/>
<scroll_list.commit_callback function="Pref.SelectGrid"/>
</scroll_list>
<button label="有効化" name="activate_grid"/>
<button label="リフレッシュ" name="refresh_grid"/>
<button label="削除" name="remove_grid"/>
<button label="デバッグ" name="debug_grid"/>
<check_box label="ログイン時にグリッド選択を表示" name="show_grid_selection_check" tool_tip="ログイン画面にグリッド選択を表示して、他のワールドにログインします。"/>
</panel>