[Libreoffice-commits] core.git: vcl/unx vcl/win
Gurkaran
gurkran at gmail.com
Sat Mar 19 20:38:16 UTC 2016
vcl/unx/gtk/salnativewidgets-gtk.cxx | 14 +-------------
vcl/unx/kde4/KDESalGraphics.cxx | 11 -----------
vcl/win/gdi/salnativewidgets-luna.cxx | 1 -
3 files changed, 1 insertion(+), 25 deletions(-)
New commits:
commit 2f7815ab6b3f93f7f9712d403846f1874b8e3a2b
Author: Gurkaran <gurkran at gmail.com>
Date: Fri Mar 18 01:59:15 2016 +0530
tdf#97973 - cleanup spinbuttons theming logic.
vcl/unx/kde4/KDESalGraphics.cxx had a special case to build the widgetRect
for spin-buttons which is cleaned up.
vcl/unx/gtk/salnativewidgets-gtk.cxx had a wrong comment and special case
regarding CTRL_SPINBUTTONS which is cleaned up.
vcl/win/gdi/salnativewidgets-luna.cxx had a wrong comment regarding
spinbutton which is cleaned up.
Change-Id: I3c2797800221e150be165666bf71b65302724444
Signed-off-by: Gurkaran Singh <gurkran at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/23345
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx
index c4695b2..d6ecd33 100644
--- a/vcl/unx/gtk/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx
@@ -2514,19 +2514,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
downBtnState = pSpinVal->mnLowerState;
}
- // CTRL_SPINBUTTONS pass their area in pSpinVal, not in rControlRectangle
- if ( nType == CTRL_SPINBUTTONS )
- {
- if ( !pSpinVal )
- {
- std::fprintf( stderr, "Tried to draw CTRL_SPINBUTTONS, but the SpinButtons data structure didn't exist!\n" );
- return false;
- }
- pixmapRect = pSpinVal->maUpperRect;
- pixmapRect.Union( pSpinVal->maLowerRect );
- }
- else
- pixmapRect = rControlRectangle;
+ pixmapRect = rControlRectangle;
BEGIN_PIXMAP_RENDER( pixmapRect, gdkPixmap )
{
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index a05f358..5ac9cc4 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -216,17 +216,6 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
bool returnVal = true;
QRect widgetRect = region2QRect(rControlRegion);
- if( type == CTRL_SPINBOX && part == PART_ALL_BUTTONS )
- type = CTRL_SPINBUTTONS;
- if( type == CTRL_SPINBUTTONS )
- {
- OSL_ASSERT( value.getType() != CTRL_SPINBUTTONS );
- const SpinbuttonValue* pSpinVal = static_cast<const SpinbuttonValue *>(&value);
- Rectangle aButtonRect( pSpinVal->maUpperRect);
- aButtonRect.Union( pSpinVal->maLowerRect );
- widgetRect = QRect( aButtonRect.Left(), aButtonRect.Top(),
- aButtonRect.Right(), aButtonRect.Bottom() );
- }
//if no image, or resized, make a new image
if (!m_image || m_image->size() != widgetRect.size())
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx
index f789f17..7b4f5fd 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -666,7 +666,6 @@ bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
}
if( nType == CTRL_SPINBOX )
{
- // decrease spinbutton rects a little
//rc.right--;
//rc.bottom--;
if( nPart == PART_ALL_BUTTONS )
More information about the Libreoffice-commits
mailing list