diff options
author | Gurkaran <gurkran@gmail.com> | 2016-03-18 01:59:15 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-03-19 20:37:47 +0000 |
commit | 2f7815ab6b3f93f7f9712d403846f1874b8e3a2b (patch) | |
tree | 8589d35d00037cf6794f55721aaa1ce9f99dddc1 /vcl | |
parent | e688987b28d4995820d38cd88c8c66be33044492 (diff) |
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@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/23345
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk/salnativewidgets-gtk.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/kde4/KDESalGraphics.cxx | 11 | ||||
-rw-r--r-- | vcl/win/gdi/salnativewidgets-luna.cxx | 1 |
3 files changed, 1 insertions, 25 deletions
diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx index c4695b2d0d9a..d6ecd335060e 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 a05f358655d6..5ac9cc437c78 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 f789f17e1972..7b4f5fdd7b68 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 ) |