diff options
author | Martin Stransky <stransky@redhat.com> | 2015-01-09 13:40:42 +0100 |
---|---|---|
committer | Martin Stransky <stransky@redhat.com> | 2015-01-09 13:40:42 +0100 |
commit | 30000856ee79f97c5d558a5f6e587b37ec5a8572 (patch) | |
tree | 46cd4becf462bdc26ebe500c584eaa32ce5d5709 /mozilla-1073117-entry-button-size.patch | |
parent | Update to 35.0 Build 1 (diff) | |
download | librewolf-fedora-ff-30000856ee79f97c5d558a5f6e587b37ec5a8572.tar.gz librewolf-fedora-ff-30000856ee79f97c5d558a5f6e587b37ec5a8572.tar.bz2 librewolf-fedora-ff-30000856ee79f97c5d558a5f6e587b37ec5a8572.zip |
Update to 35.0 Build 3, Gtk3 - added fix for button/entry box sizes
Diffstat (limited to 'mozilla-1073117-entry-button-size.patch')
-rw-r--r-- | mozilla-1073117-entry-button-size.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/mozilla-1073117-entry-button-size.patch b/mozilla-1073117-entry-button-size.patch new file mode 100644 index 0000000..24c0ac2 --- /dev/null +++ b/mozilla-1073117-entry-button-size.patch @@ -0,0 +1,65 @@ +# HG changeset patch +# Parent 70de2960aa877d7755ee6f66bf2d4c4c46bfed2c +# User Martin Stransky <stransky@redhat.com> +Bug 1073117 - Theme issues with GTK 3.14 - fix gtk button and entry size, r=?karlt +Theme borders has been removed in Gtk 3.14 so we can't use them to calculate button size. +Should computed as border + padding. Also update nsNativeThemeGTK::GetWidgetPadding() for that. + +diff --git a/widget/gtk/gtk3drawing.c b/widget/gtk/gtk3drawing.c +--- a/widget/gtk/gtk3drawing.c ++++ b/widget/gtk/gtk3drawing.c +@@ -2686,25 +2686,23 @@ moz_gtk_get_widget_border(GtkThemeWidget + { + GtkBorder inner_border; + gboolean interior_focus; + gint focus_width, focus_pad; + + ensure_button_widget(); + *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gButtonWidget)); + ++ style = gtk_widget_get_style_context(gButtonWidget); ++ moz_gtk_add_style_border(style, left, top, right, bottom); ++ + /* Don't add this padding in HTML, otherwise the buttons will + become too big and stuff the layout. */ + if (!inhtml) { +- moz_gtk_widget_get_focus(gButtonWidget, &interior_focus, &focus_width, &focus_pad); +- moz_gtk_button_get_inner_border(gButtonWidget, &inner_border); +- *left += focus_width + focus_pad + inner_border.left; +- *right += focus_width + focus_pad + inner_border.right; +- *top += focus_width + focus_pad + inner_border.top; +- *bottom += focus_width + focus_pad + inner_border.bottom; ++ moz_gtk_add_style_padding(style, left, top, right, bottom); + } + + moz_gtk_add_style_border(gtk_widget_get_style_context(gButtonWidget), + left, top, right, bottom); + return MOZ_GTK_SUCCESS; + } + case MOZ_GTK_ENTRY: + { +diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp +--- a/widget/gtk/nsNativeThemeGTK.cpp ++++ b/widget/gtk/nsNativeThemeGTK.cpp +@@ -992,16 +992,21 @@ nsNativeThemeGTK::GetWidgetPadding(nsDev + switch (aWidgetType) { + case NS_THEME_BUTTON_FOCUS: + case NS_THEME_TOOLBAR_BUTTON: + case NS_THEME_TOOLBAR_DUAL_BUTTON: + case NS_THEME_TAB_SCROLLARROW_BACK: + case NS_THEME_TAB_SCROLLARROW_FORWARD: + case NS_THEME_DROPDOWN_BUTTON: + case NS_THEME_TOOLBAR_BUTTON_DROPDOWN: ++ case NS_THEME_FOCUS_OUTLINE: ++ case NS_THEME_NUMBER_INPUT: ++ case NS_THEME_TEXTFIELD: ++ case NS_THEME_TEXTFIELD_MULTILINE: ++ case NS_THEME_BUTTON: + case NS_THEME_BUTTON_ARROW_UP: + case NS_THEME_BUTTON_ARROW_DOWN: + case NS_THEME_BUTTON_ARROW_NEXT: + case NS_THEME_BUTTON_ARROW_PREVIOUS: + case NS_THEME_RANGE_THUMB: + // Radios and checkboxes return a fixed size in GetMinimumWidgetSize + // and have a meaningful baseline, so they can't have + // author-specified padding. |