From dade0145eb15cba90c2c1e87dd0953b5fca7edcc Mon Sep 17 00:00:00 2001 From: David Tardon Date: Wed, 19 Apr 2017 21:02:20 +0200 Subject: [PATCH] update to 5.3.3 rc1 --- .gitignore | 3 + ...df-106645-gtk3-scrollbar-is-too-wide.patch | 537 ------------------ libreoffice.spec | 12 +- sources | 6 +- 4 files changed, 13 insertions(+), 545 deletions(-) delete mode 100644 0001-Resolves-tdf-106645-gtk3-scrollbar-is-too-wide.patch diff --git a/.gitignore b/.gitignore index 4d4fc71..8453ff6 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,6 @@ /libreoffice-5.3.2.2.tar.xz /libreoffice-help-5.3.2.2.tar.xz /libreoffice-translations-5.3.2.2.tar.xz +/libreoffice-5.3.3.1.tar.xz +/libreoffice-help-5.3.3.1.tar.xz +/libreoffice-translations-5.3.3.1.tar.xz diff --git a/0001-Resolves-tdf-106645-gtk3-scrollbar-is-too-wide.patch b/0001-Resolves-tdf-106645-gtk3-scrollbar-is-too-wide.patch deleted file mode 100644 index 601e167..0000000 --- a/0001-Resolves-tdf-106645-gtk3-scrollbar-is-too-wide.patch +++ /dev/null @@ -1,537 +0,0 @@ -From 8adaca3cb46f200a58e3bba84e061fdce015358f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Wed, 22 Mar 2017 11:21:33 +0000 -Subject: [PATCH] Resolves: tdf#106645 gtk3 scrollbar is too wide - -Change-Id: I4041dff0945c4bd34e085078a7130b637124c6cd -(cherry picked from commit aa5d6f5acbab12b1ba76365f776ba228ba5e7e0e) - -Related: tdf#106645 make gtk3 scrollbar themes with arrows work - -properly, e.g. breeze-dark has arrows - -Change-Id: Ic59c0de3fb385adc2f8fddc605edd7498230d5fb -(cherry picked from commit 9b7c35b4b7fd5a5347a3602f110d78e1019a54e9) ---- - vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 453 ++++++++++++++++++++++++++++-- - 1 file changed, 429 insertions(+), 24 deletions(-) - -diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx -index 729b6f5..c8be891 100644 ---- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx -+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx -@@ -216,31 +216,42 @@ Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, Rectangle aAre - return partRect; - } - --Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle aAreaRect ) -+namespace - { -- GtkStyleContext* pScrollbarStyle = nullptr; -- if ((nPart == ControlPart::ButtonLeft) || (nPart == ControlPart::ButtonRight)) -- pScrollbarStyle = mpHScrollbarStyle; -- else // (nPart == ControlPart::ButtonUp) || (nPart == ControlPart::ButtonDown) -- pScrollbarStyle = mpVScrollbarStyle; -+ void QuerySize(GtkStyleContext *pContext, Size &rSize) -+ { -+ GtkBorder margin, border, padding; - -- gint slider_width; -- gint stepper_size; -- gint stepper_spacing; -- gint trough_border; -+ gtk_style_context_get_margin(pContext, gtk_style_context_get_state(pContext), &margin); -+ gtk_style_context_get_border(pContext, gtk_style_context_get_state(pContext), &border); -+ gtk_style_context_get_padding(pContext, gtk_style_context_get_state(pContext), &padding); - -- // Grab some button style attributes -- gtk_style_context_get_style( pScrollbarStyle, -- "slider-width", &slider_width, -- "stepper-size", &stepper_size, -- "trough-border", &trough_border, -- "stepper-spacing", &stepper_spacing, nullptr ); -+ int nMinWidth, nMinHeight; -+ gtk_style_context_get(pContext, gtk_style_context_get_state(pContext), -+ "min-width", &nMinWidth, "min-height", &nMinHeight, nullptr); -+ -+ nMinWidth += margin.left + margin.right + border.left + border.right + padding.left + padding.right; -+ nMinHeight += margin.top + margin.bottom + border.top + border.bottom + padding.top + padding.bottom; -+ -+ rSize = Size(std::max(rSize.Width(), nMinWidth), std::max(rSize.Height(), nMinHeight)); -+ } -+} -+ -+Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle aAreaRect ) -+{ -+ Rectangle buttonRect; - - gboolean has_forward; - gboolean has_forward2; - gboolean has_backward; - gboolean has_backward2; - -+ GtkStyleContext* pScrollbarStyle = nullptr; -+ if ((nPart == ControlPart::ButtonLeft) || (nPart == ControlPart::ButtonRight)) -+ pScrollbarStyle = mpHScrollbarStyle; -+ else // (nPart == ControlPart::ButtonUp) || (nPart == ControlPart::ButtonDown) -+ pScrollbarStyle = mpVScrollbarStyle; -+ - gtk_style_context_get_style( pScrollbarStyle, - "has-forward-stepper", &has_forward, - "has-secondary-forward-stepper", &has_forward2, -@@ -248,7 +259,6 @@ Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle aA - "has-secondary-backward-stepper", &has_backward2, nullptr ); - gint buttonWidth; - gint buttonHeight; -- Rectangle buttonRect; - - gint nFirst = 0; - gint nSecond = 0; -@@ -258,6 +268,64 @@ Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle aA - if ( has_backward ) nFirst += 1; - if ( has_backward2 ) nSecond += 1; - -+ if (gtk_check_version(3, 20, 0) == nullptr) -+ { -+ Size aSize; -+ if (nPart == ControlPart::ButtonLeft || nPart == ControlPart::ButtonRight) -+ { -+ QuerySize(mpHScrollbarStyle, aSize); -+ QuerySize(mpHScrollbarContentsStyle, aSize); -+ QuerySize(mpHScrollbarButtonStyle, aSize); -+ } -+ else -+ { -+ QuerySize(mpVScrollbarStyle, aSize); -+ QuerySize(mpVScrollbarContentsStyle, aSize); -+ QuerySize(mpVScrollbarButtonStyle, aSize); -+ } -+ -+ if (nPart == ControlPart::ButtonUp) -+ { -+ aSize.Height() *= nFirst; -+ buttonRect.setX(aAreaRect.Left()); -+ buttonRect.setY(aAreaRect.Top()); -+ } -+ else if (nPart == ControlPart::ButtonLeft) -+ { -+ aSize.Width() *= nFirst; -+ buttonRect.setX(aAreaRect.Left()); -+ buttonRect.setY(aAreaRect.Top()); -+ } -+ else if (nPart == ControlPart::ButtonDown) -+ { -+ aSize.Height() *= nSecond; -+ buttonRect.setX(aAreaRect.Left()); -+ buttonRect.setY(aAreaRect.Top() + aAreaRect.GetHeight() - aSize.Height()); -+ } -+ else if (nPart == ControlPart::ButtonRight) -+ { -+ aSize.Width() *= nSecond; -+ buttonRect.setX(aAreaRect.Left() + aAreaRect.GetWidth() - aSize.Width()); -+ buttonRect.setY(aAreaRect.Top()); -+ } -+ -+ buttonRect.SetSize(aSize); -+ -+ return buttonRect; -+ } -+ -+ gint slider_width; -+ gint stepper_size; -+ gint stepper_spacing; -+ gint trough_border; -+ -+ // Grab some button style attributes -+ gtk_style_context_get_style( pScrollbarStyle, -+ "slider-width", &slider_width, -+ "stepper-size", &stepper_size, -+ "trough-border", &trough_border, -+ "stepper-spacing", &stepper_spacing, nullptr ); -+ - if ( ( nPart == ControlPart::ButtonUp ) || ( nPart == ControlPart::ButtonDown ) ) - { - buttonWidth = slider_width + 2 * trough_border; -@@ -369,6 +437,327 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, - ControlPart nPart, - const ImplControlValue& rValue ) - { -+ if (gtk_check_version(3, 20, 0) == nullptr) -+ { -+ assert(rValue.getType() == ControlType::Scrollbar); -+ const ScrollbarValue& rScrollbarVal = static_cast(rValue); -+ Rectangle scrollbarRect; -+ GtkStateFlags stateFlags; -+ GtkOrientation scrollbarOrientation; -+ Rectangle thumbRect = rScrollbarVal.maThumbRect; -+ Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward -+ Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward -+ Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward -+ Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward -+ gdouble arrow1Angle; // backward -+ gdouble arrow2Angle; // forward -+ Rectangle arrowRect; -+ gint slider_width = 0; -+ gint stepper_size = 0; -+ -+ // make controlvalue rectangles relative to area -+ thumbRect.Move( -rControlRectangle.Left(), -rControlRectangle.Top() ); -+ button11BoundRect.Move( -rControlRectangle.Left(), -rControlRectangle.Top() ); -+ button22BoundRect.Move( -rControlRectangle.Left(), -rControlRectangle.Top() ); -+ button12BoundRect.Move( -rControlRectangle.Left(), -rControlRectangle.Top() ); -+ button21BoundRect.Move( -rControlRectangle.Left(), -rControlRectangle.Top() ); -+ -+ // Find the overall bounding rect of the control -+ scrollbarRect = rControlRectangle; -+ if (scrollbarRect.GetWidth() <= 0 || scrollbarRect.GetHeight() <= 0) -+ return; -+ -+ gint slider_side; -+ Size aSize; -+ if (nPart == ControlPart::DrawBackgroundHorz) -+ { -+ QuerySize(mpHScrollbarStyle, aSize); -+ QuerySize(mpHScrollbarContentsStyle, aSize); -+ QuerySize(mpHScrollbarTroughStyle, aSize); -+ QuerySize(mpHScrollbarSliderStyle, aSize); -+ slider_side = aSize.Height(); -+ gtk_style_context_get(mpHScrollbarButtonStyle, -+ gtk_style_context_get_state(mpHScrollbarButtonStyle), -+ "min-height", &slider_width, -+ "min-width", &stepper_size, nullptr); -+ } -+ else -+ { -+ QuerySize(mpVScrollbarStyle, aSize); -+ QuerySize(mpVScrollbarContentsStyle, aSize); -+ QuerySize(mpVScrollbarTroughStyle, aSize); -+ QuerySize(mpVScrollbarSliderStyle, aSize); -+ slider_side = aSize.Width(); -+ gtk_style_context_get(mpVScrollbarButtonStyle, -+ gtk_style_context_get_state(mpVScrollbarButtonStyle), -+ "min-width", &slider_width, -+ "min-height", &stepper_size, nullptr); -+ } -+ -+ gboolean has_forward; -+ gboolean has_forward2; -+ gboolean has_backward; -+ gboolean has_backward2; -+ -+ gtk_style_context_get_style( context, -+ "has-forward-stepper", &has_forward, -+ "has-secondary-forward-stepper", &has_forward2, -+ "has-backward-stepper", &has_backward, -+ "has-secondary-backward-stepper", &has_backward2, nullptr ); -+ -+ if ( nPart == ControlPart::DrawBackgroundHorz ) -+ { -+ // Center vertically in the track -+ scrollbarRect.Move( 0, (scrollbarRect.GetHeight() - slider_side) / 2 ); -+ scrollbarRect.SetSize( Size( scrollbarRect.GetWidth(), slider_side ) ); -+ thumbRect.Move( 0, (scrollbarRect.GetHeight() - slider_side) / 2 ); -+ thumbRect.SetSize( Size( thumbRect.GetWidth(), slider_side ) ); -+ -+ scrollbarOrientation = GTK_ORIENTATION_HORIZONTAL; -+ arrow1Angle = G_PI * 3 / 2; -+ arrow2Angle = G_PI / 2; -+ -+ if ( has_backward ) -+ { -+ button12BoundRect.Move( stepper_size, -+ (scrollbarRect.GetHeight() - slider_width) / 2 ); -+ } -+ -+ button11BoundRect.Move( 0, (scrollbarRect.GetHeight() - slider_width) / 2 ); -+ button11BoundRect.SetSize( Size( stepper_size, slider_width ) ); -+ button12BoundRect.SetSize( Size( stepper_size, slider_width ) ); -+ -+ if ( has_backward2 ) -+ { -+ button22BoundRect.Move( stepper_size, (scrollbarRect.GetHeight() - slider_width) / 2 ); -+ button21BoundRect.Move( 0, (scrollbarRect.GetHeight() - slider_width) / 2 ); -+ } -+ else -+ { -+ button22BoundRect.Move( 0, (scrollbarRect.GetHeight() - slider_width) / 2 ); -+ } -+ -+ button21BoundRect.SetSize( Size( stepper_size, slider_width ) ); -+ button22BoundRect.SetSize( Size( stepper_size, slider_width ) ); -+ } -+ else -+ { -+ // Center horizontally in the track -+ scrollbarRect.Move( (scrollbarRect.GetWidth() - slider_side) / 2, 0 ); -+ scrollbarRect.SetSize( Size( slider_side, scrollbarRect.GetHeight() ) ); -+ thumbRect.Move( (scrollbarRect.GetWidth() - slider_side) / 2, 0 ); -+ thumbRect.SetSize( Size( slider_side, thumbRect.GetHeight() ) ); -+ -+ scrollbarOrientation = GTK_ORIENTATION_VERTICAL; -+ arrow1Angle = 0; -+ arrow2Angle = G_PI; -+ -+ if ( has_backward ) -+ { -+ button12BoundRect.Move( (scrollbarRect.GetWidth() - slider_width) / 2, -+ stepper_size ); -+ } -+ button11BoundRect.Move( (scrollbarRect.GetWidth() - slider_width) / 2, 0 ); -+ button11BoundRect.SetSize( Size( slider_width, stepper_size ) ); -+ button12BoundRect.SetSize( Size( slider_width, stepper_size ) ); -+ -+ if ( has_backward2 ) -+ { -+ button22BoundRect.Move( (scrollbarRect.GetWidth() - slider_width) / 2, stepper_size ); -+ button21BoundRect.Move( (scrollbarRect.GetWidth() - slider_width) / 2, 0 ); -+ } -+ else -+ { -+ button22BoundRect.Move( (scrollbarRect.GetWidth() - slider_width) / 2, 0 ); -+ } -+ -+ button21BoundRect.SetSize( Size( slider_width, stepper_size ) ); -+ button22BoundRect.SetSize( Size( slider_width, stepper_size ) ); -+ } -+ -+ bool has_slider = ( thumbRect.GetWidth() > 0 && thumbRect.GetHeight() > 0 ); -+ -+ // ----------------- CONTENTS -+ GtkStyleContext* pScrollbarContentsStyle = scrollbarOrientation == GTK_ORIENTATION_VERTICAL ? -+ mpVScrollbarContentsStyle : mpHScrollbarContentsStyle; -+ -+ gtk_render_background(gtk_widget_get_style_context(gCacheWindow), cr, 0, 0, -+ scrollbarRect.GetWidth(), scrollbarRect.GetHeight() ); -+ -+ gtk_render_background(context, cr, 0, 0, -+ scrollbarRect.GetWidth(), scrollbarRect.GetHeight() ); -+ gtk_render_frame(context, cr, 0, 0, -+ scrollbarRect.GetWidth(), scrollbarRect.GetHeight() ); -+ -+ gtk_render_background(pScrollbarContentsStyle, cr, 0, 0, -+ scrollbarRect.GetWidth(), scrollbarRect.GetHeight() ); -+ gtk_render_frame(pScrollbarContentsStyle, cr, 0, 0, -+ scrollbarRect.GetWidth(), scrollbarRect.GetHeight() ); -+ -+ bool backwardButtonInsensitive = -+ rScrollbarVal.mnCur == rScrollbarVal.mnMin; -+ bool forwardButtonInsensitive = rScrollbarVal.mnMax == 0 || -+ rScrollbarVal.mnCur + rScrollbarVal.mnVisibleSize >= rScrollbarVal.mnMax; -+ -+ // ----------------- BUTTON 1 -+ if ( has_backward ) -+ { -+ stateFlags = NWConvertVCLStateToGTKState(rScrollbarVal.mnButton1State); -+ if ( backwardButtonInsensitive ) -+ stateFlags = GTK_STATE_FLAG_INSENSITIVE; -+ -+ GtkStyleContext* pScrollbarButtonStyle = scrollbarOrientation == GTK_ORIENTATION_VERTICAL ? -+ mpVScrollbarButtonStyle : mpHScrollbarButtonStyle; -+ -+ gtk_style_context_set_state(pScrollbarButtonStyle, stateFlags); -+ -+ gtk_render_background(pScrollbarButtonStyle, cr, -+ button11BoundRect.Left(), button11BoundRect.Top(), -+ button11BoundRect.GetWidth(), button11BoundRect.GetHeight() ); -+ gtk_render_frame(pScrollbarButtonStyle, cr, -+ button11BoundRect.Left(), button11BoundRect.Top(), -+ button11BoundRect.GetWidth(), button11BoundRect.GetHeight() ); -+ -+ // ----------------- ARROW 1 -+ NWCalcArrowRect( button11BoundRect, arrowRect ); -+ gtk_render_arrow(pScrollbarButtonStyle, cr, -+ arrow1Angle, -+ arrowRect.Left(), arrowRect.Top(), -+ MIN(arrowRect.GetWidth(), arrowRect.GetHeight()) ); -+ } -+ if ( has_forward2 ) -+ { -+ stateFlags = NWConvertVCLStateToGTKState(rScrollbarVal.mnButton2State); -+ if ( forwardButtonInsensitive ) -+ stateFlags = GTK_STATE_FLAG_INSENSITIVE; -+ -+ GtkStyleContext* pScrollbarButtonStyle = scrollbarOrientation == GTK_ORIENTATION_VERTICAL ? -+ mpVScrollbarButtonStyle : mpHScrollbarButtonStyle; -+ -+ gtk_style_context_set_state(pScrollbarButtonStyle, stateFlags); -+ -+ gtk_render_background(pScrollbarButtonStyle, cr, -+ button12BoundRect.Left(), button12BoundRect.Top(), -+ button12BoundRect.GetWidth(), button12BoundRect.GetHeight() ); -+ gtk_render_frame(pScrollbarButtonStyle, cr, -+ button12BoundRect.Left(), button12BoundRect.Top(), -+ button12BoundRect.GetWidth(), button12BoundRect.GetHeight() ); -+ -+ // ----------------- ARROW 1 -+ NWCalcArrowRect( button12BoundRect, arrowRect ); -+ gtk_render_arrow(pScrollbarButtonStyle, cr, -+ arrow2Angle, -+ arrowRect.Left(), arrowRect.Top(), -+ MIN(arrowRect.GetWidth(), arrowRect.GetHeight()) ); -+ } -+ // ----------------- BUTTON 2 -+ -+ if ( has_forward ) -+ { -+ stateFlags = NWConvertVCLStateToGTKState(rScrollbarVal.mnButton2State); -+ if ( forwardButtonInsensitive ) -+ stateFlags = GTK_STATE_FLAG_INSENSITIVE; -+ -+ GtkStyleContext* pScrollbarButtonStyle = scrollbarOrientation == GTK_ORIENTATION_VERTICAL ? -+ mpVScrollbarButtonStyle : mpHScrollbarButtonStyle; -+ -+ gtk_style_context_set_state(pScrollbarButtonStyle, stateFlags); -+ -+ gtk_render_background(pScrollbarButtonStyle, cr, -+ button22BoundRect.Left(), button22BoundRect.Top(), -+ button22BoundRect.GetWidth(), button22BoundRect.GetHeight() ); -+ gtk_render_frame(pScrollbarButtonStyle, cr, -+ button22BoundRect.Left(), button22BoundRect.Top(), -+ button22BoundRect.GetWidth(), button22BoundRect.GetHeight() ); -+ -+ // ----------------- ARROW 2 -+ NWCalcArrowRect( button22BoundRect, arrowRect ); -+ gtk_render_arrow(pScrollbarButtonStyle, cr, -+ arrow2Angle, -+ arrowRect.Left(), arrowRect.Top(), -+ MIN(arrowRect.GetWidth(), arrowRect.GetHeight()) ); -+ } -+ -+ if ( has_backward2 ) -+ { -+ stateFlags = NWConvertVCLStateToGTKState(rScrollbarVal.mnButton1State); -+ if ( backwardButtonInsensitive ) -+ stateFlags = GTK_STATE_FLAG_INSENSITIVE; -+ -+ GtkStyleContext* pScrollbarButtonStyle = scrollbarOrientation == GTK_ORIENTATION_VERTICAL ? -+ mpVScrollbarButtonStyle : mpHScrollbarButtonStyle; -+ -+ gtk_style_context_set_state(pScrollbarButtonStyle, stateFlags); -+ -+ gtk_render_background(pScrollbarButtonStyle, cr, -+ button21BoundRect.Left(), button21BoundRect.Top(), -+ button21BoundRect.GetWidth(), button21BoundRect.GetHeight() ); -+ gtk_render_frame(pScrollbarButtonStyle, cr, -+ button21BoundRect.Left(), button21BoundRect.Top(), -+ button21BoundRect.GetWidth(), button21BoundRect.GetHeight() ); -+ -+ // ----------------- ARROW 2 -+ NWCalcArrowRect( button21BoundRect, arrowRect ); -+ gtk_render_arrow(pScrollbarButtonStyle, cr, -+ arrow1Angle, -+ arrowRect.Left(), arrowRect.Top(), -+ MIN(arrowRect.GetWidth(), arrowRect.GetHeight()) ); -+ } -+ -+ // ----------------- TROUGH -+ // trackrect matches that of ScrollBar::ImplCalc -+ Rectangle aTrackRect(Point(0, 0), scrollbarRect.GetSize()); -+ if (nPart == ControlPart::DrawBackgroundHorz) -+ { -+ Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonLeft, aTrackRect); -+ Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonRight, aTrackRect); -+ aTrackRect.Left() = aBtn1Rect.Right(); -+ aTrackRect.Right() = aBtn2Rect.Left(); -+ } -+ else -+ { -+ Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonUp, aTrackRect); -+ Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonDown, aTrackRect); -+ aTrackRect.Top() = aBtn1Rect.Bottom() + 1; -+ aTrackRect.Bottom() = aBtn2Rect.Top(); -+ } -+ -+ GtkStyleContext* pScrollbarTroughStyle = scrollbarOrientation == GTK_ORIENTATION_VERTICAL ? -+ mpVScrollbarTroughStyle : mpHScrollbarTroughStyle; -+ gtk_render_background(pScrollbarTroughStyle, cr, aTrackRect.Left(), aTrackRect.Top(), -+ aTrackRect.GetWidth(), aTrackRect.GetHeight() ); -+ gtk_render_frame(pScrollbarTroughStyle, cr, aTrackRect.Left(), aTrackRect.Top(), -+ aTrackRect.GetWidth(), aTrackRect.GetHeight() ); -+ -+ // ----------------- THUMB -+ if ( has_slider ) -+ { -+ stateFlags = NWConvertVCLStateToGTKState(rScrollbarVal.mnThumbState); -+ if ( rScrollbarVal.mnThumbState & ControlState::PRESSED ) -+ stateFlags = (GtkStateFlags) (stateFlags | GTK_STATE_PRELIGHT); -+ -+ GtkStyleContext* pScrollbarSliderStyle = scrollbarOrientation == GTK_ORIENTATION_VERTICAL ? -+ mpVScrollbarSliderStyle : mpHScrollbarSliderStyle; -+ -+ gtk_style_context_set_state(pScrollbarSliderStyle, stateFlags); -+ -+ GtkBorder margin; -+ gtk_style_context_get_margin(pScrollbarSliderStyle, stateFlags, &margin); -+ -+ gtk_render_background(pScrollbarSliderStyle, cr, -+ thumbRect.Left() + margin.left, thumbRect.Top() + margin.top, -+ thumbRect.GetWidth() - margin.left - margin.right, -+ thumbRect.GetHeight() - margin.top - margin.bottom); -+ -+ gtk_render_frame(pScrollbarSliderStyle, cr, -+ thumbRect.Left() + margin.left, thumbRect.Top() + margin.top, -+ thumbRect.GetWidth() - margin.left - margin.right, -+ thumbRect.GetHeight() - margin.top - margin.bottom); -+ } -+ -+ return; -+ } -+ - (void)nType; - OSL_ASSERT( rValue.getType() == ControlType::Scrollbar ); - const ScrollbarValue& rScrollbarVal = static_cast(rValue); -@@ -2725,18 +3114,28 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) - aStyleSet.SetPrimaryButtonWarpsSlider(primarybuttonwarps); - - // set scrollbar settings -- gint slider_width = 14; -- gint trough_border = 1; - gint min_slider_length = 21; - - // Grab some button style attributes -- gtk_style_context_get_style(mpVScrollbarStyle, -- "slider-width", &slider_width, -- "trough-border", &trough_border, -- nullptr); -- aStyleSet.SetScrollBarSize(slider_width + 2*trough_border); - if (gtk_check_version(3, 20, 0) == nullptr) - { -+ Size aSize; -+ QuerySize(mpHScrollbarStyle, aSize); -+ QuerySize(mpHScrollbarContentsStyle, aSize); -+ QuerySize(mpHScrollbarTroughStyle, aSize); -+ QuerySize(mpHScrollbarSliderStyle, aSize); -+ -+ gboolean has_forward, has_forward2, has_backward, has_backward2; -+ gtk_style_context_get_style(mpHScrollbarStyle, -+ "has-forward-stepper", &has_forward, -+ "has-secondary-forward-stepper", &has_forward2, -+ "has-backward-stepper", &has_backward, -+ "has-secondary-backward-stepper", &has_backward2, nullptr); -+ if (has_forward || has_backward || has_forward2 || has_backward2) -+ QuerySize(mpHScrollbarButtonStyle, aSize); -+ -+ aStyleSet.SetScrollBarSize(aSize.Height()); -+ - gtk_style_context_get(mpVScrollbarSliderStyle, gtk_style_context_get_state(mpVScrollbarSliderStyle), - "min-height", &min_slider_length, - nullptr); -@@ -2744,9 +3143,15 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) - } - else - { -+ gint slider_width = 14; -+ gint trough_border = 1; -+ - gtk_style_context_get_style(mpVScrollbarStyle, -+ "slider-width", &slider_width, -+ "trough-border", &trough_border, - "min-slider-length", &min_slider_length, - nullptr); -+ aStyleSet.SetScrollBarSize(slider_width + 2*trough_border); - gint magic = trough_border ? 1 : 0; - aStyleSet.SetMinThumbSize(min_slider_length - magic); - } --- -2.9.3 - diff --git a/libreoffice.spec b/libreoffice.spec index f23eded..f45622e 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -1,5 +1,5 @@ # download path contains version without the last (fourth) digit -%define libo_version 5.3.2 +%define libo_version 5.3.3 # Should contain .alphaX / .betaX, if this is pre-release (actually # pre-RC) version. The pre-release string is part of tarball file names, # so we need a way to define it easily at one place. @@ -57,7 +57,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 -Version: %{libo_version}.2 +Version: %{libo_version}.1 Release: 1%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 and CC0 URL: http://www.libreoffice.org/ @@ -240,9 +240,8 @@ Patch7: 0001-Resolves-tdf-105998-distort-hairline-borders-to-fall.patch Patch8: 0001-Related-rhbz-1422353-make-writer-behave-like-calc-an.patch Patch9: 0001-right-click-to-insert-image.patch Patch10: 0001-Related-tdf-106100-recover-mangled-svg-in-presentati.patch -Patch11: 0001-Resolves-tdf-106645-gtk3-scrollbar-is-too-wide.patch -Patch12: 0001-Related-rhbz-1334915-tdf-100158-hack-using-startcent.patch -Patch13: 0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch +Patch11: 0001-Related-rhbz-1334915-tdf-100158-hack-using-startcent.patch +Patch12: 0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch %if 0%{?rhel} # not upstreamed @@ -2324,6 +2323,9 @@ done %endif %changelog +* Wed Apr 19 2017 David Tardon - 1:5.3.3.1-1 +- update to 5.3.3 rc1 + * Wed Mar 29 2017 David Tardon - 1:5.3.2.2-1 - update to 5.3.2 rc2 diff --git a/sources b/sources index b60d7b4..075d281 100644 --- a/sources +++ b/sources @@ -7,6 +7,6 @@ SHA512 (a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip) = 2d3835f7ac356805025 SHA512 (0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz) = b9c02d63e9b47a838dbe67c05b9e9e4983d13b9d74794e1c30c73d341c3bc905c9edec3a72fa339ae8c0e06d97e69ac2ea23bf51336b77af14cab7ae67721a46 SHA512 (libreoffice-multiliblauncher.sh) = db532afdf5000bc66f9e02c7d0ab586468466f63f8f0bdb204832581e8277c5c59f688fa096548d642411cb8c46e8de4a744676b4e624c075262cfd6945138cd SHA512 (4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2) = 1e8a39205f21206d239871bd636f17768eb3997e08ba065c1111a537564bec2b4e97bcb2f7cd9e652a1d9b4f31cb0662010303c393aedc84b920bb5f41b27be8 -SHA512 (libreoffice-5.3.2.2.tar.xz) = 6d073f6fcfb34b1aad2545c6e418029bf82a2d14358d567fac853fbf432a427f43edea714fb2a2de3f4cd2bf2b3e0d3d0523c3dc490b80c1e867d74ac2841ffb -SHA512 (libreoffice-help-5.3.2.2.tar.xz) = 2bd9dc680c13506fcc66a885b589e4a65a9fe3d5c3bcdeda97f2f0eddfa6b699ed8377c3d53c8750f2a8ca56594e9ec06504888f3a7e9bcdc01d0375169fe131 -SHA512 (libreoffice-translations-5.3.2.2.tar.xz) = 781d4d0631a4f3a98e5d0a79accd6863badd6766f564a8ffd1c9ff558c4329555e81a485fd888bb5f3b017cad0cdc7b3083613a357232b27ca5be9895f777d33 +SHA512 (libreoffice-5.3.3.1.tar.xz) = b6dfd6188391094a18ac00e721f41eae8a7ac267b376b6517404a45e542cf95b654dd768305454ac3aade1e30d298bc502f5d3480b1fed91f13e9894f6f2d0de +SHA512 (libreoffice-help-5.3.3.1.tar.xz) = c5787b1be40fdb455bf1f2a254bf2e030e8062ab827d2b7b92e344a110308777eb719931f17b846b53e29fdcc9465d8de0f43355ac014b8722c16e9923d468ec +SHA512 (libreoffice-translations-5.3.3.1.tar.xz) = d06820fc4ce9c6c617533db228f6e80f260edaf7bd0b3ca0c9ebc16deacf3bb43f734cec35c8a888fd1aa5e8fb7bc7b616412cc0e13efa28f8bb54fcf4ad4bb1