libreoffice/horizontal-scrollbars-with-kde-oxygen-style.diff
Stephan Kulow 601058e269 Accepting request 89119 from LibreOffice:Unstable
- correctly-init-xthreads-in-qt.diff: let Qt call XInitThreads(),
  so that it knows it's been called (fdo#40298)
- avoid-wrong-asserts.diff: fix a bad assert; the following fix depends on it
- horizontal-scrollbars-with-kde-oxygen-style.diff: horizontal scrollbars with
  KDE Oxygen style (bnc#722918)

- kde4-tooltips-style.diff: tooltips are all black in KDE4 (bnc#723074,
  fdo#40461)
- do-not-display-math-in-desktop-menu.diff: do not display math in desktop
  menu (fdo#41681)
- desktop-submenu.diff: display LO application in the right desktop submenu
  (bnc#718694)
- bash-completion-for-loffice.diff: define bash completion for 'loffice'
  wrapper (bnc#719656)

- legacy-fragment-import-*.diff: legacy fragment PPTX import (bnc#699334)

OBS-URL: https://build.opensuse.org/request/show/89119
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=25
2011-10-24 10:37:06 +00:00

58 lines
3.0 KiB
Diff

Author: Luboš Luňák <l.lunak@suse.cz>
Date: Thu Oct 20 19:05:13 2011 +0200
fix horizontal scrollbars with KDE oxygen style (bnc#722918)
Apparently there are two style flags for detecting the widget
is horizontal.
--- vcl/unx/kde4/KDESalGraphics.cxx.old 2011-10-21 20:48:40.000000000 +0200
+++ vcl/unx/kde4/KDESalGraphics.cxx 2011-10-21 20:50:00.000000000 +0200
@@ -493,10 +493,9 @@ sal_Bool KDESalGraphics::drawNativeContr
if (sbVal->mnVisibleSize < sbVal->mnMax)
option.state = QStyle::State_MouseOver;
- //horizontal or vertical
- if (part == PART_DRAW_BACKGROUND_VERT)
- option.orientation = Qt::Vertical;
- else
+ bool horizontal = ( part == PART_DRAW_BACKGROUND_HORZ ); //horizontal or vertical
+ option.orientation = horizontal ? Qt::Horizontal : Qt::Vertical;
+ if( horizontal )
option.state |= QStyle::State_Horizontal;
//setup parameters from the OO values
@@ -592,7 +591,10 @@ sal_Bool KDESalGraphics::drawNativeContr
option.maximum = slVal->mnMax;
option.minimum = slVal->mnMin;
option.sliderPosition = option.sliderValue = slVal->mnCur;
- option.orientation = (part == PART_TRACK_HORZ_AREA) ? Qt::Horizontal : Qt::Vertical;
+ bool horizontal = ( part == PART_TRACK_HORZ_AREA ); //horizontal or vertical
+ option.orientation = horizontal ? Qt::Horizontal : Qt::Vertical;
+ if( horizontal )
+ option.state |= QStyle::State_Horizontal;
draw( QStyle::CC_Slider, &option, m_image, vclStateValue2StateFlag(nControlState, value) );
}
@@ -901,7 +903,10 @@ sal_Bool KDESalGraphics::getNativeContro
if( part == PART_TRACK_VERT_AREA || part == PART_TRACK_HORZ_AREA )
{
QStyleOptionSlider option;
- option.orientation = ( part == PART_TRACK_HORZ_AREA ) ? Qt::Horizontal : Qt::Vertical;
+ bool horizontal = ( part == PART_TRACK_HORZ_AREA ); //horizontal or vertical
+ option.orientation = horizontal ? Qt::Horizontal : Qt::Vertical;
+ if( horizontal )
+ option.state |= QStyle::State_Horizontal;
// getNativeControlRegion usually gets ImplControlValue as 'val' (i.e. not the proper
// subclass), so use random sensible values (doesn't matter anyway, as the wanted
// geometry here depends only on button sizes)
@@ -971,6 +976,8 @@ sal_Bool KDESalGraphics::hitTestNativeCo
rect.moveTo( 0, 0 );
QStyleOptionSlider options;
options.orientation = bHorizontal ? Qt::Horizontal : Qt::Vertical;
+ if( bHorizontal )
+ options.state |= QStyle::State_Horizontal;
options.rect = rect;
// some random sensible values, since we call this code only for scrollbar buttons,
// the slider position does not exactly matter