[libshumate] map: Respect gtk-enable-animations
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libshumate] map: Respect gtk-enable-animations
- Date: Wed, 11 May 2022 20:00:40 +0000 (UTC)
commit bfe5e6a0daf0a46b1fbc1be2f9955bb0a3f06d6f
Author: James Westman <james jwestman net>
Date: Mon Apr 25 13:57:21 2022 -0500
map: Respect gtk-enable-animations
shumate/shumate-map.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/shumate/shumate-map.c b/shumate/shumate-map.c
index 1e599bd..96b443f 100644
--- a/shumate/shumate-map.c
+++ b/shumate/shumate-map.c
@@ -1043,12 +1043,17 @@ shumate_map_go_to_full_with_duration (ShumateMap *self,
ShumateMapPrivate *priv = shumate_map_get_instance_private (self);
double min_zoom, max_zoom;
GoToContext *ctx;
+ gboolean enable_animations;
g_return_if_fail (SHUMATE_IS_MAP (self));
g_return_if_fail (latitude >= SHUMATE_MIN_LATITUDE && latitude <= SHUMATE_MAX_LATITUDE);
g_return_if_fail (longitude >= SHUMATE_MIN_LONGITUDE && longitude <= SHUMATE_MAX_LONGITUDE);
- if (duration_ms == 0)
+ g_object_get (gtk_widget_get_settings (GTK_WIDGET (self)),
+ "gtk-enable-animations", &enable_animations,
+ NULL);
+
+ if (!enable_animations || duration_ms == 0)
{
shumate_map_center_on (self, latitude, longitude);
shumate_viewport_set_zoom_level (priv->viewport, zoom_level);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]