diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2014-08-23 14:37:16 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2014-08-24 05:27:24 +0200 |
commit | 3156948d813f94c00ac87f80c5850f9f67b42318 (patch) | |
tree | ce900e68baa32c222010a84a743c219a9275fc01 /sfx2 | |
parent | 7c2697eb1c645c6a8ad362002e9212446a458a9d (diff) |
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
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/sidebar/TabBar.cxx | 13 | ||||
-rw-r--r-- | sfx2/source/sidebar/TabBar.hxx | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index cb266405f6d4..7d7141b1ae2b 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -1012,6 +1012,9 @@ void SidebarController::RequestCloseDeck (void) { mbIsDeckRequestedOpen = false; UpdateDeckOpenState(); + + // remove highlight from TabBar, because Deck will be closed + mpTabBar->RemoveDeckHighlight(); } diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 29b377fdccc8..8587bcb52baa 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -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) { SetBackground(Theme::GetPaint(Theme::Paint_TabBarBackground).GetWallpaper()); diff --git a/sfx2/source/sidebar/TabBar.hxx b/sfx2/source/sidebar/TabBar.hxx index b9d4e717c2f4..e037533c7e06 100644 --- a/sfx2/source/sidebar/TabBar.hxx +++ b/sfx2/source/sidebar/TabBar.hxx @@ -81,6 +81,7 @@ public: void SetDecks ( const ResourceManager::DeckContextDescriptorContainer& rDecks); void HighlightDeck (const ::rtl::OUString& rsDeckId); + void RemoveDeckHighlight (); void AddPopupMenuEntries ( PopupMenu& rMenu, const sal_Int32 nFirstIndex); |