Closed Bug 877609 Opened 8 years ago Closed 7 years ago

Port GTK2 to GTK3 - widget padding

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: stransky, Assigned: stransky)

References

Details

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #627699 +++

GTK+ 3.0 and GNOME 3 are approaching and we should get Firefox ready for them. This bug is for correct widget padding, see:

https://bugzilla.mozilla.org/show_bug.cgi?id=627699#c251
https://bugzilla.mozilla.org/show_bug.cgi?id=627699#c262
https://bug627699.bugzilla.mozilla.org/attachment.cgi?id=727638
Attached patch part1 (obsolete) — Splinter Review
First part of the padding patch, reflects comments from https://bugzilla.mozilla.org/show_bug.cgi?id=627699#c262
Attachment #755892 - Flags: review?(karlt)
Comment on attachment 755892 [details] [diff] [review]
part1

>   gtk_style_context_add_class(style, GTK_STYLE_CLASS_SCALE);
>-  gtk_style_context_get_border(style, state_flags, &border);
> 
>   if (flags == GTK_ORIENTATION_HORIZONTAL) {
>-    x = border.left;
>+    x = gtk_widget_get_margin_left(widget);
>     y++;
>   }
>   else {
>     x++;
>-    y = border.top;
>+    y = gtk_widget_get_margin_top(widget);
>   }

It seems there is a margin on the GtkWidget and a margin on the
GtkStyleContext.  gtk_range_draw uses the margin from the style context and I
can't see that the margin on the widget is related, so I think this code
should also use the margin from the style context.
Attachment #755892 - Flags: review?(karlt) → review+
Attached patch part1 v.2Splinter Review
Fixed the part1
Attachment #768244 - Flags: review+
Keywords: checkin-needed
Whiteboard: [leave open for remaining patches][check linux try build before requesting checkin] → [leave open for remaining patches]
Attachment #768244 - Flags: checkin?
Attachment #755892 - Attachment is obsolete: true
Attachment #768244 - Flags: checkin? → checkin+
Padding in GtkTree is addressed in Bug 897404 and I don't see any other bugs.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [leave open for remaining patches]
Target Milestone: --- → mozilla25
Blocks: 1034064
No longer blocks: 1034064
You need to log in before you can comment on or make changes to this bug.