summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-29 16:54:48 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-29 16:58:19 +0900
commitb0922150c2b3a63b810af5adda2770f270185a61 (patch)
tree60cd073aef982eb3062927176716e80328092f0b
parent49ea2258d482950ad3af16f9c8ac4fef7f192fc0 (diff)
tdf#91677 fix invidsible menu in Base
Change-Id: Ie1a8d6125d4a9d67f06f7dc37aa4d5115ad1af28
-rw-r--r--svtools/source/contnr/imivctl1.cxx12
1 files 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();
}