Deskbar: Expand already running applications on startup.
Fixes #12480. Another way to solve this would be to ensure that TExpandoMenuBar was subscribed to TBarApp's notifications before TExpandoMenuBar::AttachedToWindow() returns, but creates other problems that this solution does not have. Signed-off-by: Augustin Cavalier <[email protected]>
This commit is contained in:
committed by
Augustin Cavalier
parent
de9c53f8f5
commit
2e95f9e6df
@@ -92,6 +92,7 @@ TExpandoMenuBar::TExpandoMenuBar(TBarView* barView, bool vertical)
|
||||
fBarView(barView),
|
||||
fVertical(vertical),
|
||||
fOverflow(false),
|
||||
fFirstBuild(true),
|
||||
fDeskbarMenuWidth(kMinMenuItemWidth),
|
||||
fPreviousDragTargetItem(NULL),
|
||||
fLastMousedOverItem(NULL),
|
||||
@@ -506,6 +507,10 @@ TExpandoMenuBar::BuildItems()
|
||||
AddItem(item, 0);
|
||||
} else
|
||||
AddItem(item);
|
||||
|
||||
if (fFirstBuild && fVertical && settings->expandNewTeams)
|
||||
item->ToggleExpandState(true);
|
||||
|
||||
} else {
|
||||
// existing team, update info and add it
|
||||
TTeamMenuItem* item = iter->second;
|
||||
@@ -551,6 +556,8 @@ TExpandoMenuBar::BuildItems()
|
||||
// weird value - we just override it again
|
||||
ResizeTo(itemWidth, 0);
|
||||
}
|
||||
|
||||
fFirstBuild = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@ private:
|
||||
TBarView* fBarView;
|
||||
bool fVertical : 1;
|
||||
bool fOverflow : 1;
|
||||
bool fFirstBuild : 1;
|
||||
|
||||
float fDeskbarMenuWidth;
|
||||
TTeamMenuItem* fPreviousDragTargetItem;
|
||||
|
||||
Reference in New Issue
Block a user