From b0922150c2b3a63b810af5adda2770f270185a61 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Fri, 29 May 2015 16:54:48 +0900 Subject: tdf#91677 fix invidsible menu in Base Change-Id: Ie1a8d6125d4a9d67f06f7dc37aa4d5115ad1af28 --- svtools/source/contnr/imivctl1.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index c19c9cbd75a7..53fe7723bc48 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -655,10 +655,6 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const Rec pCursor = aEntries[ 0 ]; } - // Show Focus at Init-Time - if (pView->HasFocus()) - GetFocus(); - size_t nCount = pZOrderList->size(); if (!nCount) return; @@ -1642,20 +1638,20 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po bool bDropTarget = pEntry->IsDropTarget(); bool bNoEmphasis = pEntry->IsBlockingEmphasis(); - vcl::Font aTempFont(rRenderContext.GetFont()); + rRenderContext.Push(PushFlags::FONT | PushFlags::TEXTCOLOR); OUString aEntryText(SvtIconChoiceCtrl::GetEntryText(pEntry, false)); Rectangle aTextRect(CalcTextRect(pEntry, &rPos, false, &aEntryText)); Rectangle aBmpRect(CalcBmpRect(pEntry, &rPos)); - bool bShowSelection = (((bSelected && !bCursored) || bDropTarget) && !bNoEmphasis && (eSelectionMode != NO_SELECTION)); + bool bShowSelection = ((bSelected && !bCursored) && !bNoEmphasis && (eSelectionMode != NO_SELECTION)); bool bActiveSelection = (0 != (nWinBits & WB_NOHIDESELECTION)) || pView->HasFocus(); if (bShowSelection) { const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings(); - vcl::Font aNewFont(aTempFont); + vcl::Font aNewFont(rRenderContext.GetFont()); // font fill colors that are attributed "hard" need corresponding "hard" // attributed highlight colors @@ -1710,7 +1706,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po if (pEntry == pCurHighlightFrame && !bNoEmphasis) DrawHighlightFrame(rRenderContext, CalcFocusRect(pEntry), false); - rRenderContext.SetFont(aTempFont); + rRenderContext.Pop(); if (bResetClipRegion) rRenderContext.SetClipRegion(); } -- cgit v1.2.3