Align the tabs menu by using AttachedToWindow. Somewhat of a hack and I swear
InvalidateLayout worked before, but it does not seem to now. Also use a const for an empty BString instead of returning a local for the tab label. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@573 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
committed by
Alexandre Deckner
parent
255cade7a0
commit
552778e90c
@@ -48,6 +48,9 @@
|
|||||||
#include "TabView.h"
|
#include "TabView.h"
|
||||||
|
|
||||||
|
|
||||||
|
const static BString kEmptyString;
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark - Helper classes
|
// #pragma mark - Helper classes
|
||||||
|
|
||||||
|
|
||||||
@@ -265,8 +268,9 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force layout to get the final menu size
|
// Force layout to get the final menu size. InvalidateLayout()
|
||||||
tabMenu->InvalidateLayout();
|
// did not seem to work here.
|
||||||
|
tabMenu->AttachedToWindow();
|
||||||
BRect buttonFrame = fTabMenuButton->Frame();
|
BRect buttonFrame = fTabMenuButton->Frame();
|
||||||
BRect menuFrame = tabMenu->Frame();
|
BRect menuFrame = tabMenu->Frame();
|
||||||
BPoint openPoint = ConvertToScreen(buttonFrame.LeftBottom());
|
BPoint openPoint = ConvertToScreen(buttonFrame.LeftBottom());
|
||||||
@@ -911,7 +915,7 @@ TabManager::TabLabel(int32 tabIndex)
|
|||||||
if (tab)
|
if (tab)
|
||||||
return tab->Label();
|
return tab->Label();
|
||||||
else
|
else
|
||||||
return "";
|
return kEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user