summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-12-04 17:21:56 +0000
committerMatthias Clasen <mclasen@redhat.com>2020-12-04 17:21:56 +0000
commit7f6fdd6e7bdb2930678d4a54f11fcd041c81d7d8 (patch)
treeea14f803f8ab02f87a3cab937ad63d84e4fd2e43
parentd278afc85b3355ab8e5e4fd14705e0685f05a9c6 (diff)
parent24124452d5336636eb81954ba35f0f1af669e224 (diff)
downloadgtk+-7f6fdd6e7bdb2930678d4a54f11fcd041c81d7d8.tar.gz
Merge branch 'matthiasc/for-master' into 'master'
emoji chooser: Fix incremental loading Closes #3438 See merge request GNOME/gtk!2920
-rw-r--r--gtk/gtkemojichooser.c8
-rw-r--r--gtk/gtkpicture.c18
2 files changed, 13 insertions, 13 deletions
diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c
index d5ec763936..a41c4b49d5 100644
--- a/gtk/gtkemojichooser.c
+++ b/gtk/gtkemojichooser.c
@@ -672,7 +672,7 @@ populate_emoji_chooser (gpointer data)
GVariant *item;
gint64 start, now;
- start = GDK_PROFILER_CURRENT_TIME;
+ start = g_get_monotonic_time ();
if (!chooser->data)
{
@@ -718,10 +718,10 @@ populate_emoji_chooser (gpointer data)
add_emoji (chooser->box, FALSE, item, 0, chooser);
g_variant_unref (item);
- now = GDK_PROFILER_CURRENT_TIME;
- if (now > start + 2000000) /* 2 ms */
+ now = g_get_monotonic_time ();
+ if (now > start + 200) /* 2 ms */
{
- gdk_profiler_add_mark (start, (now - start), "emojichooser", "populate");
+ gdk_profiler_add_mark (start * 1000, (now - start) * 1000, "emojichooser", "populate");
return G_SOURCE_CONTINUE;
}
}
diff --git a/gtk/gtkpicture.c b/gtk/gtkpicture.c
index bd4d9a91bb..9431b57120 100644
--- a/gtk/gtkpicture.c
+++ b/gtk/gtkpicture.c
@@ -58,15 +58,15 @@
*
* # Sizing the paintable
*
- * You can influence how the paintable is displayed inside the #GtkPicture.
- * By turning off GtkPicture::keep-aspect-ratio you can allow the paintable
- * to get stretched. GtkPicture::can-shrink can be unset to make
- * sure that paintables are never made smaller than their ideal size - but be
- * careful if you do not know the size of the paintable in use (like when
- * displaying user-loaded images). This can easily cause the picture to grow larger
- * than the screen. And GtkWidget::halign and GtkWidget::valign can be used
- * to make sure the paintable doesn't fill all available space but is instead
- * displayed at its original size.
+ * You can influence how the paintable is displayed inside the #GtkPicture.
+ * By turning off #GtkPicture:keep-aspect-ratio you can allow the paintable
+ * to get stretched. #GtkPicture:can-shrink can be unset to make sure that
+ * paintables are never made smaller than their ideal size - but be careful
+ * if you do not know the size of the paintable in use (like when displaying
+ * user-loaded images). This can easily cause the picture to grow larger than
+ * the screen. And #GtkWidget:halign and #GtkWidget:valign can be used to make
+ * sure the paintable doesn't fill all available space but is instead displayed
+ * at its original size.
*
* # CSS nodes
*