Deskbar: truncate full window titles

The truncation code was truncating window titles earlier than it should because
it was mistakenly leaving room for the expander arrows when it should only be
looking for those on team menu items, not window menu items.

Sorry for the regression.
This commit is contained in:
John Scipione 2015-02-20 21:05:14 -05:00
parent 64182ccb20
commit 4473bf2cea

View File

@ -41,7 +41,7 @@ All rights reserved.
#include "BarApp.h"
#include "BarView.h"
#include "ExpandoMenuBar.h"
#include "TeamMenuItem.h"
const float kVPad = 2.0f;
@ -90,10 +90,9 @@ const char*
TTruncatableMenuItem::Label(float width)
{
BMenu* menu = Menu();
TExpandoMenuBar* expandoMenuBar = dynamic_cast<TExpandoMenuBar*>(menu);
float maxWidth = menu->MaxContentWidth() - kVPad * 2;
if (expandoMenuBar != NULL
if (dynamic_cast<TTeamMenuItem*>(this) != NULL
&& static_cast<TBarApp*>(be_app)->BarView()->Vertical()
&& static_cast<TBarApp*>(be_app)->Settings()->superExpando) {
maxWidth -= kSwitchWidth;