Kaydet (Commit) 3156948d authored tarafından Thomas Arnhold's avatar Thomas Arnhold

Sidebar: Remove hightlight from TabBar after Deck close

After clicking on "Close Sidebar Deck" the highlighted icon
will now lose its highlight.

Change-Id: Iee947641343d46c84af7afb93cd52101e39149f7
üst 7c2697eb
...@@ -1012,6 +1012,9 @@ void SidebarController::RequestCloseDeck (void) ...@@ -1012,6 +1012,9 @@ void SidebarController::RequestCloseDeck (void)
{ {
mbIsDeckRequestedOpen = false; mbIsDeckRequestedOpen = false;
UpdateDeckOpenState(); UpdateDeckOpenState();
// remove highlight from TabBar, because Deck will be closed
mpTabBar->RemoveDeckHighlight();
} }
......
...@@ -251,6 +251,19 @@ void TabBar::HighlightDeck (const ::rtl::OUString& rsDeckId) ...@@ -251,6 +251,19 @@ void TabBar::HighlightDeck (const ::rtl::OUString& rsDeckId)
void TabBar::RemoveDeckHighlight ()
{
for (ItemContainer::iterator iItem(maItems.begin()),iEnd(maItems.end());
iItem!=iEnd;
++iItem)
{
iItem->mpButton->Check(false);
}
}
void TabBar::DataChanged (const DataChangedEvent& rDataChangedEvent) void TabBar::DataChanged (const DataChangedEvent& rDataChangedEvent)
{ {
SetBackground(Theme::GetPaint(Theme::Paint_TabBarBackground).GetWallpaper()); SetBackground(Theme::GetPaint(Theme::Paint_TabBarBackground).GetWallpaper());
......
...@@ -81,6 +81,7 @@ public: ...@@ -81,6 +81,7 @@ public:
void SetDecks ( void SetDecks (
const ResourceManager::DeckContextDescriptorContainer& rDecks); const ResourceManager::DeckContextDescriptorContainer& rDecks);
void HighlightDeck (const ::rtl::OUString& rsDeckId); void HighlightDeck (const ::rtl::OUString& rsDeckId);
void RemoveDeckHighlight ();
void AddPopupMenuEntries ( void AddPopupMenuEntries (
PopupMenu& rMenu, PopupMenu& rMenu,
const sal_Int32 nFirstIndex); const sal_Int32 nFirstIndex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment