svtools/source/contnr/svtreebx.cxx | 2 - vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 40 ++++++++----------------------- 2 files changed, 12 insertions(+), 30 deletions(-)
New commits: commit 6657052e463b4ff9c8a005faadcf2289d32343a3 Author: Ivan Timofeev <timofeev....@gmail.com> Date: Wed Aug 1 10:16:49 2012 +0400 consider only fully visible items Change-Id: I32d88e5206a96b316f29cf4ede04a6ac951d86d5 diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx index ec7d135..8e37676 100644 --- a/svtools/source/contnr/svtreebx.cxx +++ b/svtools/source/contnr/svtreebx.cxx @@ -2308,7 +2308,7 @@ SvLBoxEntry* SvTreeListBox::GetLastEntryInView() const { Point aPos( GetEntryPosition(pNext) ); const Size& rSize = pImp->GetOutputSize(); - if( aPos.Y() < 0 || aPos.Y() >= rSize.Height() ) + if( aPos.Y() < 0 || aPos.Y() + GetEntryHeight() >= rSize.Height() ) break; else pEntry = pNext; commit 09eb412b2c8c55c9b0a280a61d6fef18ab5c7c18 Author: Ivan Timofeev <timofeev....@gmail.com> Date: Fri Jul 27 20:53:32 2012 +0400 gtk: listbox border was not rendered remove extending of pixmapRect in the nPart == PART_WINDOW branch and simplify code, since rControlRectangle, pixmapRect and widgetRect are the same. Change-Id: I253851fad558e525cd533bb3576a9bba82187e53 diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 2f2158a..4d8ba82 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -2733,15 +2733,13 @@ sal_Bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, const ImplControlValue& aValue, const OUString& rCaption ) { - Rectangle pixmapRect; - Rectangle widgetRect; Rectangle aIndicatorRect; GtkStateType stateType; GtkShadowType shadowType; gint bInteriorFocus; gint nFocusLineWidth; gint nFocusPadding; - gint x,y; + gint x,y,w,h; GdkRectangle clipRect; NWEnsureGTKButton( m_nXScreen ); @@ -2749,27 +2747,16 @@ sal_Bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, NWEnsureGTKScrolledWindow( m_nXScreen ); NWConvertVCLStateToGTKState( nState, &stateType, &shadowType ); - // Find the overall bounding rect of the buttons's drawing area, - // plus its actual draw rect excluding adornment - pixmapRect = rControlRectangle; - if ( nPart == PART_WINDOW ) - { - // Make the widget a _bit_ bigger - pixmapRect.SetPos( Point( pixmapRect.Left() - 1, - pixmapRect.Top() - 1 ) ); - pixmapRect.SetSize( Size( pixmapRect.GetWidth() + 2, - pixmapRect.GetHeight() + 2 ) ); - } - - widgetRect = pixmapRect; - x = pixmapRect.Left(); - y = pixmapRect.Top(); - // set up references to correct drawable and cliprect NWSetWidgetState( gWidgetData[m_nXScreen].gBtnWidget, nState, stateType ); NWSetWidgetState( gWidgetData[m_nXScreen].gOptionMenuWidget, nState, stateType ); NWSetWidgetState( gWidgetData[m_nXScreen].gScrolledWindowWidget, nState, stateType ); + x = rControlRectangle.Left(); + y = rControlRectangle.Top(); + w = rControlRectangle.GetWidth(); + h = rControlRectangle.GetHeight(); + if ( nPart != PART_WINDOW ) { gtk_widget_style_get( gWidgetData[m_nXScreen].gOptionMenuWidget, @@ -2790,19 +2777,15 @@ sal_Bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, { // Listboxes must paint opaque since some themes have alpha-channel enabled bodies gtk_paint_flat_box( m_pWindow->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, - &clipRect, m_pWindow, "base", x, y, - pixmapRect.GetWidth(), pixmapRect.GetHeight() ); + &clipRect, m_pWindow, "base", x, y, w, h); gtk_paint_box( gWidgetData[m_nXScreen].gOptionMenuWidget->style, gdkDrawable, stateType, shadowType, &clipRect, gWidgetData[m_nXScreen].gOptionMenuWidget, "optionmenu", - x+(widgetRect.Left() - pixmapRect.Left()), - y+(widgetRect.Top() - pixmapRect.Top()), - widgetRect.GetWidth(), widgetRect.GetHeight() ); - aIndicatorRect = NWGetListBoxIndicatorRect( m_nXScreen, nType, nPart, widgetRect, nState, + x, y, w, h); + aIndicatorRect = NWGetListBoxIndicatorRect( m_nXScreen, nType, nPart, rControlRectangle, nState, aValue, rCaption ); gtk_paint_tab( gWidgetData[m_nXScreen].gOptionMenuWidget->style, gdkDrawable, stateType, shadowType, &clipRect, gWidgetData[m_nXScreen].gOptionMenuWidget, "optionmenutab", - x+(aIndicatorRect.Left() - pixmapRect.Left()), - y+(aIndicatorRect.Top() - pixmapRect.Top()), + aIndicatorRect.Left(), aIndicatorRect.Top(), aIndicatorRect.GetWidth(), aIndicatorRect.GetHeight() ); } else @@ -2811,8 +2794,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, gtk_paint_shadow( gWidgetData[m_nXScreen].gScrolledWindowWidget->style, gdkDrawable, GTK_STATE_NORMAL, shadowType, &clipRect, gWidgetData[m_nXScreen].gScrolledWindowWidget, "scrolled_window", - x+(widgetRect.Left() - pixmapRect.Left()), y+(widgetRect.Top() - pixmapRect.Top()), - widgetRect.GetWidth(), widgetRect.GetHeight() ); + x, y, w, h ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits