gtk3: scrollbar damage area one pixel too narrow/short
under default Ambience theme Ubuntu 16.04 tools rectangle strikes again, rejig to be left/top + width/height rather than left/top + right/bottom Change-Id: Id5274f068863cd5219a89142b392c9ca53a1694d Reviewed-on: https://gerrit.libreoffice.org/30850 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -1359,7 +1359,9 @@ void SvpSalGraphics::releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, cons
|
|||||||
|
|
||||||
if (pDamage)
|
if (pDamage)
|
||||||
{
|
{
|
||||||
pDamage->damaged(pDamage->handle, nExtentsLeft, nExtentsTop, nExtentsRight, nExtentsBottom);
|
pDamage->damaged(pDamage->handle, nExtentsLeft, nExtentsTop,
|
||||||
|
nExtentsRight - nExtentsLeft,
|
||||||
|
nExtentsBottom - nExtentsTop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -67,8 +67,8 @@ typedef struct _cairo_user_data_key cairo_user_data_key_t;
|
|||||||
enum PaintMode { OVERPAINT, XOR, INVERT };
|
enum PaintMode { OVERPAINT, XOR, INVERT };
|
||||||
|
|
||||||
typedef void (*damageHandler)(void* handle,
|
typedef void (*damageHandler)(void* handle,
|
||||||
sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop,
|
sal_Int32 nExtentsX, sal_Int32 nExtentsY,
|
||||||
sal_Int32 nExtentsRight, sal_Int32 nExtentsBottom);
|
sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight);
|
||||||
|
|
||||||
struct VCL_DLLPUBLIC DamageHandler
|
struct VCL_DLLPUBLIC DamageHandler
|
||||||
{
|
{
|
||||||
|
@@ -969,12 +969,11 @@ GtkWidget *GtkSalFrame::getMouseEventWidget() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void damaged(void *handle,
|
static void damaged(void *handle,
|
||||||
sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop,
|
sal_Int32 nExtentsX, sal_Int32 nExtentsY,
|
||||||
sal_Int32 nExtentsRight, sal_Int32 nExtentsBottom)
|
sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight)
|
||||||
{
|
{
|
||||||
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(handle);
|
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(handle);
|
||||||
pThis->damaged(nExtentsLeft, nExtentsTop,
|
pThis->damaged(nExtentsX, nExtentsY, nExtentsWidth, nExtentsHeight);
|
||||||
nExtentsRight, nExtentsBottom);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GtkSalFrame::InitCommon()
|
void GtkSalFrame::InitCommon()
|
||||||
@@ -2826,8 +2825,8 @@ cairo_t* GtkSalFrame::getCairoContext() const
|
|||||||
return cr;
|
return cr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GtkSalFrame::damaged(sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop,
|
void GtkSalFrame::damaged(sal_Int32 nExtentsX, sal_Int32 nExtentsY,
|
||||||
sal_Int32 nExtentsRight, sal_Int32 nExtentsBottom) const
|
sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight) const
|
||||||
{
|
{
|
||||||
if (dumpframes)
|
if (dumpframes)
|
||||||
{
|
{
|
||||||
@@ -2839,9 +2838,8 @@ void GtkSalFrame::damaged(sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop,
|
|||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_queue_draw_area(GTK_WIDGET(m_pFixedContainer),
|
gtk_widget_queue_draw_area(GTK_WIDGET(m_pFixedContainer),
|
||||||
nExtentsLeft, nExtentsTop,
|
nExtentsX, nExtentsY,
|
||||||
nExtentsRight - nExtentsLeft,
|
nExtentsWidth, nExtentsHeight);
|
||||||
nExtentsBottom - nExtentsTop);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// blit our backing cairo surface to the target cairo context
|
// blit our backing cairo surface to the target cairo context
|
||||||
|
@@ -2010,8 +2010,6 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
|
|||||||
clipRegion(cr);
|
clipRegion(cr);
|
||||||
cairo_translate(cr, rControlRegion.Left(), rControlRegion.Top());
|
cairo_translate(cr, rControlRegion.Left(), rControlRegion.Top());
|
||||||
|
|
||||||
Rectangle aDamageRect(rControlRegion);
|
|
||||||
|
|
||||||
long nX = 0;
|
long nX = 0;
|
||||||
long nY = 0;
|
long nY = 0;
|
||||||
long nWidth = rControlRegion.GetWidth();
|
long nWidth = rControlRegion.GetWidth();
|
||||||
@@ -2173,8 +2171,8 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
|
|||||||
|
|
||||||
cairo_destroy(cr); // unref
|
cairo_destroy(cr); // unref
|
||||||
|
|
||||||
if (!aDamageRect.IsEmpty())
|
if (!rControlRegion.IsEmpty())
|
||||||
mpFrame->damaged(aDamageRect.Left(), aDamageRect.Top(), aDamageRect.Right(), aDamageRect.Bottom());
|
mpFrame->damaged(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user