зеркало из https://github.com/mozilla/gecko-dev.git
Tons o changes to make strip match UI spec (add, manage, close).
This commit is contained in:
Родитель
66913a09fd
Коммит
6b2a90f926
|
@ -268,7 +268,7 @@ CNavCenterTitle :: SetView ( HT_View inView )
|
|||
|
||||
CNavCenterCommandStrip :: CNavCenterCommandStrip ( LStream *inStream )
|
||||
: CNavCenterStrip (inStream),
|
||||
mDetails(NULL), mClose(NULL)
|
||||
mAddPage(NULL), mManage(NULL), mClose(NULL)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -288,11 +288,10 @@ CNavCenterCommandStrip :: ~CNavCenterCommandStrip()
|
|||
void
|
||||
CNavCenterCommandStrip :: FinishCreateSelf ( )
|
||||
{
|
||||
mDetails = dynamic_cast<CChameleonCaption*>(FindPaneByID(kDetailsPaneID));
|
||||
Assert_(mDetails != NULL);
|
||||
|
||||
// close command not always present
|
||||
// none of these are always present
|
||||
mClose = dynamic_cast<CChameleonCaption*>(FindPaneByID(kClosePaneID));
|
||||
mAddPage = dynamic_cast<CChameleonCaption*>(FindPaneByID(kAddPagePaneID));
|
||||
mManage = dynamic_cast<CChameleonCaption*>(FindPaneByID(kManagePaneID));
|
||||
|
||||
} // FinishCreateSelf
|
||||
|
||||
|
@ -307,30 +306,9 @@ CNavCenterCommandStrip :: SetView ( HT_View inView )
|
|||
{
|
||||
RGBColor textColor;
|
||||
if ( URDFUtilities::GetColor(HT_TopNode(GetView()), ForegroundColorProperty(), &textColor) ) {
|
||||
mDetails->SetColor ( textColor );
|
||||
if ( mClose )
|
||||
mClose->SetColor ( textColor );
|
||||
if ( mClose ) mClose->SetColor ( textColor );
|
||||
if ( mAddPage ) mAddPage->SetColor ( textColor );
|
||||
if ( mManage ) mManage->SetColor ( textColor );
|
||||
}
|
||||
|
||||
} // SetView
|
||||
|
||||
|
||||
//
|
||||
// ListenToMessage
|
||||
//
|
||||
// Handle mode switches between navigation and management.
|
||||
//
|
||||
void
|
||||
CNavCenterCommandStrip :: ListenToMessage ( MessageT inMessage, void* ioParam )
|
||||
{
|
||||
switch ( inMessage ) {
|
||||
case msg_ModeSwitch:
|
||||
//¥¥¥ set the title of the "show details" caption
|
||||
Refresh();
|
||||
break;
|
||||
|
||||
default:
|
||||
CNavCenterStrip::ListenToMessage ( inMessage, ioParam );
|
||||
}
|
||||
|
||||
} // ListenToMessage
|
||||
} // SetView
|
|
@ -103,8 +103,8 @@ private:
|
|||
class CNavCenterCommandStrip : public CNavCenterStrip
|
||||
{
|
||||
public:
|
||||
enum { class_ID = 'tcmd', kDetailsPaneID = 'deta', kClosePaneID = 'clos' } ;
|
||||
enum { msg_CloseShelfNow = 'clos', msg_ModeSwitch = 'mode' } ;
|
||||
enum { class_ID = 'tcmd', kAddPagePaneID = 'addp', kManagePaneID = 'edit', kClosePaneID = 'clos' } ;
|
||||
enum { msg_CloseShelfNow = 'clos', msg_AddPage = 'addp', msg_Manage = 'edit' } ;
|
||||
|
||||
// Construction, Destruction
|
||||
CNavCenterCommandStrip(LStream *inStream);
|
||||
|
@ -114,13 +114,13 @@ private:
|
|||
|
||||
virtual void SetView ( HT_View inView ) ;
|
||||
virtual void FinishCreateSelf ( ) ;
|
||||
virtual void ListenToMessage ( MessageT inMessage, void* ioParam );
|
||||
|
||||
virtual void* BackgroundURLProperty ( ) const { return gNavCenter->controlStripBGURL; }
|
||||
virtual void* BackgroundColorProperty ( ) const { return gNavCenter->controlStripBGColor; }
|
||||
virtual void* ForegroundColorProperty ( ) const { return gNavCenter->controlStripFGColor; }
|
||||
|
||||
CChameleonCaption* mDetails;
|
||||
CChameleonCaption* mClose;
|
||||
CChameleonCaption* mAddPage;
|
||||
CChameleonCaption* mManage;
|
||||
CChameleonCaption* mClose;
|
||||
|
||||
}; // class CNavCenterCommandStrip
|
||||
|
|
Загрузка…
Ссылка в новой задаче