summaryrefslogtreecommitdiff
path: root/mozilla-1160154.patch
diff options
context:
space:
mode:
authorMartin Stransky <stransky@anakreon.cz>2015-05-29 13:41:27 +0200
committerMartin Stransky <stransky@anakreon.cz>2015-05-29 13:41:27 +0200
commit500aa2c932cdcaca84a4f60ce1a9226cce04cdf3 (patch)
tree29c9d02d3ecd07d8d9a3c4fb78d46bee25a0f0cf /mozilla-1160154.patch
parentspec clean up (diff)
downloadlibrewolf-fedora-ff-500aa2c932cdcaca84a4f60ce1a9226cce04cdf3.tar.gz
librewolf-fedora-ff-500aa2c932cdcaca84a4f60ce1a9226cce04cdf3.tar.bz2
librewolf-fedora-ff-500aa2c932cdcaca84a4f60ce1a9226cce04cdf3.zip
Added patch for mozbz#1160154 - huge bookmark padding
Diffstat (limited to 'mozilla-1160154.patch')
-rw-r--r--mozilla-1160154.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/mozilla-1160154.patch b/mozilla-1160154.patch
new file mode 100644
index 0000000..8971fbb
--- /dev/null
+++ b/mozilla-1160154.patch
@@ -0,0 +1,53 @@
+diff --git a/widget/gtk/gtk3drawing.c b/widget/gtk/gtk3drawing.c
+--- a/widget/gtk/gtk3drawing.c
++++ b/widget/gtk/gtk3drawing.c
+@@ -72,16 +72,19 @@ static gboolean is_initialized;
+ #define ARROW_DOWN G_PI
+ #define ARROW_RIGHT G_PI_2
+ #define ARROW_LEFT (G_PI+G_PI_2)
+
+ #if !GTK_CHECK_VERSION(3,14,0)
+ #define GTK_STATE_FLAG_CHECKED (1 << 11)
+ #endif
+
++// See Bug 1160154 for details
++#define MAX_WIDGET_PADDING 6
++
+ static GtkStateFlags
+ GetStateFlagsFromGtkWidgetState(GtkWidgetState* state)
+ {
+ GtkStateFlags stateFlags = GTK_STATE_FLAG_NORMAL;
+
+ if (state->disabled)
+ stateFlags = GTK_STATE_FLAG_INSENSITIVE;
+ else {
+@@ -2590,22 +2593,22 @@ moz_gtk_add_style_border(GtkStyleContext
+ }
+
+ static void
+ moz_gtk_add_style_padding(GtkStyleContext* style,
+ gint* left, gint* top, gint* right, gint* bottom)
+ {
+ GtkBorder padding;
+
+- gtk_style_context_get_padding(style, 0, &padding);
+-
+- *left += padding.left;
+- *right += padding.right;
+- *top += padding.top;
+- *bottom += padding.bottom;
++ gtk_style_context_get_padding(style, 0, &padding);
++
++ *left += (padding.left > MAX_WIDGET_PADDING) ? MAX_WIDGET_PADDING : padding.left;
++ *right += (padding.right > MAX_WIDGET_PADDING) ? MAX_WIDGET_PADDING : padding.right;
++ *top += (padding.top > MAX_WIDGET_PADDING) ? MAX_WIDGET_PADDING : padding.top;
++ *bottom += (padding.bottom > MAX_WIDGET_PADDING) ? MAX_WIDGET_PADDING : padding.bottom;
+ }
+
+ gint
+ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ gint* right, gint* bottom, GtkTextDirection direction,
+ gboolean inhtml)
+ {
+ GtkWidget* w;
+
bgstack15