Closed Bug 1434646 Opened 7 years ago Closed 7 years ago

[Ambiance] Symbols in window controls are no longer centered

Categories

(Core :: Widget: Gtk, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox-esr52 --- unaffected
firefox58 --- unaffected
firefox59 --- unaffected
firefox60 --- fixed

People

(Reporter: marco, Assigned: stransky)

References

(Blocks 1 open bug)

Details

(Keywords: polish, regression)

Attachments

(2 files)

Attached image shot.png (deleted) —
One of the patches that landed recently caused the symbols in the window controls not to be centered.
Flags: needinfo?(stransky)
That comes from Bug 1427999 and should be fixed by Bug 1408335.
Flags: needinfo?(stransky)
I will test again tomorrow with the Nightly containing the patch from bug 1427999.
Blocks: 1427999
Flags: needinfo?(mcastelluccio)
No difference.
Flags: needinfo?(mcastelluccio) → needinfo?(stransky)
Is that on HiDPI display?
Flags: needinfo?(stransky) → needinfo?(mcastelluccio)
Yes.
Flags: needinfo?(mcastelluccio)
Blocks: gtktitlebar
Summary: Symbols in window controls are no longer centered → [HiDPI] Symbols in window controls are no longer centered
Assignee: nobody → stransky
Keywords: polish
Priority: -- → P2
There's also a related problem, the controls are very close between each other, they are supposed to be separated by some space.
(In reply to Marco Castelluccio [:marco] from comment #6) > There's also a related problem, the controls are very close between each > other, they are supposed to be separated by some space. That's Bug 1433092.
I can reproduce that without HiDPI so does not look like HiDPI related.
Summary: [HiDPI] Symbols in window controls are no longer centered → [Ambiance] Symbols in window controls are no longer centered
Depends on: 1433092
Comment on attachment 8954032 [details] Bug 1434646 - Titlebar rendering - Place titlebar buttons in GtkBox, https://reviewboard.mozilla.org/r/223184/#review229544 ::: widget/gtk/WidgetStyleCache.cpp:712 (Diff revision 2) > + gint buttonSpacing = 6; > + g_object_get(headerBar, "spacing", &buttonSpacing, nullptr); > + > + GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, buttonSpacing); > + > + if (IsToolbarButtonEnabled(MOZ_GTK_HEADER_BAR_BUTTON_MINIMIZE)) { We need to check if theme-change signal is also emitted when buttons are changed and act accordingly here.
Comment on attachment 8954032 [details] Bug 1434646 - Titlebar rendering - Place titlebar buttons in GtkBox, https://reviewboard.mozilla.org/r/223184/#review229534 ::: commit-message-abada:1 (Diff revision 2) > +Bug 1434646 - Titlebar rendering - Place titlebar buttons at GtkBox, r?jhorak nit: at/in ::: widget/gtk/WidgetStyleCache.cpp:700 (Diff revision 2) > - LoadWidgetIconPixbuf(image); > + LoadWidgetIconPixbuf(image); > +} > > - return widget; > +// TODO - Also return style for buttons located at Maximized toolbar. > +static void > +CreateHeaderBarButton(WidgetNodeType aWidgetType) Argument is not used. Consider plural form, like CreateHeaderBarButtons to emphatize you're creating all button there. ::: widget/gtk/WidgetStyleCache.cpp:712 (Diff revision 2) > + gint buttonSpacing = 6; > + g_object_get(headerBar, "spacing", &buttonSpacing, nullptr); > + > + GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, buttonSpacing); > + > + if (IsToolbarButtonEnabled(MOZ_GTK_HEADER_BAR_BUTTON_MINIMIZE)) { Can't we use GetGtkHeaderBarButtonLayout there and loop over returned WidgetNodeType and call AddHeaderBarButton(WidgetNodeType[i]). Basically reuse content of IsToolbarButtonEnabled.
Attachment #8954032 - Flags: review?(jhorak)
Comment on attachment 8954032 [details] Bug 1434646 - Titlebar rendering - Place titlebar buttons in GtkBox, https://reviewboard.mozilla.org/r/223184/#review229932 ::: widget/gtk/gtkdrawing.h:588 (Diff revisions 2 - 3) > * Get ToolbarButtonGTKMetrics for recent theme. > */ > const ToolbarButtonGTKMetrics* > GetToolbarButtonMetrics(WidgetNodeType aWidgetType); > > -/* Get toolbar button state. > +/* Get toolbar button layout. Thanks for the comment. To have it exported to doxygen you need to start comment by /** (note double stars) like previous functions are descripted.
Attachment #8954032 - Flags: review?(jhorak) → review+
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/24fc18ac7eeb Titlebar rendering - Place titlebar buttons in GtkBox, r=jhorak
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: