SidebarController.cxx (239cbbc0) | SidebarController.cxx (4e21436d) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 481 unchanged lines hidden (view full) --- 490 491 if (bHasPanelSetChanged) 492 NotifyResize(); 493 494 // Tell the focus manager about the new panels and tab bar 495 // buttons. 496 maFocusManager.SetPanels(aNewPanels); 497 mpTabBar->UpdateFocusManager(maFocusManager); | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 481 unchanged lines hidden (view full) --- 490 491 if (bHasPanelSetChanged) 492 NotifyResize(); 493 494 // Tell the focus manager about the new panels and tab bar 495 // buttons. 496 maFocusManager.SetPanels(aNewPanels); 497 mpTabBar->UpdateFocusManager(maFocusManager); |
498 UpdateTitleBarIcons(); |
|
498} 499 500 501 502 503bool SidebarController::ArePanelSetsEqual ( 504 const SharedPanelContainer& rCurrentPanels, 505 const ResourceManager::PanelContextDescriptorContainer& rRequestedPanels) --- 139 unchanged lines hidden (view full) --- 645 case VCLEVENT_WINDOW_RESIZE: 646 NotifyResize(); 647 break; 648 649 case VCLEVENT_WINDOW_DATACHANGED: 650 // Force an update of deck and tab bar to reflect 651 // changes in theme (high contrast mode). 652 Theme::HandleDataChange(); | 499} 500 501 502 503 504bool SidebarController::ArePanelSetsEqual ( 505 const SharedPanelContainer& rCurrentPanels, 506 const ResourceManager::PanelContextDescriptorContainer& rRequestedPanels) --- 139 unchanged lines hidden (view full) --- 646 case VCLEVENT_WINDOW_RESIZE: 647 NotifyResize(); 648 break; 649 650 case VCLEVENT_WINDOW_DATACHANGED: 651 // Force an update of deck and tab bar to reflect 652 // changes in theme (high contrast mode). 653 Theme::HandleDataChange(); |
654 UpdateTitleBarIcons(); |
|
653 mpParentWindow->Invalidate(); 654 break; 655 656 case SFX_HINT_DYING: 657 dispose(); 658 break; 659 660 default: --- 273 unchanged lines hidden (view full) --- 934 nSetId, 935 Range(nMinimumWidth, nMaximumWidth)); 936 if (nMinimumWidth == nMaximumWidth) 937 pSplitWindow->SetItemSize(nSetId, nMinimumWidth); 938 } 939} 940 941 | 655 mpParentWindow->Invalidate(); 656 break; 657 658 case SFX_HINT_DYING: 659 dispose(); 660 break; 661 662 default: --- 273 unchanged lines hidden (view full) --- 936 nSetId, 937 Range(nMinimumWidth, nMaximumWidth)); 938 if (nMinimumWidth == nMaximumWidth) 939 pSplitWindow->SetItemSize(nSetId, nMinimumWidth); 940 } 941} 942 943 |
944 945 946void SidebarController::UpdateTitleBarIcons (void) 947{ 948 if ( ! mpCurrentDeck) 949 return; 950 951 const bool bIsHighContrastModeActive (Theme::IsHighContrastMode()); 952 const ResourceManager& rResourceManager (ResourceManager::Instance()); 953 954 // Update the deck icon. 955 const DeckDescriptor* pDeckDescriptor = rResourceManager.GetDeckDescriptor(mpCurrentDeck->GetId()); 956 if (pDeckDescriptor != NULL && mpCurrentDeck->GetTitleBar()) 957 { 958 const OUString sIconURL( 959 bIsHighContrastModeActive 960 ? pDeckDescriptor->msHighContrastTitleBarIconURL 961 : pDeckDescriptor->msTitleBarIconURL); 962 mpCurrentDeck->GetTitleBar()->SetIcon(Tools::GetImage(sIconURL, mxFrame)); 963 } 964 965 // Update the panel icons. 966 const SharedPanelContainer& rPanels (mpCurrentDeck->GetPanels()); 967 for (SharedPanelContainer::const_iterator 968 iPanel(rPanels.begin()), iEnd(rPanels.end()); 969 iPanel!=iEnd; 970 ++iPanel) 971 { 972 if ( ! *iPanel) 973 continue; 974 if ((*iPanel)->GetTitleBar() == NULL) 975 continue; 976 const PanelDescriptor* pPanelDescriptor = rResourceManager.GetPanelDescriptor((*iPanel)->GetId()); 977 if (pPanelDescriptor == NULL) 978 continue; 979 const OUString sIconURL ( 980 bIsHighContrastModeActive 981 ? pPanelDescriptor->msHighContrastTitleBarIconURL 982 : pPanelDescriptor->msTitleBarIconURL); 983 (*iPanel)->GetTitleBar()->SetIcon(Tools::GetImage(sIconURL, mxFrame)); 984 } 985} 986 987 |
|
942} } // end of namespace sfx2::sidebar | 988} } // end of namespace sfx2::sidebar |