Make iconified windows respect the space taken by the topbars and not overlap
parent
1b0dde5d89
commit
3daaf8d18e
|
|
@ -57,6 +57,7 @@
|
|||
#include "llhelp.h"
|
||||
#include "llmultifloater.h"
|
||||
#include "llsdutil.h"
|
||||
#include "../newview/llnavigationbar.h"
|
||||
|
||||
// use this to control "jumping" behavior when Ctrl-Tabbing
|
||||
const S32 TABBED_FLOATER_OFFSET = 0;
|
||||
|
|
@ -2361,7 +2362,11 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom)
|
|||
col < snap_rect_local.getWidth() - minimized_width;
|
||||
col += minimized_width)
|
||||
{
|
||||
for(S32 row = snap_rect_local.mTop - floater_header_size;
|
||||
|
||||
int offset;
|
||||
LLNavigationBar* navbar = LLNavigationBar::getInstance();
|
||||
offset = navbar->getVisHeight(); // AO, don't obscure the navbar
|
||||
for(S32 row = snap_rect_local.mTop - (floater_header_size + offset);
|
||||
row > floater_header_size;
|
||||
row -= floater_header_size ) //loop rows
|
||||
{
|
||||
|
|
|
|||
|
|
@ -736,6 +736,21 @@ int LLNavigationBar::getDefFavBarHeight()
|
|||
return mDefaultFpRect.getHeight();
|
||||
}
|
||||
|
||||
// AO, used to calculate the size of the top bars, so we don't overlap them.
|
||||
int LLNavigationBar::getVisHeight()
|
||||
{
|
||||
int h = 0;
|
||||
//LLFavoritesBarCtrl* fb = getChild<LLFavoritesBarCtrl>("favorite");
|
||||
bool fbVisible = gSavedSettings.getBOOL("ShowNavbarFavoritesPanel");
|
||||
bool nbVisible = gSavedSettings.getBOOL("ShowNavbarNavigationPanel");
|
||||
// TODO: Make this introspect controls to get the dynamic size.
|
||||
if (fbVisible)
|
||||
h += 15;
|
||||
if (nbVisible)
|
||||
h += 35;
|
||||
return h;
|
||||
}
|
||||
|
||||
void LLNavigationBar::showNavigationPanel(BOOL visible)
|
||||
{
|
||||
bool fpVisible = gSavedSettings.getBOOL("ShowNavbarFavoritesPanel");
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
#ifndef LL_LLNAVIGATIONBAR_H
|
||||
#define LL_LLNAVIGATIONBAR_H
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "llbutton.h"
|
||||
#include "../llui/llpanel.h"
|
||||
#include "../llui/llbutton.h"
|
||||
|
||||
class LLLocationInputCtrl;
|
||||
class LLMenuGL;
|
||||
|
|
@ -91,7 +91,7 @@ public:
|
|||
virtual ~LLNavigationBar();
|
||||
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void setVisible(BOOL visible);
|
||||
|
||||
|
|
@ -103,6 +103,7 @@ public:
|
|||
|
||||
int getDefNavBarHeight();
|
||||
int getDefFavBarHeight();
|
||||
int getVisHeight(); // AO - total vertical pixels in use, for insuring new windows don't overlap.
|
||||
|
||||
private:
|
||||
// the distance between navigation panel and favorites panel in pixels
|
||||
|
|
|
|||
Loading…
Reference in New Issue