tdf#111924 - Special characters: don't lose focus on context menu
Don't lose focus on the favorite or recently used items in the special characters dialog when right-clicking them to show the context menu. Change-Id: Iaedc4bbc6fb627591b9c0cd9a2c44940312eeb1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131721 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
This commit is contained in:
@@ -65,6 +65,7 @@ public:
|
|||||||
virtual void Hide() { m_pDrawingArea->hide(); }
|
virtual void Hide() { m_pDrawingArea->hide(); }
|
||||||
void GrabFocus() { m_pDrawingArea->grab_focus(); }
|
void GrabFocus() { m_pDrawingArea->grab_focus(); }
|
||||||
bool HasFocus() const { return m_pDrawingArea->has_focus(); }
|
bool HasFocus() const { return m_pDrawingArea->has_focus(); }
|
||||||
|
bool HasChildFocus() const { return m_pDrawingArea->has_child_focus(); }
|
||||||
bool IsVisible() const { return m_pDrawingArea->get_visible(); }
|
bool IsVisible() const { return m_pDrawingArea->get_visible(); }
|
||||||
bool IsReallyVisible() const { return m_pDrawingArea->is_visible(); }
|
bool IsReallyVisible() const { return m_pDrawingArea->is_visible(); }
|
||||||
bool IsEnabled() const { return m_pDrawingArea->get_sensitive(); }
|
bool IsEnabled() const { return m_pDrawingArea->get_sensitive(); }
|
||||||
|
@@ -189,7 +189,8 @@ void SvxCharView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
|
|||||||
aPoint.setX(-aBoundRect.Left() + (aSize.Width() - aBoundRect.GetWidth()) / 2);
|
aPoint.setX(-aBoundRect.Left() + (aSize.Width() - aBoundRect.GetWidth()) / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HasFocus())
|
// tdf#111924 - don't lose focus on context menu
|
||||||
|
if (HasFocus() || HasChildFocus())
|
||||||
{
|
{
|
||||||
rRenderContext.SetFillColor(aHighlightColor);
|
rRenderContext.SetFillColor(aHighlightColor);
|
||||||
rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), aSize));
|
rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), aSize));
|
||||||
|
Reference in New Issue
Block a user