forked from AuroraMiddleware/gtk
Merge branch 'matthiasc/for-master' into 'master'
inspector: Use tabular numbers in the fps overlay See merge request GNOME/gtk!1912
This commit is contained in:
commit
afaa9810d1
@ -155,6 +155,7 @@ gtk_fps_overlay_snapshot (GtkInspectorOverlay *overlay,
|
||||
GtkFpsOverlay *self = GTK_FPS_OVERLAY (overlay);
|
||||
GtkFpsInfo *info;
|
||||
PangoLayout *layout;
|
||||
PangoAttrList *attrs;
|
||||
gint64 now;
|
||||
double fps;
|
||||
char *fps_string;
|
||||
@ -216,6 +217,10 @@ gtk_fps_overlay_snapshot (GtkInspectorOverlay *overlay,
|
||||
}
|
||||
|
||||
layout = gtk_widget_create_pango_layout (widget, fps_string);
|
||||
attrs = pango_attr_list_new ();
|
||||
pango_attr_list_insert (attrs, pango_attr_font_features_new ("tnum=1"));
|
||||
pango_layout_set_attributes (layout, attrs);
|
||||
pango_attr_list_unref (attrs);
|
||||
pango_layout_get_pixel_size (layout, &width, &height);
|
||||
|
||||
gtk_snapshot_save (snapshot);
|
||||
|
Loading…
Reference in New Issue
Block a user