Fixed rhbz#1201527 - [GTK3] Scrollbars in Firefox are not consistent with the rest of the desktop
This commit is contained in:
parent
4c8e8dd622
commit
c34f12487d
@ -107,7 +107,7 @@
|
|||||||
Summary: Mozilla Firefox Web browser
|
Summary: Mozilla Firefox Web browser
|
||||||
Name: firefox
|
Name: firefox
|
||||||
Version: 36.0.1
|
Version: 36.0.1
|
||||||
Release: 5%{?pre_tag}%{?dist}
|
Release: 6%{?pre_tag}%{?dist}
|
||||||
URL: http://www.mozilla.org/projects/firefox/
|
URL: http://www.mozilla.org/projects/firefox/
|
||||||
License: MPLv1.1 or GPLv2+ or LGPLv2+
|
License: MPLv1.1 or GPLv2+ or LGPLv2+
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
@ -157,6 +157,7 @@ Patch410: mozilla-1073117-button-focus.patch
|
|||||||
Patch411: mozilla-1073117-focus-sizes.patch
|
Patch411: mozilla-1073117-focus-sizes.patch
|
||||||
Patch412: mozilla-1073117-no-gap-tab.patch
|
Patch412: mozilla-1073117-no-gap-tab.patch
|
||||||
Patch413: mozilla-975919-gtk3-hidpi.patch
|
Patch413: mozilla-975919-gtk3-hidpi.patch
|
||||||
|
Patch414: mozilla-1143686.patch
|
||||||
|
|
||||||
%if %{official_branding}
|
%if %{official_branding}
|
||||||
# Required by Mozilla Corporation
|
# Required by Mozilla Corporation
|
||||||
@ -311,6 +312,7 @@ cd %{tarballdir}
|
|||||||
%patch411 -p1 -b .1073117-focus-sizes
|
%patch411 -p1 -b .1073117-focus-sizes
|
||||||
%patch412 -p1 -b .1073117-no-gap-tab
|
%patch412 -p1 -b .1073117-no-gap-tab
|
||||||
%patch413 -p2 -b .975919-gtk3-hidpi
|
%patch413 -p2 -b .975919-gtk3-hidpi
|
||||||
|
%patch414 -p1 -b .1143686
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{official_branding}
|
%if %{official_branding}
|
||||||
@ -765,6 +767,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 17 2015 Martin Stransky <stransky@redhat.com> - 36.0.1-6
|
||||||
|
- Fixed rhbz#1201527 - [GTK3] Scrollbars in Firefox
|
||||||
|
are not consistent with the rest of the desktop
|
||||||
|
|
||||||
* Tue Mar 10 2015 Martin Stransky <stransky@redhat.com> - 36.0.1-5
|
* Tue Mar 10 2015 Martin Stransky <stransky@redhat.com> - 36.0.1-5
|
||||||
- Arm build fix
|
- Arm build fix
|
||||||
|
|
||||||
|
53
mozilla-1143686.patch
Normal file
53
mozilla-1143686.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User Martin Stransky <stransky@redhat.com>
|
||||||
|
# Parent 436686833af095ee3a44f933228ea04890162778
|
||||||
|
Bug 1143686 - Gtk3 - render scrollbar thumb with margin, r=?karlt
|
||||||
|
|
||||||
|
diff --git a/widget/gtk/gtk3drawing.c b/widget/gtk/gtk3drawing.c
|
||||||
|
--- a/widget/gtk/gtk3drawing.c
|
||||||
|
+++ b/widget/gtk/gtk3drawing.c
|
||||||
|
@@ -1225,34 +1225,40 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi
|
||||||
|
cairo_t *cr, GdkRectangle* rect,
|
||||||
|
GtkWidgetState* state,
|
||||||
|
GtkTextDirection direction)
|
||||||
|
{
|
||||||
|
GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
|
||||||
|
GtkStyleContext* style;
|
||||||
|
GtkScrollbar *scrollbar;
|
||||||
|
GtkAdjustment *adj;
|
||||||
|
+ GtkBorder margin;
|
||||||
|
|
||||||
|
ensure_scrollbar_widget();
|
||||||
|
|
||||||
|
if (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL)
|
||||||
|
scrollbar = GTK_SCROLLBAR(gHorizScrollbarWidget);
|
||||||
|
else
|
||||||
|
scrollbar = GTK_SCROLLBAR(gVertScrollbarWidget);
|
||||||
|
|
||||||
|
gtk_widget_set_direction(GTK_WIDGET(scrollbar), direction);
|
||||||
|
-
|
||||||
|
+
|
||||||
|
style = gtk_widget_get_style_context(GTK_WIDGET(scrollbar));
|
||||||
|
gtk_style_context_save(style);
|
||||||
|
-
|
||||||
|
+
|
||||||
|
gtk_style_context_add_class(style, GTK_STYLE_CLASS_SLIDER);
|
||||||
|
gtk_style_context_set_state(style, state_flags);
|
||||||
|
|
||||||
|
- gtk_render_slider(style, cr, rect->x, rect->y,
|
||||||
|
- rect->width, rect->height,
|
||||||
|
+ gtk_style_context_get_margin (style, state_flags, &margin);
|
||||||
|
+
|
||||||
|
+ gtk_render_slider(style, cr,
|
||||||
|
+ rect->x + margin.left,
|
||||||
|
+ rect->y + margin.top,
|
||||||
|
+ rect->width - margin.left - margin.right,
|
||||||
|
+ rect->height - margin.top - margin.bottom,
|
||||||
|
(widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ?
|
||||||
|
GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
|
||||||
|
|
||||||
|
gtk_style_context_restore(style);
|
||||||
|
|
||||||
|
return MOZ_GTK_SUCCESS;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user