diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-06-19 12:30:47 -0430 |
---|---|---|
committer | Rafael Dominguez <venccsralph@gmail.com> | 2012-06-19 12:30:47 -0430 |
commit | 5d89e41a758a8f86c536c42d99eef28608bd5708 (patch) | |
tree | 8b51a2b5020165f30d2f7dde9b351b30764ab24e /sfx2/source/control/templateview.cxx | |
parent | c6aa6cf65bd6c8daa84c2b89cc19b489229543ec (diff) |
Close the folder overlay when clicking the close icon.
Change-Id: I7ac53d7e9455a3d03008534f18ee7866777ecab7
Diffstat (limited to 'sfx2/source/control/templateview.cxx')
-rw-r--r-- | sfx2/source/control/templateview.cxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sfx2/source/control/templateview.cxx b/sfx2/source/control/templateview.cxx index 63fec5d16659..8ef3be40c420 100644 --- a/sfx2/source/control/templateview.cxx +++ b/sfx2/source/control/templateview.cxx @@ -90,6 +90,29 @@ void TemplateView::Paint (const Rectangle &rRect) mpProcessor->process(aSeq); } +void TemplateView::MouseButtonDown (const MouseEvent &rMEvt) +{ + if (rMEvt.IsLeft()) + { + Size aWinSize = GetOutputSizePixel(); + Size aImageSize = maCloseImg.GetSizePixel(); + + Point aPos; + aPos.Y() = (mnHeaderHeight - aImageSize.Height())/2; + aPos.X() = aWinSize.Width() - aImageSize.Width() - aPos.Y(); + + Rectangle aImgRect(aPos,aImageSize); + + if (aImgRect.IsInside(rMEvt.GetPosPixel())) + { + Show(false); + Clear(); + } + } + + ThumbnailView::MouseButtonDown(rMEvt); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |