Lines 492-497
void SidebarController::SwitchToDeck (
Link Here
|
492 |
// buttons. |
492 |
// buttons. |
493 |
maFocusManager.SetPanels(aNewPanels); |
493 |
maFocusManager.SetPanels(aNewPanels); |
494 |
mpTabBar->UpdateFocusManager(maFocusManager); |
494 |
mpTabBar->UpdateFocusManager(maFocusManager); |
|
|
495 |
UpdateTitleBarIcons(); |
495 |
} |
496 |
} |
496 |
|
497 |
|
497 |
|
498 |
|
Lines 653-658
IMPL_LINK(SidebarController, WindowEventHandler, VclWindowEvent*, pEvent)
Link Here
|
653 |
// Force an update of deck and tab bar to reflect |
654 |
// Force an update of deck and tab bar to reflect |
654 |
// changes in theme (high contrast mode). |
655 |
// changes in theme (high contrast mode). |
655 |
Theme::HandleDataChange(); |
656 |
Theme::HandleDataChange(); |
|
|
657 |
UpdateTitleBarIcons(); |
656 |
mpParentWindow->Invalidate(); |
658 |
mpParentWindow->Invalidate(); |
657 |
break; |
659 |
break; |
658 |
|
660 |
|
Lines 943-946
void SidebarController::RestrictWidth (void)
Link Here
|
943 |
} |
945 |
} |
944 |
|
946 |
|
945 |
|
947 |
|
|
|
948 |
|
949 |
|
950 |
void SidebarController::UpdateTitleBarIcons (void) |
951 |
{ |
952 |
if ( ! mpCurrentDeck) |
953 |
return; |
954 |
|
955 |
const bool bIsHighContrastModeActive (Theme::IsHighContrastMode()); |
956 |
const ResourceManager& rResourceManager (ResourceManager::Instance()); |
957 |
|
958 |
// Update the deck icon. |
959 |
const DeckDescriptor* pDeckDescriptor = rResourceManager.GetDeckDescriptor(mpCurrentDeck->GetId()); |
960 |
if (pDeckDescriptor != NULL && mpCurrentDeck->GetTitleBar()) |
961 |
{ |
962 |
const OUString sIconURL( |
963 |
bIsHighContrastModeActive |
964 |
? pDeckDescriptor->msHighContrastTitleBarIconURL |
965 |
: pDeckDescriptor->msTitleBarIconURL); |
966 |
mpCurrentDeck->GetTitleBar()->SetIcon(Tools::GetImage(sIconURL, mxFrame)); |
967 |
} |
968 |
|
969 |
// Update the panel icons. |
970 |
const SharedPanelContainer& rPanels (mpCurrentDeck->GetPanels()); |
971 |
for (SharedPanelContainer::const_iterator |
972 |
iPanel(rPanels.begin()), iEnd(rPanels.end()); |
973 |
iPanel!=iEnd; |
974 |
++iPanel) |
975 |
{ |
976 |
if ( ! *iPanel) |
977 |
continue; |
978 |
if ((*iPanel)->GetTitleBar() == NULL) |
979 |
continue; |
980 |
const PanelDescriptor* pPanelDescriptor = rResourceManager.GetPanelDescriptor((*iPanel)->GetId()); |
981 |
if (pPanelDescriptor == NULL) |
982 |
continue; |
983 |
const OUString sIconURL ( |
984 |
bIsHighContrastModeActive |
985 |
? pPanelDescriptor->msHighContrastTitleBarIconURL |
986 |
: pPanelDescriptor->msTitleBarIconURL); |
987 |
(*iPanel)->GetTitleBar()->SetIcon(Tools::GetImage(sIconURL, mxFrame)); |
988 |
} |
989 |
} |
990 |
|
991 |
|
946 |
} } // end of namespace sfx2::sidebar |
992 |
} } // end of namespace sfx2::sidebar |