summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/imivctl.hxx6
-rw-r--r--vcl/source/control/imivctl1.cxx33
2 files changed, 7 insertions, 32 deletions
diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx
index cd268c3d271a..90f9c4bb1986 100644
--- a/vcl/source/control/imivctl.hxx
+++ b/vcl/source/control/imivctl.hxx
@@ -135,7 +135,6 @@ class SvxIconChoiceCtrl_Impl
DrawTextFlags nCurTextDrawFlags;
ImplSVEvent * nUserEventAdjustScrBars;
SvxIconChoiceCtrlEntry* pCurHighlightFrame;
- bool bHighlightFramePressed;
SvxIconChoiceCtrlEntry* pHead = nullptr; // top left entry
SvxIconChoiceCtrlEntry* pCursor;
LocalFocus aFocus; // Data for focusrect
@@ -349,10 +348,7 @@ public:
void SetPositionMode( SvxIconChoiceCtrlPositionMode );
- void SetEntryHighlightFrame(
- SvxIconChoiceCtrlEntry* pEntry,
- bool bKeepHighlightFlags
- );
+ void SetEntryHighlightFrame(SvxIconChoiceCtrlEntry* pEntry);
void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBmpRect);
void CallEventListeners( VclEventId nEvent, void* pData );
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 27f363f4da76..9fcd4b83ab7c 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -62,7 +62,9 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
aImageSize( 32 * pCurView->GetDPIScaleFactor(), 32 * pCurView->GetDPIScaleFactor()),
pView(pCurView), nMaxVirtWidth(DEFAULT_MAX_VIRT_WIDTH), nMaxVirtHeight(DEFAULT_MAX_VIRT_HEIGHT),
nFlags(IconChoiceFlags::NONE), nUserEventAdjustScrBars(nullptr),
- pCurHighlightFrame(nullptr), bHighlightFramePressed(false), pHead(nullptr), pCursor(nullptr),
+ pCurHighlightFrame(nullptr),
+ pHead(nullptr),
+ pCursor(nullptr),
ePositionMode(SvxIconChoiceCtrlPositionMode::Free),
bUpdateMode(true)
{
@@ -578,7 +580,6 @@ void SvxIconChoiceCtrl_Impl::InitScrollBarBox()
bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
{
bool bHandled = true;
- bHighlightFramePressed = false;
if( !(nWinBits & WB_NOPOINTERFOCUS) )
pView->GrabFocus();
@@ -646,19 +647,6 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
nFlags &= ~IconChoiceFlags(IconChoiceFlags::DownCtrl | IconChoiceFlags::DownDeselect);
- if((nWinBits & WB_HIGHLIGHTFRAME) && bHighlightFramePressed && pCurHighlightFrame)
- {
- bHandled = true;
- SvxIconChoiceCtrlEntry* pEntry = pCurHighlightFrame;
- pCurHighlightFrame = nullptr; // force repaint of frame
- bHighlightFramePressed = false;
- SetEntryHighlightFrame( pEntry, true );
-
- pView->ClickIcon();
-
- // set focus on Icon
- SetCursor_Impl(pCurHighlightFrame);
- }
return bHandled;
}
@@ -671,7 +659,7 @@ bool SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt )
else if( nWinBits & WB_HIGHLIGHTFRAME )
{
SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos );
- SetEntryHighlightFrame( pEntry, false );
+ SetEntryHighlightFrame(pEntry);
}
else
return false;
@@ -2374,23 +2362,14 @@ void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(vcl::RenderContext& rRenderConte
aBmpRect.AdjustTop( -nBorder );
DecorationView aDecoView(&rRenderContext);
- DrawHighlightFrameStyle nDecoFlags;
- if (bHighlightFramePressed)
- nDecoFlags = DrawHighlightFrameStyle::In;
- else
- nDecoFlags = DrawHighlightFrameStyle::Out;
- aDecoView.DrawHighlightFrame(aBmpRect, nDecoFlags);
+ aDecoView.DrawHighlightFrame(aBmpRect, DrawHighlightFrameStyle::Out);
}
-void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry,
- bool bKeepHighlightFlags )
+void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame(SvxIconChoiceCtrlEntry* pEntry)
{
if( pEntry == pCurHighlightFrame )
return;
- if( !bKeepHighlightFlags )
- bHighlightFramePressed = false;
-
if (pCurHighlightFrame)
{
tools::Rectangle aInvalidationRect(GetEntryBoundRect(pCurHighlightFrame));