diff options
author | Keith Curtis <keithcu@gmail.com> | 2014-01-02 16:01:07 -0500 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-01-04 13:01:52 +0100 |
commit | ae37972cd25117d467d34ee8591c21dcbb5a0fec (patch) | |
tree | e3125042122cc611150dcfb848307e43a7e00451 | |
parent | bdc192739892114e8b159a8af185ff28b873e748 (diff) |
hidpi: Sidebar, fontwork, autoformat and other improvements.
This is a second batch of HiDPI changes. It fixes the following areas:
Sidebar
* Impress Master pages preview
* deck title height
* tab (icon) bar
* valueset dropdown control
* wider maximum width
* Draw and other misc. buttons which didn't get fixed by earlier
change to Toolbar.SetItemImage
There are several more sidebar issues, but it is much improved.
Other changes
* Writer and Calc auto-format dialog text
* file-properties document image
* fontwork gallery preview size
* Calc table border control
Change-Id: I95a0169a3b011836b1c75b3dcacb2733c9567ef3
-rw-r--r-- | sc/source/ui/miscdlgs/autofmt.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellAppearancePropertyPanel.src | 1 | ||||
-rw-r--r-- | sd/source/ui/sidebar/MasterPagesSelector.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/sidebar/DeckLayouter.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarChildWindow.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 32 | ||||
-rw-r--r-- | sfx2/source/sidebar/TabBar.cxx | 25 | ||||
-rw-r--r-- | svx/source/sidebar/tools/ValueSetWithTextControl.cxx | 29 | ||||
-rw-r--r-- | svx/source/tbxctrls/fontworkgallery.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 13 | ||||
-rw-r--r-- | sw/source/ui/table/tautofmt.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 2 |
13 files changed, 109 insertions, 26 deletions
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index 425014f378a5..a536b22dbbfa 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx | |||
@@ -109,7 +109,7 @@ void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, Font& rFont, Font& rCJKFont | |||
109 | if ( pCurData ) | 109 | if ( pCurData ) |
110 | { | 110 | { |
111 | rFont = rCJKFont = rCTLFont = GetFont(); | 111 | rFont = rCJKFont = rCTLFont = GetFont(); |
112 | Size aFontSize( rFont.GetSize().Width(), 10 ); | 112 | Size aFontSize( rFont.GetSize().Width(), 10 * GetDPIScaleFactor() ); |
113 | 113 | ||
114 | const SvxFontItem* pFontItem = (const SvxFontItem*) pCurData->GetItem( nIndex, ATTR_FONT ); | 114 | const SvxFontItem* pFontItem = (const SvxFontItem*) pCurData->GetItem( nIndex, ATTR_FONT ); |
115 | const SvxWeightItem* pWeightItem = (const SvxWeightItem*) pCurData->GetItem( nIndex, ATTR_FONT_WEIGHT ); | 115 | const SvxWeightItem* pWeightItem = (const SvxWeightItem*) pCurData->GetItem( nIndex, ATTR_FONT_WEIGHT ); |
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.src b/sc/source/ui/sidebar/CellAppearancePropertyPanel.src index 00876285015e..4542e4cb184f 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.src +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.src | |||
@@ -167,6 +167,7 @@ Control RID_POPUPPANEL_APPEARANCE_CELL_BORDERSTYLE | |||
167 | DialogControl = TRUE; | 167 | DialogControl = TRUE; |
168 | Border = FALSE; | 168 | Border = FALSE; |
169 | 169 | ||
170 | //This is broken with the auto-doubled hidpi bitmaps | ||
170 | Size = MAP_PIXEL( POPUPPANEL_MARGIN_SMALL_PIXEL * 2 + 108, POPUPPANEL_MARGIN_SMALL_PIXEL * 2 + 138); | 171 | Size = MAP_PIXEL( POPUPPANEL_MARGIN_SMALL_PIXEL * 2 + 108, POPUPPANEL_MARGIN_SMALL_PIXEL * 2 + 138); |
171 | 172 | ||
172 | ToolBox TB_BORDER1 | 173 | ToolBox TB_BORDER1 |
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx index 783d4ed2b5fa..9d1444a1ef6d 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx | |||
@@ -87,6 +87,10 @@ MasterPagesSelector::MasterPagesSelector ( | |||
87 | PreviewValueSet::SetRightMouseClickHandler ( | 87 | PreviewValueSet::SetRightMouseClickHandler ( |
88 | LINK(this, MasterPagesSelector, RightClickHandler)); | 88 | LINK(this, MasterPagesSelector, RightClickHandler)); |
89 | PreviewValueSet::SetStyle(PreviewValueSet::GetStyle() | WB_NO_DIRECTSELECT); | 89 | PreviewValueSet::SetStyle(PreviewValueSet::GetStyle() | WB_NO_DIRECTSELECT); |
90 | |||
91 | if ( GetDPIScaleFactor() > 1 ) | ||
92 | mpContainer->SetPreviewSize(MasterPageContainer::LARGE); | ||
93 | |||
90 | PreviewValueSet::SetPreviewSize(mpContainer->GetPreviewSizePixel()); | 94 | PreviewValueSet::SetPreviewSize(mpContainer->GetPreviewSizePixel()); |
91 | PreviewValueSet::Show(); | 95 | PreviewValueSet::Show(); |
92 | 96 | ||
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 45030f326e0d..6b58a5181614 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx | |||
@@ -1055,7 +1055,16 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet ) | |||
1055 | aURL.SetSmartProtocol( INET_PROT_FILE ); | 1055 | aURL.SetSmartProtocol( INET_PROT_FILE ); |
1056 | aURL.SetSmartURL( aFactory); | 1056 | aURL.SetSmartURL( aFactory); |
1057 | const OUString& rMainURL = aURL.GetMainURL( INetURLObject::NO_DECODE ); | 1057 | const OUString& rMainURL = aURL.GetMainURL( INetURLObject::NO_DECODE ); |
1058 | m_pBmp->SetImage( SvFileInformationManager::GetImage( aURL, sal_True ) ); | 1058 | Image aImage = SvFileInformationManager::GetImage( aURL, sal_True ); |
1059 | |||
1060 | if ( GetDPIScaleFactor() > 1) | ||
1061 | { | ||
1062 | BitmapEx b = aImage.GetBitmapEx(); | ||
1063 | b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor()); | ||
1064 | aImage = Image(b); | ||
1065 | } | ||
1066 | |||
1067 | m_pBmp->SetImage( aImage ); | ||
1059 | 1068 | ||
1060 | // determine size and type | 1069 | // determine size and type |
1061 | OUString aSizeText( m_aUnknownSize ); | 1070 | OUString aSizeText( m_aUnknownSize ); |
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx index 9dcc3585a6ee..c87625b3458c 100644 --- a/sfx2/source/sidebar/DeckLayouter.cxx +++ b/sfx2/source/sidebar/DeckLayouter.cxx | |||
@@ -201,7 +201,6 @@ sal_Int32 DeckLayouter::PlacePanels ( | |||
201 | { | 201 | { |
202 | ::std::vector<sal_Int32> aSeparators; | 202 | ::std::vector<sal_Int32> aSeparators; |
203 | const sal_Int32 nDeckSeparatorHeight (Theme::GetInteger(Theme::Int_DeckSeparatorHeight)); | 203 | const sal_Int32 nDeckSeparatorHeight (Theme::GetInteger(Theme::Int_DeckSeparatorHeight)); |
204 | const sal_Int32 nPanelTitleBarHeight (Theme::GetInteger(Theme::Int_PanelTitleBarHeight)); | ||
205 | sal_Int32 nY (0); | 204 | sal_Int32 nY (0); |
206 | 205 | ||
207 | // Assign heights and places. | 206 | // Assign heights and places. |
@@ -220,6 +219,8 @@ sal_Int32 DeckLayouter::PlacePanels ( | |||
220 | PanelTitleBar* pTitleBar = rPanel.GetTitleBar(); | 219 | PanelTitleBar* pTitleBar = rPanel.GetTitleBar(); |
221 | if (pTitleBar != NULL) | 220 | if (pTitleBar != NULL) |
222 | { | 221 | { |
222 | const sal_Int32 nPanelTitleBarHeight (Theme::GetInteger(Theme::Int_PanelTitleBarHeight) * rPanel.GetDPIScaleFactor()); | ||
223 | |||
223 | if (iItem->mbShowTitleBar) | 224 | if (iItem->mbShowTitleBar) |
224 | { | 225 | { |
225 | pTitleBar->setPosSizePixel(0, nY, nWidth, nPanelTitleBarHeight); | 226 | pTitleBar->setPosSizePixel(0, nY, nWidth, nPanelTitleBarHeight); |
@@ -295,7 +296,6 @@ void DeckLayouter::GetRequestedSizes ( | |||
295 | { | 296 | { |
296 | rAvailableHeight = rContentBox.GetHeight(); | 297 | rAvailableHeight = rContentBox.GetHeight(); |
297 | 298 | ||
298 | const sal_Int32 nPanelTitleBarHeight (Theme::GetInteger(Theme::Int_PanelTitleBarHeight)); | ||
299 | const sal_Int32 nDeckSeparatorHeight (Theme::GetInteger(Theme::Int_DeckSeparatorHeight)); | 299 | const sal_Int32 nDeckSeparatorHeight (Theme::GetInteger(Theme::Int_DeckSeparatorHeight)); |
300 | 300 | ||
301 | IterateLayoutItems(iItem,rLayoutItems) | 301 | IterateLayoutItems(iItem,rLayoutItems) |
@@ -315,6 +315,8 @@ void DeckLayouter::GetRequestedSizes ( | |||
315 | { | 315 | { |
316 | // Show the title bar and a separator above and below | 316 | // Show the title bar and a separator above and below |
317 | // the title bar. | 317 | // the title bar. |
318 | const sal_Int32 nPanelTitleBarHeight (Theme::GetInteger(Theme::Int_PanelTitleBarHeight) * iItem->mpPanel->GetDPIScaleFactor()); | ||
319 | |||
318 | rAvailableHeight -= nPanelTitleBarHeight; | 320 | rAvailableHeight -= nPanelTitleBarHeight; |
319 | rAvailableHeight -= nDeckSeparatorHeight; | 321 | rAvailableHeight -= nDeckSeparatorHeight; |
320 | } | 322 | } |
@@ -438,7 +440,7 @@ Rectangle DeckLayouter::PlaceDeckTitle ( | |||
438 | } | 440 | } |
439 | else | 441 | else |
440 | { | 442 | { |
441 | const sal_Int32 nDeckTitleBarHeight (Theme::GetInteger(Theme::Int_DeckTitleBarHeight)); | 443 | const sal_Int32 nDeckTitleBarHeight (Theme::GetInteger(Theme::Int_DeckTitleBarHeight) * rDeckTitleBar.GetDPIScaleFactor()); |
442 | rDeckTitleBar.setPosSizePixel( | 444 | rDeckTitleBar.setPosSizePixel( |
443 | rAvailableSpace.Left(), | 445 | rAvailableSpace.Left(), |
444 | rAvailableSpace.Top(), | 446 | rAvailableSpace.Top(), |
diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx index 8ef593acd01c..f4347b1ccbf8 100644 --- a/sfx2/source/sidebar/SidebarChildWindow.cxx +++ b/sfx2/source/sidebar/SidebarChildWindow.cxx | |||
@@ -68,7 +68,7 @@ sal_Int32 SidebarChildWindow::GetDefaultWidth (Window* pWindow) | |||
68 | const static sal_Int32 nMaxPropertyPageWidth (115); | 68 | const static sal_Int32 nMaxPropertyPageWidth (115); |
69 | 69 | ||
70 | return pWindow->LogicToPixel(Point(nMaxPropertyPageWidth,1), MAP_APPFONT).X() | 70 | return pWindow->LogicToPixel(Point(nMaxPropertyPageWidth,1), MAP_APPFONT).X() |
71 | + TabBar::GetDefaultWidth(); | 71 | + TabBar::GetDefaultWidth() * pWindow->GetDPIScaleFactor(); |
72 | } | 72 | } |
73 | else | 73 | else |
74 | return 0; | 74 | return 0; |
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index d6fd4ba301a1..357c5456c4fe 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx | |||
@@ -338,11 +338,12 @@ void SidebarController::NotifyResize (void) | |||
338 | } | 338 | } |
339 | 339 | ||
340 | Window* pParentWindow = mpTabBar->GetParent(); | 340 | Window* pParentWindow = mpTabBar->GetParent(); |
341 | sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth() * mpTabBar->GetDPIScaleFactor(); | ||
341 | 342 | ||
342 | const sal_Int32 nWidth (pParentWindow->GetSizePixel().Width()); | 343 | const sal_Int32 nWidth (pParentWindow->GetSizePixel().Width()); |
343 | const sal_Int32 nHeight (pParentWindow->GetSizePixel().Height()); | 344 | const sal_Int32 nHeight (pParentWindow->GetSizePixel().Height()); |
344 | 345 | ||
345 | mbIsDeckOpen = (nWidth > TabBar::GetDefaultWidth()); | 346 | mbIsDeckOpen = (nWidth > nTabBarDefaultWidth); |
346 | 347 | ||
347 | if (mnSavedSidebarWidth <= 0) | 348 | if (mnSavedSidebarWidth <= 0) |
348 | mnSavedSidebarWidth = nWidth; | 349 | mnSavedSidebarWidth = nWidth; |
@@ -352,9 +353,9 @@ void SidebarController::NotifyResize (void) | |||
352 | { | 353 | { |
353 | const bool bIsOpening (nWidth > mnWidthOnSplitterButtonDown); | 354 | const bool bIsOpening (nWidth > mnWidthOnSplitterButtonDown); |
354 | if (bIsOpening) | 355 | if (bIsOpening) |
355 | bIsDeckVisible = nWidth >= TabBar::GetDefaultWidth() + gnWidthOpenThreshold; | 356 | bIsDeckVisible = nWidth >= nTabBarDefaultWidth + gnWidthOpenThreshold; |
356 | else | 357 | else |
357 | bIsDeckVisible = nWidth >= TabBar::GetDefaultWidth() + gnWidthCloseThreshold; | 358 | bIsDeckVisible = nWidth >= nTabBarDefaultWidth + gnWidthCloseThreshold; |
358 | mbIsDeckRequestedOpen = bIsDeckVisible; | 359 | mbIsDeckRequestedOpen = bIsDeckVisible; |
359 | UpdateCloseIndicator(!bIsDeckVisible); | 360 | UpdateCloseIndicator(!bIsDeckVisible); |
360 | } | 361 | } |
@@ -371,7 +372,7 @@ void SidebarController::NotifyResize (void) | |||
371 | { | 372 | { |
372 | if (bIsDeckVisible) | 373 | if (bIsDeckVisible) |
373 | { | 374 | { |
374 | mpCurrentDeck->setPosSizePixel(0,0, nWidth-TabBar::GetDefaultWidth(), nHeight); | 375 | mpCurrentDeck->setPosSizePixel(0,0, nWidth-nTabBarDefaultWidth, nHeight); |
375 | mpCurrentDeck->Show(); | 376 | mpCurrentDeck->Show(); |
376 | mpCurrentDeck->RequestLayout(); | 377 | mpCurrentDeck->RequestLayout(); |
377 | } | 378 | } |
@@ -380,19 +381,19 @@ void SidebarController::NotifyResize (void) | |||
380 | } | 381 | } |
381 | 382 | ||
382 | // Now place the tab bar. | 383 | // Now place the tab bar. |
383 | mpTabBar->setPosSizePixel(nWidth-TabBar::GetDefaultWidth(),0,TabBar::GetDefaultWidth(),nHeight); | 384 | mpTabBar->setPosSizePixel(nWidth-nTabBarDefaultWidth,0,nTabBarDefaultWidth,nHeight); |
384 | mpTabBar->Show(); | 385 | mpTabBar->Show(); |
385 | } | 386 | } |
386 | else if ( pSplitWindow->GetAlign() == WINDOWALIGN_LEFT) // attach the Sidebar towards the left-side of screen | 387 | else if ( pSplitWindow->GetAlign() == WINDOWALIGN_LEFT) // attach the Sidebar towards the left-side of screen |
387 | { | 388 | { |
388 | // Place the tab bar first. | 389 | // Place the tab bar first. |
389 | mpTabBar->setPosSizePixel(0,0,TabBar::GetDefaultWidth(),nHeight); | 390 | mpTabBar->setPosSizePixel(0,0,nTabBarDefaultWidth,nHeight); |
390 | mpTabBar->Show(); | 391 | mpTabBar->Show(); |
391 | 392 | ||
392 | // Now place the deck. | 393 | // Now place the deck. |
393 | if (bIsDeckVisible) | 394 | if (bIsDeckVisible) |
394 | { | 395 | { |
395 | mpCurrentDeck->setPosSizePixel(TabBar::GetDefaultWidth(),0, nWidth-TabBar::GetDefaultWidth(), nHeight); | 396 | mpCurrentDeck->setPosSizePixel(nTabBarDefaultWidth,0, nWidth-nTabBarDefaultWidth, nHeight); |
396 | mpCurrentDeck->Show(); | 397 | mpCurrentDeck->Show(); |
397 | mpCurrentDeck->RequestLayout(); | 398 | mpCurrentDeck->RequestLayout(); |
398 | } | 399 | } |
@@ -436,7 +437,7 @@ void SidebarController::ProcessNewWidth (const sal_Int32 nNewWidth) | |||
436 | mbIsDeckOpen = true; | 437 | mbIsDeckOpen = true; |
437 | RequestCloseDeck(); | 438 | RequestCloseDeck(); |
438 | 439 | ||
439 | if (mnWidthOnSplitterButtonDown > TabBar::GetDefaultWidth()) | 440 | if (mnWidthOnSplitterButtonDown > TabBar::GetDefaultWidth() * mpTabBar->GetDPIScaleFactor()) |
440 | mnSavedSidebarWidth = mnWidthOnSplitterButtonDown; | 441 | mnSavedSidebarWidth = mnWidthOnSplitterButtonDown; |
441 | } | 442 | } |
442 | } | 443 | } |
@@ -688,7 +689,7 @@ void SidebarController::SwitchToDeck ( | |||
688 | mpCurrentDeck->setPosSizePixel( | 689 | mpCurrentDeck->setPosSizePixel( |
689 | 0, | 690 | 0, |
690 | 0, | 691 | 0, |
691 | mpParentWindow->GetSizePixel().Width()-TabBar::GetDefaultWidth(), | 692 | mpParentWindow->GetSizePixel().Width()-TabBar::GetDefaultWidth() * mpTabBar->GetDPIScaleFactor(), |
692 | mpParentWindow->GetSizePixel().Height()); | 693 | mpParentWindow->GetSizePixel().Height()); |
693 | 694 | ||
694 | mpCurrentDeck->SetPanels(aNewPanels); | 695 | mpCurrentDeck->SetPanels(aNewPanels); |
@@ -1014,6 +1015,8 @@ void SidebarController::UpdateDeckOpenState (void) | |||
1014 | // No state requested. | 1015 | // No state requested. |
1015 | return; | 1016 | return; |
1016 | 1017 | ||
1018 | sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth() * mpTabBar->GetDPIScaleFactor(); | ||
1019 | |||
1017 | // Update (change) the open state when it either has not yet been initialized | 1020 | // Update (change) the open state when it either has not yet been initialized |
1018 | // or when its value differs from the requested state. | 1021 | // or when its value differs from the requested state. |
1019 | if ( ! mbIsDeckOpen | 1022 | if ( ! mbIsDeckOpen |
@@ -1021,7 +1024,7 @@ void SidebarController::UpdateDeckOpenState (void) | |||
1021 | { | 1024 | { |
1022 | if (mbIsDeckRequestedOpen.get()) | 1025 | if (mbIsDeckRequestedOpen.get()) |
1023 | { | 1026 | { |
1024 | if (mnSavedSidebarWidth <= TabBar::GetDefaultWidth()) | 1027 | if (mnSavedSidebarWidth <= nTabBarDefaultWidth) |
1025 | SetChildWindowWidth(SidebarChildWindow::GetDefaultWidth(mpParentWindow)); | 1028 | SetChildWindowWidth(SidebarChildWindow::GetDefaultWidth(mpParentWindow)); |
1026 | else | 1029 | else |
1027 | SetChildWindowWidth(mnSavedSidebarWidth); | 1030 | SetChildWindowWidth(mnSavedSidebarWidth); |
@@ -1029,8 +1032,8 @@ void SidebarController::UpdateDeckOpenState (void) | |||
1029 | else | 1032 | else |
1030 | { | 1033 | { |
1031 | if ( ! mpParentWindow->IsFloatingMode()) | 1034 | if ( ! mpParentWindow->IsFloatingMode()) |
1032 | mnSavedSidebarWidth = SetChildWindowWidth(TabBar::GetDefaultWidth()); | 1035 | mnSavedSidebarWidth = SetChildWindowWidth(nTabBarDefaultWidth); |
1033 | if (mnWidthOnSplitterButtonDown > TabBar::GetDefaultWidth()) | 1036 | if (mnWidthOnSplitterButtonDown > nTabBarDefaultWidth) |
1034 | mnSavedSidebarWidth = mnWidthOnSplitterButtonDown; | 1037 | mnSavedSidebarWidth = mnWidthOnSplitterButtonDown; |
1035 | mpParentWindow->SetStyle(mpParentWindow->GetStyle() & ~WB_SIZEABLE); | 1038 | mpParentWindow->SetStyle(mpParentWindow->GetStyle() & ~WB_SIZEABLE); |
1036 | } | 1039 | } |
@@ -1109,7 +1112,8 @@ void SidebarController::RestrictWidth (sal_Int32 nWidth) | |||
1109 | const sal_uInt16 nSetId (pSplitWindow->GetSet(nId)); | 1112 | const sal_uInt16 nSetId (pSplitWindow->GetSet(nId)); |
1110 | pSplitWindow->SetItemSizeRange( | 1113 | pSplitWindow->SetItemSizeRange( |
1111 | nSetId, | 1114 | nSetId, |
1112 | Range(TabBar::GetDefaultWidth() + nWidth, gnMaximumSidebarWidth)); | 1115 | Range(TabBar::GetDefaultWidth() * mpTabBar->GetDPIScaleFactor() + nWidth, |
1116 | gnMaximumSidebarWidth * mpTabBar->GetDPIScaleFactor())); | ||
1113 | } | 1117 | } |
1114 | } | 1118 | } |
1115 | 1119 | ||
@@ -1163,7 +1167,7 @@ void SidebarController::UpdateCloseIndicator (const bool bCloseAfterDrag) | |||
1163 | const Size aImageSize (mpCloseIndicator->GetSizePixel()); | 1167 | const Size aImageSize (mpCloseIndicator->GetSizePixel()); |
1164 | mpCloseIndicator->SetPosPixel( | 1168 | mpCloseIndicator->SetPosPixel( |
1165 | Point( | 1169 | Point( |
1166 | aWindowSize.Width() - TabBar::GetDefaultWidth() - aImageSize.Width(), | 1170 | aWindowSize.Width() - TabBar::GetDefaultWidth() * mpTabBar->GetDPIScaleFactor() - aImageSize.Width(), |
1167 | (aWindowSize.Height() - aImageSize.Height())/2)); | 1171 | (aWindowSize.Height() - aImageSize.Height())/2)); |
1168 | mpCloseIndicator->Show(); | 1172 | mpCloseIndicator->Show(); |
1169 | } | 1173 | } |
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index ba5974dadf12..353a2bb4238c 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx | |||
@@ -150,7 +150,14 @@ void TabBar::SetDecks ( | |||
150 | 150 | ||
151 | void TabBar::UpdateButtonIcons (void) | 151 | void TabBar::UpdateButtonIcons (void) |
152 | { | 152 | { |
153 | mpMenuButton->SetModeImage(Theme::GetImage(Theme::Image_TabBarMenu)); | 153 | Image aImage = Theme::GetImage(Theme::Image_TabBarMenu); |
154 | if ( mpMenuButton->GetDPIScaleFactor() > 1 ) | ||
155 | { | ||
156 | BitmapEx b = aImage.GetBitmapEx(); | ||
157 | b.Scale(mpMenuButton->GetDPIScaleFactor(), mpMenuButton->GetDPIScaleFactor(), BMP_SCALE_FAST); | ||
158 | aImage = Image(b); | ||
159 | } | ||
160 | mpMenuButton->SetModeImage(aImage); | ||
154 | 161 | ||
155 | for(ItemContainer::const_iterator | 162 | for(ItemContainer::const_iterator |
156 | iItem(maItems.begin()), iEnd(maItems.end()); | 163 | iItem(maItems.begin()), iEnd(maItems.end()); |
@@ -159,7 +166,17 @@ void TabBar::UpdateButtonIcons (void) | |||
159 | { | 166 | { |
160 | const DeckDescriptor* pDeckDescriptor = ResourceManager::Instance().GetDeckDescriptor(iItem->msDeckId); | 167 | const DeckDescriptor* pDeckDescriptor = ResourceManager::Instance().GetDeckDescriptor(iItem->msDeckId); |
161 | if (pDeckDescriptor != NULL) | 168 | if (pDeckDescriptor != NULL) |
162 | iItem->mpButton->SetModeImage(GetItemImage(*pDeckDescriptor)); | 169 | { |
170 | aImage = GetItemImage(*pDeckDescriptor); | ||
171 | if ( mpMenuButton->GetDPIScaleFactor() > 1 ) | ||
172 | { | ||
173 | BitmapEx b = aImage.GetBitmapEx(); | ||
174 | b.Scale(mpMenuButton->GetDPIScaleFactor(), mpMenuButton->GetDPIScaleFactor(), BMP_SCALE_FAST); | ||
175 | aImage = Image(b); | ||
176 | } | ||
177 | |||
178 | iItem->mpButton->SetModeImage(aImage); | ||
179 | } | ||
163 | } | 180 | } |
164 | 181 | ||
165 | Invalidate(); | 182 | Invalidate(); |
@@ -178,8 +195,8 @@ void TabBar::Layout (void) | |||
178 | sal_Int32 nX (aPadding.Top()); | 195 | sal_Int32 nX (aPadding.Top()); |
179 | sal_Int32 nY (aPadding.Left()); | 196 | sal_Int32 nY (aPadding.Left()); |
180 | const Size aTabItemSize ( | 197 | const Size aTabItemSize ( |
181 | Theme::GetInteger(Theme::Int_TabItemWidth), | 198 | Theme::GetInteger(Theme::Int_TabItemWidth) * GetDPIScaleFactor(), |
182 | Theme::GetInteger(Theme::Int_TabItemHeight)); | 199 | Theme::GetInteger(Theme::Int_TabItemHeight) * GetDPIScaleFactor()); |
183 | 200 | ||
184 | // Place the menu button and the separator. | 201 | // Place the menu button and the separator. |
185 | if (mpMenuButton != 0) | 202 | if (mpMenuButton != 0) |
diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx index 25d5798323f4..b897facd7aea 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx | |||
@@ -99,6 +99,21 @@ void ValueSetWithTextControl::AddItem( | |||
99 | aItem.maSelectedItemImage = (pSelectedItemImage != 0) | 99 | aItem.maSelectedItemImage = (pSelectedItemImage != 0) |
100 | ? *pSelectedItemImage | 100 | ? *pSelectedItemImage |
101 | : rItemImage; | 101 | : rItemImage; |
102 | |||
103 | if ( GetDPIScaleFactor() > 1 ) | ||
104 | { | ||
105 | BitmapEx b = aItem.maItemImage.GetBitmapEx(); | ||
106 | b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor()); | ||
107 | aItem.maItemImage = Image(b); | ||
108 | |||
109 | if ( pSelectedItemImage != 0 ) | ||
110 | { | ||
111 | b = aItem.maSelectedItemImage.GetBitmapEx(); | ||
112 | b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor()); | ||
113 | aItem.maSelectedItemImage = Image(b); | ||
114 | } | ||
115 | } | ||
116 | |||
102 | aItem.maItemText = rItemText; | 117 | aItem.maItemText = rItemText; |
103 | 118 | ||
104 | maItems.push_back( aItem ); | 119 | maItems.push_back( aItem ); |
@@ -151,6 +166,20 @@ void ValueSetWithTextControl::ReplaceItemImages( | |||
151 | maItems[nItemId-1].maSelectedItemImage = (pSelectedItemImage != 0) | 166 | maItems[nItemId-1].maSelectedItemImage = (pSelectedItemImage != 0) |
152 | ? *pSelectedItemImage | 167 | ? *pSelectedItemImage |
153 | : rItemImage; | 168 | : rItemImage; |
169 | |||
170 | if ( GetDPIScaleFactor() > 1 ) | ||
171 | { | ||
172 | BitmapEx b = maItems[nItemId-1].maItemImage.GetBitmapEx(); | ||
173 | b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor()); | ||
174 | maItems[nItemId-1].maItemImage = Image(b); | ||
175 | |||
176 | if ( pSelectedItemImage != 0 ) | ||
177 | { | ||
178 | b = maItems[nItemId-1].maSelectedItemImage.GetBitmapEx(); | ||
179 | b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor()); | ||
180 | maItems[nItemId-1].maSelectedItemImage = Image(b); | ||
181 | } | ||
182 | } | ||
154 | } | 183 | } |
155 | 184 | ||
156 | 185 | ||
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index db81609fe450..01b34f923724 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx | |||
@@ -126,6 +126,10 @@ void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId) | |||
126 | { | 126 | { |
127 | VirtualDevice aVDev; | 127 | VirtualDevice aVDev; |
128 | const Point aNull(0, 0); | 128 | const Point aNull(0, 0); |
129 | |||
130 | if (GetDPIScaleFactor() > 1) | ||
131 | aThumb.Scale(GetDPIScaleFactor(), GetDPIScaleFactor()); | ||
132 | |||
129 | const Size aSize(aThumb.GetSizePixel()); | 133 | const Size aSize(aThumb.GetSizePixel()); |
130 | 134 | ||
131 | aVDev.SetOutputSizePixel(aSize); | 135 | aVDev.SetOutputSizePixel(aSize); |
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index f7976e8ab12b..6d6befa2ff1f 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx | |||
@@ -1265,6 +1265,17 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFram | |||
1265 | AddStatusListener(OUString(".uno:BorderReducedMode")); | 1265 | AddStatusListener(OUString(".uno:BorderReducedMode")); |
1266 | aImgList = ImageList( SVX_RES( RID_SVXIL_FRAME ) ); | 1266 | aImgList = ImageList( SVX_RES( RID_SVXIL_FRAME ) ); |
1267 | 1267 | ||
1268 | if( pParentWindow->GetDPIScaleFactor() > 1 ) | ||
1269 | { | ||
1270 | for (short i = 0; i < aImgList.GetImageCount(); i++) | ||
1271 | { | ||
1272 | OUString rImageName = aImgList.GetImageName(i); | ||
1273 | BitmapEx b = aImgList.GetImage(rImageName).GetBitmapEx(); | ||
1274 | b.Scale(pParentWindow->GetDPIScaleFactor(), pParentWindow->GetDPIScaleFactor()); | ||
1275 | aImgList.ReplaceImage(rImageName, Image(b)); | ||
1276 | } | ||
1277 | } | ||
1278 | |||
1268 | /* | 1279 | /* |
1269 | * 1 2 3 4 | 1280 | * 1 2 3 4 |
1270 | * ------------------------------------- | 1281 | * ------------------------------------- |
@@ -1287,7 +1298,7 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFram | |||
1287 | aFrameSet.SetColCount( 4 ); | 1298 | aFrameSet.SetColCount( 4 ); |
1288 | aFrameSet.SetSelectHdl( LINK( this, SvxFrameWindow_Impl, SelectHdl ) ); | 1299 | aFrameSet.SetSelectHdl( LINK( this, SvxFrameWindow_Impl, SelectHdl ) ); |
1289 | 1300 | ||
1290 | lcl_CalcSizeValueSet( *this, aFrameSet,Size( 20, 20 )); | 1301 | lcl_CalcSizeValueSet( *this, aFrameSet, Size( 20 * pParentWindow->GetDPIScaleFactor(), 20 * pParentWindow->GetDPIScaleFactor() )); |
1291 | 1302 | ||
1292 | SetHelpId( HID_POPUP_FRAME ); | 1303 | SetHelpId( HID_POPUP_FRAME ); |
1293 | SetText( SVX_RESSTR(RID_SVXSTR_FRAME) ); | 1304 | SetText( SVX_RESSTR(RID_SVXSTR_FRAME) ); |
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 5b68feb1e3fa..0651d155cb53 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx | |||
@@ -566,7 +566,7 @@ void AutoFmtPreview::MakeFonts( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, F | |||
566 | const SwBoxAutoFmt& rBoxFmt = aCurData.GetBoxFmt( nIndex ); | 566 | const SwBoxAutoFmt& rBoxFmt = aCurData.GetBoxFmt( nIndex ); |
567 | 567 | ||
568 | rFont = rCJKFont = rCTLFont = GetFont(); | 568 | rFont = rCJKFont = rCTLFont = GetFont(); |
569 | Size aFontSize( rFont.GetSize().Width(), 10 ); | 569 | Size aFontSize( rFont.GetSize().Width(), 10 * GetDPIScaleFactor() ); |
570 | 570 | ||
571 | lcl_SetFontProperties( rFont, rBoxFmt.GetFont(), rBoxFmt.GetWeight(), rBoxFmt.GetPosture() ); | 571 | lcl_SetFontProperties( rFont, rBoxFmt.GetFont(), rBoxFmt.GetWeight(), rBoxFmt.GetPosture() ); |
572 | lcl_SetFontProperties( rCJKFont, rBoxFmt.GetCJKFont(), rBoxFmt.GetCJKWeight(), rBoxFmt.GetCJKPosture() ); | 572 | lcl_SetFontProperties( rCJKFont, rBoxFmt.GetCJKFont(), rBoxFmt.GetCJKWeight(), rBoxFmt.GetCJKPosture() ); |
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index fca0ce8b5971..1f9021971c8b 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx | |||
@@ -624,6 +624,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, | |||
624 | 624 | ||
625 | // Item anlegen und in die Liste einfuegen | 625 | // Item anlegen und in die Liste einfuegen |
626 | mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, rImage, nBits ) ); | 626 | mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, rImage, nBits ) ); |
627 | SetItemImage(nItemId, rImage); | ||
627 | mpData->ImplClearLayoutData(); | 628 | mpData->ImplClearLayoutData(); |
628 | 629 | ||
629 | ImplInvalidate( sal_True ); | 630 | ImplInvalidate( sal_True ); |
@@ -645,6 +646,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, | |||
645 | 646 | ||
646 | // Item anlegen und in die Liste einfuegen | 647 | // Item anlegen und in die Liste einfuegen |
647 | mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, rImage, ImplConvertMenuString( rText ), nBits ) ); | 648 | mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, rImage, ImplConvertMenuString( rText ), nBits ) ); |
649 | SetItemImage(nItemId, rImage); | ||
648 | mpData->ImplClearLayoutData(); | 650 | mpData->ImplClearLayoutData(); |
649 | 651 | ||
650 | ImplInvalidate( sal_True ); | 652 | ImplInvalidate( sal_True ); |