Resolves: tdf#165455 fix hover in RTL custom widgets under GTK

Change-Id: If8f4e219766a7a17a85fea60e4d7855684e57d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182649
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara
2025-03-08 01:00:46 +01:00
parent 1553e8c2b2
commit 8e2effa895
+6 -1
View File
@@ -18951,7 +18951,12 @@ public:
#if !GTK_CHECK_VERSION(4, 0, 0)
tools::Rectangle aRect(Point(x, y), Size(width, height));
aRect = m_xDevice->LogicToPixel(aRect);
gtk_widget_queue_draw_area(GTK_WIDGET(m_pDrawingArea), aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight());
x = aRect.Left();
if (SwapForRTL())
x = gtk_widget_get_allocated_width(m_pWidget) - aRect.GetWidth() - 1 - x;
gtk_widget_queue_draw_area(GTK_WIDGET(m_pDrawingArea), x, aRect.Top(), aRect.GetWidth(), aRect.GetHeight());
#else
(void)x; (void)y; (void)width; (void)height;
queue_draw();