Resolves: fdo#42749 KDE oxygen theme and scrollbars

f41
Caolán McNamara 13 years ago
parent b0cc797be1
commit af45565ec3

@ -0,0 +1,65 @@
From 936d19e606cbf29d41bff42db559a01f5deb240c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@suse.cz>
Date: Thu, 20 Oct 2011 19:05:13 +0200
Subject: [PATCH] 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 | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 5dbe491..60cd4ed 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -493,10 +493,9 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
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::drawNativeControl( ControlType type, ControlPart part,
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::getNativeControlRegion( ControlType type, ControlPart p
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::hitTestNativeControl( ControlType nType, ControlPart nP
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
--
1.7.6.4

@ -71,7 +71,7 @@ Source32: http://dev-www.libreoffice.org/src/0ff7d225d087793c8c2c680d77aac
Source33: http://hg.services.openoffice.org/binaries/067201ea8b126597670b5eff72e1f66c-mythes-1.2.0.tar.gz
%endif
BuildRequires: zip, findutils, autoconf, flex, bison, icu, gperf, gcc-c++
BuildRequires: binutils, java-devel <= 1.6.0, boost-devel, zlib-devel
BuildRequires: binutils, java-devel = 1.6.0, boost-devel, zlib-devel
BuildRequires: python-devel, expat-devel, libxml2-devel, libxslt-devel, bc
BuildRequires: neon-devel, libcurl-devel, libidn-devel, pam-devel, cups-devel
BuildRequires: libXext-devel, libXt-devel, libICE-devel, libjpeg-devel, make
@ -140,6 +140,7 @@ Patch35: libreoffice-gcj.patch
Patch36: libreoffice-rhel6poppler.patch
%endif
Patch37: 0001-Related-i58612-don-t-crash-anyway.patch
Patch38: 0001-fix-horizontal-scrollbars-with-KDE-oxygen-style-bnc-.patch
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir}
@ -823,6 +824,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch36 -p0 -b .rhel6poppler.patch
%endif
%patch37 -p1 -b .i58612-don-t-crash-anyway.patch
%patch38 -p1 -b .fix-horizontal-scrollbars-with-KDE-oxygen-style-bnc-.patch
# these are horribly incomplete--empty translations and copied english
# strings with spattering of translated strings
@ -2125,8 +2127,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
* Thu Nov 10 2011 Caolán McNamara <caolanm@redhat.com> - 3.4.4.2-3
* Fri Nov 11 2011 Caolán McNamara <caolanm@redhat.com> - 3.4.4.2-3
- Related: fdo#42534 0001-Related-i58612-don-t-crash-anyway.patch
- Resolves: fdo#42749 KDE oxygen theme and scrollbars
* Thu Nov 10 2011 Stephan Bergmann <sbergman@redhat.com> - 3.4.4.2-2
- Patch to backport reading AES-encrypted ODF 1.2 documents

Loading…
Cancel
Save