fix for EXT-4469 Fast Timers: Minimize and Close icons do not work
--HG-- branch : product-enginemaster
parent
9676448291
commit
cdb0911a78
|
|
@ -1554,7 +1554,12 @@ void LLFloater::onClickClose( LLFloater* self )
|
|||
{
|
||||
if (!self)
|
||||
return;
|
||||
self->closeFloater(false);
|
||||
self->onClickCloseBtn();
|
||||
}
|
||||
|
||||
void LLFloater::onClickCloseBtn()
|
||||
{
|
||||
closeFloater(false);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -307,6 +307,8 @@ protected:
|
|||
|
||||
void destroy() { die(); } // Don't call this directly. You probably want to call closeFloater()
|
||||
|
||||
virtual void onClickCloseBtn();
|
||||
|
||||
private:
|
||||
void setForeground(BOOL b); // called only by floaterview
|
||||
void cleanupHandles(); // remove handles to dead floaters
|
||||
|
|
@ -346,6 +348,7 @@ protected:
|
|||
LLResizeBar* mResizeBar[4];
|
||||
LLResizeHandle* mResizeHandle[4];
|
||||
|
||||
LLButton* mButtons[BUTTON_COUNT];
|
||||
private:
|
||||
LLRect mExpandedRect;
|
||||
|
||||
|
|
@ -379,7 +382,6 @@ private:
|
|||
handle_set_t mDependents;
|
||||
|
||||
bool mButtonsEnabled[BUTTON_COUNT];
|
||||
LLButton* mButtons[BUTTON_COUNT];
|
||||
F32 mButtonScale;
|
||||
BOOL mAutoFocus;
|
||||
LLHandle<LLFloater> mSnappedTo;
|
||||
|
|
|
|||
|
|
@ -81,11 +81,13 @@ void LLDebugView::init()
|
|||
|
||||
r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f),
|
||||
(S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f));
|
||||
|
||||
mFastTimerView = new LLFastTimerView(r);
|
||||
mFastTimerView->setFollowsTop();
|
||||
mFastTimerView->setFollowsLeft();
|
||||
mFastTimerView->setVisible(FALSE); // start invisible
|
||||
addChild(mFastTimerView);
|
||||
mFastTimerView->setRect(rect);
|
||||
|
||||
r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f),
|
||||
(S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f));
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#include "llfontgl.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "lltooltip.h"
|
||||
#include "llbutton.h"
|
||||
|
||||
#include "llappviewer.h"
|
||||
#include "llviewertexturelist.h"
|
||||
|
|
@ -99,6 +100,8 @@ LLFastTimerView::LLFastTimerView(const LLRect& rect)
|
|||
FTV_NUM_TIMERS = LLFastTimer::NamedTimer::instanceCount();
|
||||
mPrintStats = -1;
|
||||
mAverageCyclesPerTimer = 0;
|
||||
setCanMinimize(false);
|
||||
setCanClose(true);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -139,6 +142,18 @@ LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y)
|
|||
|
||||
BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
|
||||
{
|
||||
S32 local_x = x - mButtons[BUTTON_CLOSE]->getRect().mLeft;
|
||||
S32 local_y = y - mButtons[BUTTON_CLOSE]->getRect().mBottom;
|
||||
if(mButtons[BUTTON_CLOSE]->getVisible()
|
||||
&& mButtons[BUTTON_CLOSE]->pointInView(local_x, local_y) )
|
||||
{
|
||||
return LLFloater::handleMouseDown(x, y, mask);;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (x < mBarRect.mLeft)
|
||||
{
|
||||
LLFastTimer::NamedTimer* idp = getLegendID(y);
|
||||
|
|
@ -188,11 +203,25 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
|
||||
BOOL LLFastTimerView::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
{
|
||||
S32 local_x = x - mButtons[BUTTON_CLOSE]->getRect().mLeft;
|
||||
S32 local_y = y - mButtons[BUTTON_CLOSE]->getRect().mBottom;
|
||||
if(mButtons[BUTTON_CLOSE]->getVisible()
|
||||
&& mButtons[BUTTON_CLOSE]->pointInView(local_x, local_y) )
|
||||
{
|
||||
return LLFloater::handleMouseUp(x, y, mask);;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
/*if(y>getRect().getHeight()-20)
|
||||
{
|
||||
return LLFloater::handleMouseDown(x, y, mask);
|
||||
}*/
|
||||
|
||||
mHoverTimer = NULL;
|
||||
mHoverID = NULL;
|
||||
|
||||
|
|
@ -1191,5 +1220,8 @@ void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std::
|
|||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFastTimerView::onClickCloseBtn()
|
||||
{
|
||||
setVisible(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,9 @@ public:
|
|||
|
||||
LLFastTimer::NamedTimer* getLegendID(S32 y);
|
||||
F64 getTime(const std::string& name);
|
||||
|
||||
|
||||
protected:
|
||||
virtual void onClickCloseBtn();
|
||||
private:
|
||||
typedef std::vector<std::vector<S32> > bar_positions_t;
|
||||
bar_positions_t mBarStart;
|
||||
|
|
|
|||
Loading…
Reference in New Issue