[gtk+/wip/baedert/gtkimageview: 1667/1672] Simple rotation working



commit ad9b065725fc76f427bf242a62dd8f2e87079758
Author: Timm Bäder <mail baedert org>
Date:   Sun Dec 6 15:41:48 2015 +0100

    Simple rotation working

 demos/gtk-demo/image_view.c         |    2 +-
 demos/gtk-demo/reset.css            |    5 +-
 gtk/gtkimageview.c                  |  291 +++++++++++++++++------------------
 gtk/gtkpopover.c                    |    4 +-
 gtk/theme/Adwaita/gtk-contained.css |  278 +++++++++++++++++++++++----------
 5 files changed, 343 insertions(+), 237 deletions(-)
---
diff --git a/demos/gtk-demo/image_view.c b/demos/gtk-demo/image_view.c
index d99465f..6e1f314 100644
--- a/demos/gtk-demo/image_view.c
+++ b/demos/gtk-demo/image_view.c
@@ -127,7 +127,7 @@ load_pixbuf_button_clicked_cb ()
   GdkPixbuf *pixbuf;
 
   /* I really hope you have this. */
-  pixbuf = gdk_pixbuf_new_from_file ("/home/baedert/imageview.png",
+  pixbuf = gdk_pixbuf_new_from_file ("/home/baedert/imageview2.png",
                                      NULL);
 
   g_assert (pixbuf != NULL);
diff --git a/demos/gtk-demo/reset.css b/demos/gtk-demo/reset.css
index 60410e4..d6fa152 100644
--- a/demos/gtk-demo/reset.css
+++ b/demos/gtk-demo/reset.css
@@ -15,7 +15,7 @@
   font-variant: inherit;
   font-weight: inherit;
   text-shadow: inherit;
-  icon-shadow: inherit;
+  -gtk-icon-shadow: inherit;
   box-shadow: initial;
   margin-top: initial;
   margin-left: initial;
@@ -59,8 +59,7 @@
   transition-duration: initial;
   transition-timing-function: initial;
   transition-delay: initial;
-  engine: initial;
-  gtk-key-bindings: initial;
+  -gtk-key-bindings: initial;
 
   -GtkNotebook-initial-gap: 0;
 }
diff --git a/gtk/gtkimageview.c b/gtk/gtkimageview.c
index 8c6782c..489c9c1 100644
--- a/gtk/gtkimageview.c
+++ b/gtk/gtkimageview.c
@@ -25,6 +25,8 @@ double _new_y;
 
 typedef struct
 {
+  double hupper;
+  double vupper;
   double hvalue;
   double vvalue;
   double angle;
@@ -32,6 +34,10 @@ typedef struct
 } State;
 
 
+int p_x[360];
+int p_y[360];
+
+
 struct _GtkImageViewPrivate
 {
   double   scale;
@@ -147,6 +153,8 @@ gtk_image_view_get_current_state (GtkImageView *image_view,
   state->vvalue = gtk_adjustment_get_value (priv->vadjustment);
   state->scale  = priv->scale;
   state->angle  = priv->angle;
+  state->hupper = gtk_adjustment_get_upper (priv->hadjustment);
+  state->vupper = gtk_adjustment_get_upper (priv->vadjustment);
 }
 
 static gchar *
@@ -192,18 +200,18 @@ bounding_box_for_angle (GtkImageView *image_view,
   double upper_right_x, upper_right_y;
   double upper_left_x, upper_left_y;
   double scale;
-  /*static double cached_width;*/
-  /*static double cached_height;*/
-  /*static double cached_scale;*/
+  static double cached_width;
+  static double cached_height;
+  static double cached_scale;
 
-  /*if (priv->size_valid)*/
-    /*{*/
-      /**width = cached_width;*/
-      /**height = cached_height;*/
-      /*if (scale_out)*/
-        /**scale_out = cached_scale;*/
-      /*return;*/
-    /*}*/
+  if (priv->size_valid)
+    {
+      *width = cached_width;
+      *height = cached_height;
+      if (scale_out)
+        *scale_out = cached_scale;
+      return;
+    }
 
 
   if (!priv->image_surface)
@@ -222,7 +230,7 @@ bounding_box_for_angle (GtkImageView *image_view,
   upper_left_degrees  = DEG_TO_RAD (angle) + atan (image_height / -image_width);
 
 
-  r = sqrtf ((image_width / 2) * (image_width / 2) + (image_height / 2) * (image_height / 2));
+  r = sqrt ((image_width / 2) * (image_width / 2) + (image_height / 2) * (image_height / 2));
 
   upper_right_x = r * cos (upper_right_degrees);
   upper_right_y = r * sin (upper_right_degrees);
@@ -253,7 +261,7 @@ bounding_box_for_angle (GtkImageView *image_view,
         }
     }
 
-  /*cached_scale = scale;*/
+  cached_scale = scale;
   if (scale_out)
     *scale_out = scale;
 
@@ -265,10 +273,10 @@ bounding_box_for_angle (GtkImageView *image_view,
 
     }
 
-  *width  = bb_width  * scale;
-  *height = bb_height * scale;
-  /*priv->size_valid = TRUE;*/
+  *width  = cached_width = bb_width  * scale;
+  *height = cached_height = bb_height * scale;
 
+  priv->size_valid = TRUE;
 }
 
 
@@ -278,90 +286,54 @@ bounding_box_for_angle (GtkImageView *image_view,
 
 static void
 gtk_image_view_fix_point_rotate (GtkImageView *image_view,
-                                 double        angle_before,
-                                 int           anchor_x,
-                                 int           anchor_y,
+                                 double        anchor_x,
+                                 double        anchor_y,
                                  State        *old_state)
 {
   GtkImageViewPrivate *priv = gtk_image_view_get_instance_private (image_view);
-  /*double new_angle = priv->angle;*/
-  int bb_width;
-  int bb_height;
-  double center_x;
-  double center_y;
-  /*double value_x;*/
-  /*double value_y;*/
 
   g_assert (priv->anchor_x != -1 &&
             priv->anchor_y != -1);
 
 
-  double center_x_before;
-  double center_y_before;
-
   g_message ("Old State: %s", state_str (old_state));
+  g_message ("New angle: %f", priv->angle);
 
+  g_message ("Anchor: %f/%f", priv->anchor_x, priv->anchor_y);
 
-  bounding_box_for_angle (image_view,
-                          old_state->angle,
-                          &bb_width,
-                          &bb_height,
-                          NULL);
-
-  center_x_before = bb_width  / 2.0;
-  center_y_before = bb_height / 2.0;
-
-  center_x_before -= old_state->hvalue;
-  center_y_before -= old_state->vvalue;
-
-  center_x_before += anchor_x;
-  center_y_before += anchor_y;
-
-
-  bounding_box_for_angle (image_view,
-                          priv->angle,
-                          &bb_width,
-                          &bb_height,
-                          NULL);
-
-  /*
-   * XXX The anchor point changes when the angle changes...
-   */
-
+  /* 1) Calculate the angle of our anchor point. */
+  /*double anchor_angle = atan (priv->anchor_y / priv->anchor_x);*/
+  double anchor_angle = atan2 (priv->anchor_y, priv->anchor_x);
 
-  /* Once we get here, we assume the adjustments are already updated. */
-  g_assert (gtk_adjustment_get_upper (priv->hadjustment) == bb_width);
-  g_assert (gtk_adjustment_get_upper (priv->vadjustment) == bb_height);
 
+  double anchor_length = sqrt ((priv->anchor_x * priv->anchor_x) + (priv->anchor_y * priv->anchor_y));
+  g_message ("Anchor angle: %f", RAD_TO_DEG (anchor_angle));
+  g_message ("Anchor length: %f", anchor_length);
 
-  /*
-   * We know that the given anchor_x/anchor_y are relatieve to the
-   * old_state.
-   * So, the new task is to compute where the position of anchor_x/anchor_y
-   * are now that we changed priv->angle!
-   *
-   * After this, we need to update the current anchor point!
-   * But only because it's relative to the center...
-   */
+  /* 2) Calculate the position of our anchor point with increased angle */
+  double angle_diff = priv->angle - old_state->angle;
+  anchor_angle += DEG_TO_RAD (angle_diff);
+  /*anchor_angle += DEG_TO_RAD (old_state->angle);*/
+  g_message ("anchor angle after: %f", RAD_TO_DEG (anchor_angle));
 
 
 
-  /*g_message ("bounding box: %d/%d", bb_width, bb_height);*/
-  center_x = bb_width / 2.0;
-  center_y = bb_height / 2.0;
+  g_message ("Angle got increased by %f", angle_diff);
+  double new_anchor_x = cos (anchor_angle) * anchor_length;
+  double new_anchor_y = sin (anchor_angle) * anchor_length;
 
+  g_message ("New anchor: %f, %f", new_anchor_x, new_anchor_y);
 
-  // XXX Now that anchor_x/anchor_y are relative to the bounding box center,
-  //     what are center_x/center_y relative to?
 
-  center_x -= gtk_adjustment_get_value (priv->hadjustment);
-  center_y -= gtk_adjustment_get_value (priv->vadjustment);
+  /* Once we get here, we assume the adjustments are already updated. */
+  /*g_assert (gtk_adjustment_get_upper (priv->hadjustment) == bb_width);*/
+  /*g_assert (gtk_adjustment_get_upper (priv->vadjustment) == bb_height);*/
 
-  center_x += anchor_x;
-  center_y += anchor_y;
+  double hupper_diff = gtk_adjustment_get_upper (priv->hadjustment) - old_state->hupper;
+  double vupper_diff = gtk_adjustment_get_upper (priv->vadjustment) - old_state->vupper;
+  g_message ("hupper_diff: %f", hupper_diff);
+  g_message ("vupper_diff: %f", vupper_diff);
 
-  /*double c = center_x;*/
-  /*g_message ("%f, %f, %f, %f", a, b, c, gtk_adjustment_get_value (priv->hadjustment));*/
 
   /*
    * Facts:
@@ -379,25 +351,30 @@ gtk_image_view_fix_point_rotate (GtkImageView *image_view,
    *
    */
 
-  g_message ("Anchor: %f/%f", priv->anchor_x, priv->anchor_y);
-  g_message ("Center before: %f/%f", center_x_before, center_y_before);
-  g_message ("Center: %f/%f (This can be off)", center_x, center_y);
+  gtk_adjustment_set_value (priv->hadjustment,
+                            gtk_adjustment_get_value (priv->hadjustment) + hupper_diff / 2.0);
+  gtk_adjustment_set_value (priv->vadjustment,
+                            gtk_adjustment_get_value (priv->vadjustment) + vupper_diff / 2.0);
+
+
 
+  /*double diff_x = new_anchor_x - priv->anchor_x;*/
+  double diff_x = priv->anchor_x - new_anchor_x;
+  double diff_y = priv->anchor_y - new_anchor_y;
+  /*double diff_y = new_anchor_y - priv->anchor_y;// + vupper_diff / 2.0;*/
 
-  // TODO: Fix the calculations for non-center points,
-  //       since our anchor point is now 150/150
-  double diff_x = center_x - center_x_before;
-  double diff_y = center_y - center_y_before;
   g_message ("Diff: %f/%f", diff_x, diff_y);
 
   gtk_adjustment_set_value (priv->hadjustment,
-                            gtk_adjustment_get_value (priv->hadjustment) + diff_x);
+                            gtk_adjustment_get_value (priv->hadjustment) - diff_x);
 
 
   gtk_adjustment_set_value (priv->vadjustment,
-                            gtk_adjustment_get_value (priv->vadjustment) + diff_y);
+                            gtk_adjustment_get_value (priv->vadjustment) - diff_y);
+
 
   g_message ("-------------------------");
+  gtk_widget_queue_draw (GTK_WIDGET (image_view));
 }
 
 static void
@@ -446,14 +423,14 @@ gesture_rotate_end_cb (GtkGesture       *gesture,
 }
 
 static void
-gesture_rotate_cancel_cb (GtkGesture *gesture,
+gesture_rotate_cancel_cb (GtkGesture       *gesture,
                           GdkEventSequence *sequence,
                           gpointer          user_data)
 {
   GtkImageViewPrivate *priv = gtk_image_view_get_instance_private (user_data);
   gtk_image_view_set_angle (user_data, priv->gesture_start_angle);
   priv->in_rotate = FALSE;
-  priv->gesture_start_angle = FALSE;
+  priv->gesture_start_angle = FALSE; // XXX wow, lol
 
   /*priv->anchor_x = -1;*/
   /*priv->anchor_y = -1;*/
@@ -468,7 +445,7 @@ gesture_angle_changed_cb (GtkGestureRotate *gesture,
 {
   GtkImageViewPrivate *priv = gtk_image_view_get_instance_private (GTK_IMAGE_VIEW (widget));
   double new_angle;
-  double old_angle;
+  /*double old_angle;*/
 
   if (!priv->rotate_gesture_enabled)
     {
@@ -490,7 +467,7 @@ gesture_angle_changed_cb (GtkGestureRotate *gesture,
   priv->size_valid = FALSE;
 
   /* Don't notify */
-  old_angle = priv->angle;
+  /*old_angle = priv->angle;*/
   priv->angle = new_angle;
   gtk_image_view_update_adjustments (GTK_IMAGE_VIEW (widget));
 
@@ -501,6 +478,8 @@ gesture_angle_changed_cb (GtkGestureRotate *gesture,
                                      /*priv->anchor_x,*/
                                      /*priv->anchor_y);*/
 
+  // XXX Even if fit_allocation is not set, we still don't need to query a resize
+  //     if we are in a scrolledwindow, right?
   if (priv->fit_allocation)
     gtk_widget_queue_draw (widget);
   else
@@ -529,14 +508,14 @@ gtk_image_view_compute_bounding_box (GtkImageView *image_view,
   static int cached_height;
   static double cached_scale;
 
-  /*if (priv->size_valid)*/
-    /*{*/
-      /**width = cached_width;*/
-      /**height = cached_height;*/
-      /*if (scale_out)*/
-        /**scale_out = cached_scale;*/
-      /*return;*/
-    /*}*/
+  if (priv->size_valid)
+    {
+      *width = cached_width;
+      *height = cached_height;
+      if (scale_out)
+        *scale_out = cached_scale;
+      return;
+    }
 
 
   if (!priv->image_surface)
@@ -553,7 +532,7 @@ gtk_image_view_compute_bounding_box (GtkImageView *image_view,
 
   upper_right_degrees = DEG_TO_RAD (priv->angle) + atan (image_height / image_width);
   upper_left_degrees  = DEG_TO_RAD (priv->angle) + atan (image_height / -image_width);
-  r = sqrtf ((image_width / 2.0) * (image_width / 2.0) + (image_height / 2.0) * (image_height / 2.0));
+  r = sqrt ((image_width / 2.0) * (image_width / 2.0) + (image_height / 2.0) * (image_height / 2.0));
 
   upper_right_x = r * cos (upper_right_degrees);
   upper_right_y = r * sin (upper_right_degrees);
@@ -592,16 +571,11 @@ gtk_image_view_compute_bounding_box (GtkImageView *image_view,
       priv->scale = scale;
       g_object_notify_by_pspec (G_OBJECT (image_view),
                                 widget_props[PROP_SCALE]);
-
-      *width  = cached_width  = bb_width  * scale;
-      *height = cached_height = bb_height * scale;
-    }
-  else
-    {
-      *width  = cached_width  = bb_width  * scale;
-      *height = cached_height = bb_height * scale;
     }
 
+  *width  = cached_width  = bb_width  * scale;
+  *height = cached_height = bb_height * scale;
+
   priv->size_valid = TRUE;
 }
 
@@ -640,6 +614,7 @@ gtk_image_view_update_adjustments (GtkImageView *image_view)
 
       if (priv->vadjustment)
         gtk_adjustment_configure (priv->vadjustment, 0, 0, 1, 0, 0, 1);
+
       return;
     }
 
@@ -763,6 +738,9 @@ gesture_scale_changed_cb (GtkGestureZoom *gesture,
   double new_scale;
   double old_scale = priv->scale;
 
+
+  g_error (":/");
+
   /*if (!priv->rotate_gesture_enabled)*/
     /*{*/
       /*gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_DENIED);*/
@@ -817,6 +795,7 @@ gtk_image_view_init (GtkImageView *image_view)
 {
   GtkImageViewPrivate *priv = gtk_image_view_get_instance_private (image_view);
   GtkWidget *widget = GTK_WIDGET (image_view);
+  int i;
 
   gtk_widget_set_can_focus (widget, TRUE);
   gtk_widget_set_has_window (widget, FALSE);
@@ -824,6 +803,9 @@ gtk_image_view_init (GtkImageView *image_view)
   _new_x = -1;
   _new_y = -1;
 
+  for (i = 0; i < 360; i ++)
+    p_x[i] = p_y[i] = 0;
+
   priv->scale = 1.0;
   priv->angle = 0.0;
   priv->snap_angle = FALSE;
@@ -931,10 +913,10 @@ frameclock_cb (GtkWidget     *widget,
   if (t >= 1.0)
     {
       priv->angle = priv->transition_end_angle;
-      return FALSE;
+      return G_SOURCE_REMOVE;
     }
 
-  return TRUE;
+  return G_SOURCE_CONTINUE;
 }
 
 
@@ -982,13 +964,13 @@ gtk_image_view_draw (GtkWidget *widget, cairo_t *ct)
   GtkImageView *image_view = GTK_IMAGE_VIEW (widget);
   GtkImageViewPrivate *priv = gtk_image_view_get_instance_private (image_view);
   GtkStyleContext *sc = gtk_widget_get_style_context (widget);
+  int widget_width = gtk_widget_get_allocated_width (widget);
+  int widget_height = gtk_widget_get_allocated_height (widget);
   int draw_x;
   int draw_y;
   int draw_width;
   int draw_height;
   double scale = 0.0;
-  int widget_width = gtk_widget_get_allocated_width (widget);
-  int widget_height = gtk_widget_get_allocated_height (widget);
 
 
   if (priv->vadjustment && priv->hadjustment)
@@ -1074,17 +1056,34 @@ gtk_image_view_draw (GtkWidget *widget, cairo_t *ct)
   cairo_restore (ct);
 
 
-  /* XXX Debugging, Remove later. */
+  /* XXX @debug */
   if (priv->anchor_x != -1 && priv->anchor_y != -1)
     {
       double w = gtk_adjustment_get_upper (priv->hadjustment);
       double h = gtk_adjustment_get_upper (priv->vadjustment);
-      double x = (w / 2.0) + priv->anchor_x - gtk_adjustment_get_value (priv->hadjustment);
-      double y = (h / 2.0) + priv->anchor_y - gtk_adjustment_get_value (priv->vadjustment);
+      double hv = gtk_adjustment_get_value (priv->hadjustment);
+      double vv = gtk_adjustment_get_value (priv->vadjustment);
+      double x = (w / 2.0) + priv->anchor_x - hv;
+      double y = (h / 2.0) + priv->anchor_y - vv;
+      int i;
+
+      /*cairo_move_to (ct, 0, 0);*/
+      /*cairo_set_source_rgba (ct, 0, 1, 0, 1);*/
+      /*cairo_rectangle (ct, x - 2, y - 2, 4, 4);*/
+      /*cairo_fill (ct);*/
+
+
+      for (i = 0; i < 360; i ++)
+        {
+          if (p_x[i] == 0) continue;
+          /*g_message ("Drawing %d: %d, %d", i, p_x[i], p_y[i]);*/
+
+          /*cairo_set_source_rgba (ct, 0, 1, 0, 1);*/
+          /*cairo_rectangle (ct, w/2.0 + p_x[i] - 2 - hv, h/2.0 + p_y[i] - 2 - vv, 4, 4);*/
+          /*cairo_fill (ct);*/
+        }
+
 
-      cairo_set_source_rgba (ct, 0, 1, 0, 1);
-      cairo_rectangle (ct, x - 2, y - 2, 4, 4);
-      cairo_fill (ct);
     }
 
   if (_new_x != -1 && _new_y != -1)
@@ -1172,7 +1171,7 @@ gtk_image_view_set_vadjustment (GtkImageView  *image_view,
       priv->vadjustment = vadjustment;
     }
 
-  g_object_notify ((GObject *)image_view, "vadjustment");
+  g_object_notify (G_OBJECT (image_view), "vadjustment");
 
   gtk_image_view_update_adjustments (image_view);
 
@@ -1278,11 +1277,9 @@ gtk_image_view_set_angle (GtkImageView *image_view,
                           double        angle)
 {
   GtkImageViewPrivate *priv = gtk_image_view_get_instance_private (image_view);
-  double angle_before;
   g_return_if_fail (GTK_IS_IMAGE_VIEW (image_view));
 
 
-  angle_before = priv->angle;
 
   if (angle > 360.0)
     angle -= (int)(angle / 360.0) * 360;
@@ -1312,7 +1309,6 @@ gtk_image_view_set_angle (GtkImageView *image_view,
         // Calculate the difference between the current surface center
         // and the current widget center + 5
 
-        // we aleady called _update_adjustments, so the 2 uppers are fine to use.
         double cx = gtk_adjustment_get_upper (priv->hadjustment) / 2.0 -
                     gtk_adjustment_get_value (priv->hadjustment);
         double cy = gtk_adjustment_get_upper (priv->vadjustment) / 2.0 -
@@ -1328,7 +1324,6 @@ gtk_image_view_set_angle (GtkImageView *image_view,
         // Now store the difference between cx/cy and ax/ay in anchor_x/anchor_y
         priv->anchor_x = ax - cx;
         priv->anchor_y = ay - cy;
-
       }
 
 
@@ -1336,6 +1331,8 @@ gtk_image_view_set_angle (GtkImageView *image_view,
   /*if (priv->snap_angle)*/
     /*gtk_image_view_do_snapping (image_view, angle);*/
   /*else*/
+
+
     priv->angle = angle;
 
 
@@ -1343,47 +1340,26 @@ gtk_image_view_set_angle (GtkImageView *image_view,
 
 
 
-  gtk_image_view_update_adjustments (image_view);
+  /*gtk_image_view_update_adjustments (image_view);*/
 
 
   g_object_notify_by_pspec (G_OBJECT (image_view),
                             widget_props[PROP_ANGLE]);
 
 
-  /* XXX DEBUG */
-  /*if (priv->hadjustment && priv->vadjustment)*/
-    /*{*/
-      /*static gboolean first = TRUE;*/
-
-      /*if (first)*/
-        /*{*/
-          /*priv->gesture_start_scale = angle_before;*/
-          /*first = FALSE;*/
-        /*}*/
-
-      /*priv->anchor_x = 200 + (gtk_widget_get_allocated_width (GTK_WIDGET (image_view))) / 2 - 200;*/
-      /*priv->anchor_y = 200 + (gtk_widget_get_allocated_height (GTK_WIDGET (image_view))) / 2 - 200;*/
-
   // XXX Later, we can just set the anchor_point to 0/0 here and calculate the
   //     center-relative anchor point in the gesture_begin handlers
 
 
 
-      /*priv->anchor_x = priv->anchor_y = 5;*/
-
       gtk_image_view_fix_point_rotate (image_view,
-                                       angle_before,
                                        priv->anchor_x,
                                        priv->anchor_y,
                                        &old_state);
-    /*}*/
-
 
-
-
-  /*if (priv->fit_allocation)*/
-    /*gtk_widget_queue_draw (GTK_WIDGET (image_view));*/
-  /*else*/
+  if (priv->fit_allocation)
+    gtk_widget_queue_draw (GTK_WIDGET (image_view));
+  else
     gtk_widget_queue_resize (GTK_WIDGET (image_view));
 }
 
@@ -1554,7 +1530,7 @@ gtk_image_view_get_zoom_gesture_enabled (GtkImageView *image_view)
 static void
 gtk_image_view_realize (GtkWidget *widget)
 {
-  GtkImageViewPrivate *priv = gtk_image_view_get_instance_private ((GtkImageView *)widget);
+  GtkImageViewPrivate *priv = gtk_image_view_get_instance_private (GTK_IMAGE_VIEW (widget));
   GtkAllocation allocation;
   GdkWindowAttr attributes = { 0, };
   GdkWindow *window;
@@ -2224,13 +2200,28 @@ gtk_image_view_set_pixbuf (GtkImageView    *image_view,
     }
 
   gtk_image_view_update_surface (image_view, pixbuf, scale_factor);
+
+  gtk_image_view_update_adjustments (image_view);
+
+
+  /* XXX @debug */
+  double value = gtk_adjustment_get_upper (priv->hadjustment) / 2.0 -
+                 gtk_adjustment_get_page_size (priv->hadjustment) / 2.0;
+
+  gtk_adjustment_set_value (priv->hadjustment, value);
+
+  value = gtk_adjustment_get_upper (priv->vadjustment) / 2.0 -
+          gtk_adjustment_get_page_size (priv->vadjustment) / 2.0;
+
+  gtk_adjustment_set_value (priv->vadjustment, value);
+
 }
 
 /**
  * gtk_image_view_set_surface:
  * @image_view: A #GtkImageView instance
  * @surface: (nullable): A #cairo_surface_t of type #CAIRO_SURFACE_TYPE_IMAGE, or
- *   #NULL to unset any internal image data. In case this is #NULL, the scale will
+ *   %NULL to unset any internal image data. In case this is %NULL, the scale will
  *   be reset to 1.0.
  */
 void
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 4c55577..71e237a 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -1147,7 +1147,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
       gtk_popover_apply_tail_path (popover, cr);
       gdk_cairo_set_source_rgba (cr, &border_color);
 
-      cairo_set_line_width (cr, border.bottom + 1);
+      cairo_set_line_width (cr, border.bottom + 1.0);
       cairo_stroke (cr);
     }
 
@@ -1159,7 +1159,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
   if (child)
     gtk_container_propagate_draw (GTK_CONTAINER (widget), child, cr);
 
-  return TRUE;
+  return GDK_EVENT_PROPAGATE;
 }
 
 static void
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 60211f5..748de9f 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -124,16 +124,23 @@ textview {
   textview:backdrop {
     background-color: #f4f4f3; }
 
-.csd popover.background.touch-selection, .csd popover.background.magnifier, 
popover.background.touch-selection, popover.background.magnifier, .csd popover.background.osd, 
popover.background.osd, .app-notification,
-.app-notification.frame, .osd .scale-popup, .osd {
+popover.magnifier,
+popover.osd,
+.app-notification,
+.app-notification.frame,
+.osd .scale-popup, .osd {
   color: #eeeeec;
   border: none;
-  background-color: rgba(32, 37, 38, 0.8);
+  background-color: rgba(32, 37, 38, 0.7);
   background-clip: padding-box;
   outline-color: rgba(238, 238, 236, 0.3);
+  box-shadow: none;
   text-shadow: 0 1px black;
   -gtk-icon-shadow: 0 1px black; }
-  popover.background.touch-selection:backdrop, popover.background.magnifier:backdrop, 
popover.background.osd:backdrop, .app-notification:backdrop, .osd .scale-popup:backdrop, .osd:backdrop {
+  popover.magnifier:backdrop,
+  popover.osd:backdrop,
+  .app-notification:backdrop,
+  .osd .scale-popup:backdrop, .osd:backdrop {
     text-shadow: none;
     -gtk-icon-shadow: none; }
 
@@ -456,7 +463,7 @@ button, headerbar button.titlebutton,
     outline-color: rgba(238, 238, 236, 0.3);
     color: #eeeeec;
     border-color: rgba(0, 0, 0, 0.7);
-    background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.8));
+    background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.7));
     background-clip: padding-box;
     box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
     text-shadow: 0 1px black;
@@ -470,7 +477,7 @@ button, headerbar button.titlebutton,
     button.osd:hover {
       color: white;
       border-color: rgba(0, 0, 0, 0.7);
-      background-image: linear-gradient(to bottom, rgba(60, 69, 71, 0.8));
+      background-image: linear-gradient(to bottom, rgba(60, 69, 71, 0.7));
       background-clip: padding-box;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
       text-shadow: 0 1px black;
@@ -501,13 +508,13 @@ button, headerbar button.titlebutton,
     button.osd:backdrop {
       color: #eeeeec;
       border-color: rgba(0, 0, 0, 0.7);
-      background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.8));
+      background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.7));
       background-clip: padding-box;
       box-shadow: none;
       text-shadow: none;
       -gtk-icon-shadow: none;
       border: none; }
-  .csd popover.background.touch-selection button, .csd popover.background.magnifier button, 
popover.background.touch-selection button, popover.background.magnifier button, .app-notification button, 
.app-notification headerbar button.titlebutton, headerbar .app-notification button.titlebutton,
+  .app-notification button, .app-notification headerbar button.titlebutton, headerbar .app-notification 
button.titlebutton,
   .app-notification .titlebar button.titlebutton,
   .titlebar .app-notification button.titlebutton,
   .app-notification.frame button, .osd button, .osd headerbar button.titlebutton, headerbar .osd 
button.titlebutton,
@@ -515,22 +522,22 @@ button, headerbar button.titlebutton,
   .titlebar .osd button.titlebutton {
     color: #eeeeec;
     border-color: rgba(0, 0, 0, 0.7);
-    background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.8));
+    background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.7));
     background-clip: padding-box;
     box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
     text-shadow: 0 1px black;
     -gtk-icon-shadow: 0 1px black;
     outline-color: rgba(238, 238, 236, 0.3); }
-    popover.background.touch-selection button:hover, popover.background.magnifier button:hover, 
.app-notification button:hover, .osd button:hover {
+    .app-notification button:hover, .osd button:hover {
       color: white;
       border-color: rgba(0, 0, 0, 0.7);
-      background-image: linear-gradient(to bottom, rgba(60, 69, 71, 0.8));
+      background-image: linear-gradient(to bottom, rgba(60, 69, 71, 0.7));
       background-clip: padding-box;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
       text-shadow: 0 1px black;
       -gtk-icon-shadow: 0 1px black;
       outline-color: rgba(238, 238, 236, 0.3); }
-    popover.background.touch-selection button:active, popover.background.magnifier button:active, 
.app-notification button:active, popover.background.touch-selection button:checked, 
popover.background.magnifier button:checked, .app-notification button:checked, 
popover.background.touch-selection button:backdrop:active, popover.background.magnifier 
button:backdrop:active, .app-notification button:backdrop:active, popover.background.touch-selection 
button:backdrop:checked, popover.background.magnifier button:backdrop:checked, .app-notification 
button:backdrop:checked, .osd button:active, .osd button:checked, .osd button:backdrop:active, .osd 
button:backdrop:checked {
+    .app-notification button:active, .app-notification button:checked, .app-notification 
button:backdrop:active, .app-notification button:backdrop:checked, .osd button:active, .osd button:checked, 
.osd button:backdrop:active, .osd button:backdrop:checked {
       color: white;
       border-color: rgba(0, 0, 0, 0.7);
       background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7));
@@ -539,7 +546,7 @@ button, headerbar button.titlebutton,
       text-shadow: none;
       -gtk-icon-shadow: none;
       outline-color: rgba(238, 238, 236, 0.3); }
-    popover.background.touch-selection button:insensitive, popover.background.magnifier button:insensitive, 
.app-notification button:insensitive, popover.background.touch-selection button:backdrop:insensitive, 
popover.background.magnifier button:backdrop:insensitive, .app-notification button:backdrop:insensitive, .osd 
button:insensitive, .osd button:backdrop:insensitive {
+    .app-notification button:insensitive, .app-notification button:backdrop:insensitive, .osd 
button:insensitive, .osd button:backdrop:insensitive {
       color: #878a89;
       border-color: rgba(0, 0, 0, 0.7);
       background-image: linear-gradient(to bottom, rgba(53, 57, 58, 0.5));
@@ -547,19 +554,15 @@ button, headerbar button.titlebutton,
       box-shadow: none;
       text-shadow: none;
       -gtk-icon-shadow: none; }
-    popover.background.touch-selection button:backdrop, popover.background.magnifier button:backdrop, 
.app-notification button:backdrop, .osd button:backdrop {
+    .app-notification button:backdrop, .osd button:backdrop {
       color: #eeeeec;
       border-color: rgba(0, 0, 0, 0.7);
-      background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.8));
+      background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.7));
       background-clip: padding-box;
       box-shadow: none;
       text-shadow: none;
       -gtk-icon-shadow: none; }
-    popover.background.touch-selection button.flat, popover.background.touch-selection 
button.sidebar-button, popover.background.touch-selection headerbar button.titlebutton, headerbar 
popover.background.touch-selection button.titlebutton,
-    popover.background.touch-selection .titlebar button.titlebutton,
-    .titlebar popover.background.touch-selection button.titlebutton, popover.background.magnifier 
button.flat, popover.background.magnifier button.sidebar-button, popover.background.magnifier headerbar 
button.titlebutton, headerbar popover.background.magnifier button.titlebutton,
-    popover.background.magnifier .titlebar button.titlebutton,
-    .titlebar popover.background.magnifier button.titlebutton, .app-notification button.flat, 
.app-notification button.sidebar-button, .app-notification headerbar button.titlebutton, headerbar 
.app-notification button.titlebutton,
+    .app-notification button.flat, .app-notification button.sidebar-button, .app-notification headerbar 
button.titlebutton, headerbar .app-notification button.titlebutton,
     .app-notification .titlebar button.titlebutton,
     .titlebar .app-notification button.titlebutton, .osd button.flat, .osd button.sidebar-button, .osd 
headerbar button.titlebutton, headerbar .osd button.titlebutton,
     .osd .titlebar button.titlebutton,
@@ -573,28 +576,20 @@ button, headerbar button.titlebutton,
       box-shadow: none;
       text-shadow: 0 1px black;
       -gtk-icon-shadow: 0 1px black; }
-      popover.background.touch-selection button.flat:hover, popover.background.touch-selection 
button.sidebar-button:hover, popover.background.touch-selection headerbar button.titlebutton:hover, headerbar 
popover.background.touch-selection button.titlebutton:hover,
-      popover.background.touch-selection .titlebar button.titlebutton:hover,
-      .titlebar popover.background.touch-selection button.titlebutton:hover, popover.background.magnifier 
button.flat:hover, popover.background.magnifier button.sidebar-button:hover, popover.background.magnifier 
headerbar button.titlebutton:hover, headerbar popover.background.magnifier button.titlebutton:hover,
-      popover.background.magnifier .titlebar button.titlebutton:hover,
-      .titlebar popover.background.magnifier button.titlebutton:hover, .app-notification button.flat:hover, 
.app-notification button.sidebar-button:hover, .app-notification headerbar button.titlebutton:hover, 
headerbar .app-notification button.titlebutton:hover,
+      .app-notification button.flat:hover, .app-notification button.sidebar-button:hover, .app-notification 
headerbar button.titlebutton:hover, headerbar .app-notification button.titlebutton:hover,
       .app-notification .titlebar button.titlebutton:hover,
       .titlebar .app-notification button.titlebutton:hover, .osd button.flat:hover, .osd 
button.sidebar-button:hover, .osd headerbar button.titlebutton:hover, headerbar .osd button.titlebutton:hover,
       .osd .titlebar button.titlebutton:hover,
       .titlebar .osd button.titlebutton:hover {
         color: white;
         border-color: rgba(0, 0, 0, 0.7);
-        background-image: linear-gradient(to bottom, rgba(60, 69, 71, 0.8));
+        background-image: linear-gradient(to bottom, rgba(60, 69, 71, 0.7));
         background-clip: padding-box;
         box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
         text-shadow: 0 1px black;
         -gtk-icon-shadow: 0 1px black;
         outline-color: rgba(238, 238, 236, 0.3); }
-      popover.background.touch-selection button.flat:insensitive, popover.background.touch-selection 
button.sidebar-button:insensitive, popover.background.touch-selection headerbar 
button.titlebutton:insensitive, headerbar popover.background.touch-selection button.titlebutton:insensitive,
-      popover.background.touch-selection .titlebar button.titlebutton:insensitive,
-      .titlebar popover.background.touch-selection button.titlebutton:insensitive, 
popover.background.magnifier button.flat:insensitive, popover.background.magnifier 
button.sidebar-button:insensitive, popover.background.magnifier headerbar button.titlebutton:insensitive, 
headerbar popover.background.magnifier button.titlebutton:insensitive,
-      popover.background.magnifier .titlebar button.titlebutton:insensitive,
-      .titlebar popover.background.magnifier button.titlebutton:insensitive, .app-notification 
button.flat:insensitive, .app-notification button.sidebar-button:insensitive, .app-notification headerbar 
button.titlebutton:insensitive, headerbar .app-notification button.titlebutton:insensitive,
+      .app-notification button.flat:insensitive, .app-notification button.sidebar-button:insensitive, 
.app-notification headerbar button.titlebutton:insensitive, headerbar .app-notification 
button.titlebutton:insensitive,
       .app-notification .titlebar button.titlebutton:insensitive,
       .titlebar .app-notification button.titlebutton:insensitive, .osd button.flat:insensitive, .osd 
button.sidebar-button:insensitive, .osd headerbar button.titlebutton:insensitive, headerbar .osd 
button.titlebutton:insensitive,
       .osd .titlebar button.titlebutton:insensitive,
@@ -609,11 +604,7 @@ button, headerbar button.titlebutton,
         background-image: none;
         border-color: transparent;
         box-shadow: none; }
-      popover.background.touch-selection button.flat:backdrop, popover.background.touch-selection 
button.sidebar-button:backdrop, popover.background.touch-selection headerbar button.titlebutton:backdrop, 
headerbar popover.background.touch-selection button.titlebutton:backdrop,
-      popover.background.touch-selection .titlebar button.titlebutton:backdrop,
-      .titlebar popover.background.touch-selection button.titlebutton:backdrop, popover.background.magnifier 
button.flat:backdrop, popover.background.magnifier button.sidebar-button:backdrop, 
popover.background.magnifier headerbar button.titlebutton:backdrop, headerbar popover.background.magnifier 
button.titlebutton:backdrop,
-      popover.background.magnifier .titlebar button.titlebutton:backdrop,
-      .titlebar popover.background.magnifier button.titlebutton:backdrop, .app-notification 
button.flat:backdrop, .app-notification button.sidebar-button:backdrop, .app-notification headerbar 
button.titlebutton:backdrop, headerbar .app-notification button.titlebutton:backdrop,
+      .app-notification button.flat:backdrop, .app-notification button.sidebar-button:backdrop, 
.app-notification headerbar button.titlebutton:backdrop, headerbar .app-notification 
button.titlebutton:backdrop,
       .app-notification .titlebar button.titlebutton:backdrop,
       .titlebar .app-notification button.titlebutton:backdrop, .osd button.flat:backdrop, .osd 
button.sidebar-button:backdrop, .osd headerbar button.titlebutton:backdrop, headerbar .osd 
button.titlebutton:backdrop,
       .osd .titlebar button.titlebutton:backdrop,
@@ -624,17 +615,9 @@ button, headerbar button.titlebutton,
         box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0);
         text-shadow: none;
         -gtk-icon-shadow: none; }
-      popover.background.touch-selection button.flat:active, popover.background.touch-selection 
button.sidebar-button:active, popover.background.touch-selection headerbar button.titlebutton:active, 
headerbar popover.background.touch-selection button.titlebutton:active,
-      popover.background.touch-selection .titlebar button.titlebutton:active,
-      .titlebar popover.background.touch-selection button.titlebutton:active, popover.background.magnifier 
button.flat:active, popover.background.magnifier button.sidebar-button:active, popover.background.magnifier 
headerbar button.titlebutton:active, headerbar popover.background.magnifier button.titlebutton:active,
-      popover.background.magnifier .titlebar button.titlebutton:active,
-      .titlebar popover.background.magnifier button.titlebutton:active, .app-notification 
button.flat:active, .app-notification button.sidebar-button:active, .app-notification headerbar 
button.titlebutton:active, headerbar .app-notification button.titlebutton:active,
+      .app-notification button.flat:active, .app-notification button.sidebar-button:active, 
.app-notification headerbar button.titlebutton:active, headerbar .app-notification button.titlebutton:active,
       .app-notification .titlebar button.titlebutton:active,
-      .titlebar .app-notification button.titlebutton:active, popover.background.touch-selection 
button.flat:checked, popover.background.touch-selection button.sidebar-button:checked, 
popover.background.touch-selection headerbar button.titlebutton:checked, headerbar 
popover.background.touch-selection button.titlebutton:checked,
-      popover.background.touch-selection .titlebar button.titlebutton:checked,
-      .titlebar popover.background.touch-selection button.titlebutton:checked, popover.background.magnifier 
button.flat:checked, popover.background.magnifier button.sidebar-button:checked, popover.background.magnifier 
headerbar button.titlebutton:checked, headerbar popover.background.magnifier button.titlebutton:checked,
-      popover.background.magnifier .titlebar button.titlebutton:checked,
-      .titlebar popover.background.magnifier button.titlebutton:checked, .app-notification 
button.flat:checked, .app-notification button.sidebar-button:checked, .app-notification headerbar 
button.titlebutton:checked, headerbar .app-notification button.titlebutton:checked,
+      .titlebar .app-notification button.titlebutton:active, .app-notification button.flat:checked, 
.app-notification button.sidebar-button:checked, .app-notification headerbar button.titlebutton:checked, 
headerbar .app-notification button.titlebutton:checked,
       .app-notification .titlebar button.titlebutton:checked,
       .titlebar .app-notification button.titlebutton:checked, .osd button.flat:active, .osd 
button.sidebar-button:active, .osd headerbar button.titlebutton:active, headerbar .osd 
button.titlebutton:active,
       .osd .titlebar button.titlebutton:active,
@@ -1451,7 +1434,7 @@ spinbutton.vertical {
 .osd spinbutton.vertical button:first-child {
   color: #eeeeec;
   border-color: rgba(0, 0, 0, 0.7);
-  background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.8));
+  background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.7));
   background-clip: padding-box;
   box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
   text-shadow: 0 1px black;
@@ -1460,7 +1443,7 @@ spinbutton.vertical {
   .osd spinbutton.vertical button:first-child:hover {
     color: white;
     border-color: rgba(0, 0, 0, 0.7);
-    background-image: linear-gradient(to bottom, rgba(60, 69, 71, 0.8));
+    background-image: linear-gradient(to bottom, rgba(60, 69, 71, 0.7));
     background-clip: padding-box;
     box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
     text-shadow: 0 1px black;
@@ -1486,7 +1469,7 @@ spinbutton.vertical {
   .osd spinbutton.vertical button:first-child:backdrop {
     color: #eeeeec;
     border-color: rgba(0, 0, 0, 0.7);
-    background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.8));
+    background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.7));
     background-clip: padding-box;
     box-shadow: none;
     text-shadow: none;
@@ -1557,7 +1540,7 @@ toolbar, .inline-toolbar, searchbar,
     padding: 13px;
     border: none;
     border-radius: 5px;
-    background-color: rgba(32, 37, 38, 0.8); }
+    background-color: rgba(32, 37, 38, 0.7); }
   toolbar.osd.left, .osd.left.inline-toolbar, searchbar.osd.left,
   .osd.left.location-bar, toolbar.osd.right, .osd.right.inline-toolbar, searchbar.osd.right,
   .osd.right.location-bar, toolbar.osd.top, .osd.top.inline-toolbar, searchbar.osd.top,
@@ -1598,8 +1581,8 @@ headerbar {
   border-color: #9d9d99;
   border-radius: 7px 7px 0 0;
   background-color: transparent;
-  background-image: linear-gradient(to top, #d4d4d2, #efefef 2px, #f4f4f4 3px);
-  box-shadow: inset 0 1px rgba(255, 255, 255, 0.8); }
+  background-image: linear-gradient(to top, #ededec, #f2f2f1 10%);
+  box-shadow: inset 0 -1px #e1e1df, inset 0 1px rgba(255, 255, 255, 0.8); }
   .titlebar:backdrop,
   headerbar:backdrop {
     border-color: #a5a5a1;
@@ -2146,36 +2129,33 @@ menuitem accelerator {
 /***************
  * Popovers   *
  ***************/
-popover.background {
+popover {
   padding: 2px;
+  border: 1px solid alpha(#000, 0.3);
   border-radius: 5px;
   background-color: #f4f4f3;
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
-  .csd popover.background, popover.background {
-    border: 1px solid #9d9d99; }
-  popover.background:backdrop {
+  popover:backdrop {
     box-shadow: none; }
-  popover.background > list,
-  popover.background > .view,
-  popover.background > toolbar,
-  popover.background > .inline-toolbar,
-  popover.background > searchbar,
-  popover.background > .location-bar {
+  popover > list,
+  popover > .view,
+  popover > toolbar,
+  popover > .inline-toolbar,
+  popover > searchbar,
+  popover > .location-bar {
     border-style: none;
     background-color: transparent; }
-  popover.background button.flat, popover.background button.sidebar-button, popover.background headerbar 
button.titlebutton, headerbar popover.background button.titlebutton,
-  popover.background .titlebar button.titlebutton,
-  .titlebar popover.background button.titlebutton,
-  popover.background button.flat:hover,
-  popover.background button.sidebar-button:hover,
-  popover.background headerbar button.titlebutton:hover,
-  headerbar popover.background button.titlebutton:hover,
-  popover.background .titlebar button.titlebutton:hover,
-  .titlebar popover.background button.titlebutton:hover {
+  popover button.flat, popover button.sidebar-button, popover headerbar button.titlebutton, headerbar 
popover button.titlebutton,
+  popover .titlebar button.titlebutton,
+  .titlebar popover button.titlebutton,
+  popover button.flat:hover,
+  popover button.sidebar-button:hover,
+  popover headerbar button.titlebutton:hover,
+  headerbar popover button.titlebutton:hover,
+  popover .titlebar button.titlebutton:hover,
+  .titlebar popover button.titlebutton:hover {
     text-shadow: none;
     transition: none; }
-  .csd popover.background.touch-selection, .csd popover.background.magnifier, 
popover.background.touch-selection, popover.background.magnifier {
-    border: 1px solid rgba(255, 255, 255, 0.1); }
 
 /*************
  * Notebooks *
@@ -3269,7 +3249,7 @@ scale {
     .osd scale slider {
       color: #eeeeec;
       border-color: rgba(0, 0, 0, 0.7);
-      background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.8));
+      background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.7));
       background-clip: padding-box;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
       text-shadow: 0 1px black;
@@ -3280,7 +3260,7 @@ scale {
       .osd scale slider:hover {
         color: white;
         border-color: rgba(0, 0, 0, 0.7);
-        background-image: linear-gradient(to bottom, rgba(60, 69, 71, 0.8));
+        background-image: linear-gradient(to bottom, rgba(60, 69, 71, 0.7));
         background-clip: padding-box;
         box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
         text-shadow: 0 1px black;
@@ -3306,7 +3286,7 @@ scale {
       .osd scale slider:backdrop {
         color: #eeeeec;
         border-color: rgba(0, 0, 0, 0.7);
-        background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.8));
+        background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.7));
         background-clip: padding-box;
         box-shadow: none;
         text-shadow: none;
@@ -3956,7 +3936,7 @@ row {
   padding: 10px;
   border: none;
   border-radius: 0 0 5px 5px;
-  background-color: rgba(32, 37, 38, 0.8);
+  background-color: rgba(32, 37, 38, 0.7);
   background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent 2px);
   background-clip: padding-box; }
   .app-notification:backdrop,
@@ -4634,21 +4614,21 @@ headerbar.selection-mode button.titlebutton,
 
 textview text selection, textview text selection:focus,
 .view selection,
-.view selection:focus, iconview:selected, iconview:selected:focus, flowbox flowboxchild:selected, 
label:selected, label selection, label selection:focus, label selection:hover, entry selection, spinbutton 
selection, entry selection:focus, spinbutton selection:focus, modelbutton.flat:selected,
+.view selection:focus, iconview:selected, iconview:selected:focus, flowbox flowboxchild:selected, label 
selection, label selection:focus, label selection:hover, entry selection, spinbutton selection, entry 
selection:focus, spinbutton selection:focus, modelbutton.flat:selected,
 .menuitem.button.flat:selected, treeview.view:selected, row:selected, .sidebar :selected {
   background-color: #4a90d9;
   color: #ffffff;
   outline-color: rgba(255, 255, 255, 0.3); }
   textview text selection:insensitive,
-  .view selection:insensitive, iconview:insensitive:selected, flowbox flowboxchild:insensitive:selected, 
label:insensitive:selected, label selection:insensitive, entry selection:insensitive, spinbutton 
selection:insensitive, modelbutton.flat:insensitive:selected,
+  .view selection:insensitive, iconview:insensitive:selected, flowbox flowboxchild:insensitive:selected, 
label selection:insensitive, entry selection:insensitive, spinbutton selection:insensitive, 
modelbutton.flat:insensitive:selected,
   .menuitem.button.flat:insensitive:selected, treeview.view:insensitive:selected, row:insensitive:selected, 
.sidebar :insensitive:selected, placessidebar row:selected:insensitive label {
     color: #a5c8ec; }
   textview text selection:backdrop,
-  .view selection:backdrop, iconview:backdrop:selected, flowbox flowboxchild:backdrop:selected, 
label:backdrop:selected, label selection:backdrop, entry selection:backdrop, spinbutton selection:backdrop, 
modelbutton.flat:backdrop:selected,
+  .view selection:backdrop, iconview:backdrop:selected, flowbox flowboxchild:backdrop:selected, label 
selection:backdrop, entry selection:backdrop, spinbutton selection:backdrop, 
modelbutton.flat:backdrop:selected,
   .menuitem.button.flat:backdrop:selected, treeview.view:backdrop:selected, row:backdrop:selected, .sidebar 
:backdrop:selected {
     color: #ffffff; }
     textview text selection:backdrop:insensitive,
-    .view selection:backdrop:insensitive, iconview:backdrop:insensitive:selected, flowbox 
flowboxchild:backdrop:insensitive:selected, label:backdrop:insensitive:selected, label 
selection:backdrop:insensitive, entry selection:backdrop:insensitive, spinbutton 
selection:backdrop:insensitive, modelbutton.flat:backdrop:insensitive:selected,
+    .view selection:backdrop:insensitive, iconview:backdrop:insensitive:selected, flowbox 
flowboxchild:backdrop:insensitive:selected, label selection:backdrop:insensitive, entry 
selection:backdrop:insensitive, spinbutton selection:backdrop:insensitive, 
modelbutton.flat:backdrop:insensitive:selected,
     .menuitem.button.flat:backdrop:insensitive:selected, treeview.view:backdrop:insensitive:selected, 
row:backdrop:insensitive:selected, .sidebar :backdrop:insensitive:selected, placessidebar 
row:selected:insensitive label:backdrop, placessidebar row:selected:backdrop:insensitive label {
       color: #80b1e4; }
 
@@ -4692,6 +4672,142 @@ cursor-handle {
 .context-menu {
   font: initial; }
 
+popover.touch-selection {
+  font: initial;
+  color: #eeeeec;
+  border: none;
+  background-color: rgba(32, 37, 38, 0.9);
+  background-clip: padding-box;
+  outline-color: rgba(238, 238, 236, 0.3);
+  box-shadow: none;
+  text-shadow: 0 1px black;
+  -gtk-icon-shadow: 0 1px black; }
+  popover.touch-selection:backdrop {
+    text-shadow: none; }
+  popover.touch-selection button,
+  popover.touch-selection .titlebar button.titlebutton,
+  .titlebar popover.touch-selection button.titlebutton {
+    color: #eeeeec;
+    border-color: rgba(0, 0, 0, 0.7);
+    background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.7));
+    background-clip: padding-box;
+    box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
+    text-shadow: 0 1px black;
+    -gtk-icon-shadow: 0 1px black;
+    outline-color: rgba(238, 238, 236, 0.3); }
+    popover.touch-selection button:hover {
+      color: white;
+      border-color: rgba(0, 0, 0, 0.7);
+      background-image: linear-gradient(to bottom, rgba(60, 69, 71, 0.7));
+      background-clip: padding-box;
+      box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
+      text-shadow: 0 1px black;
+      -gtk-icon-shadow: 0 1px black;
+      outline-color: rgba(238, 238, 236, 0.3); }
+    popover.touch-selection button:active, popover.touch-selection button:checked {
+      color: white;
+      border-color: rgba(0, 0, 0, 0.7);
+      background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7));
+      background-clip: padding-box;
+      box-shadow: none;
+      text-shadow: none;
+      -gtk-icon-shadow: none;
+      outline-color: rgba(238, 238, 236, 0.3); }
+    popover.touch-selection button:insensitive, popover.touch-selection button:backdrop:insensitive {
+      color: #878a89;
+      border-color: rgba(0, 0, 0, 0.7);
+      background-image: linear-gradient(to bottom, rgba(53, 57, 58, 0.5));
+      background-clip: padding-box;
+      box-shadow: none;
+      text-shadow: none;
+      -gtk-icon-shadow: none; }
+    popover.touch-selection button:backdrop {
+      color: #eeeeec;
+      border-color: rgba(0, 0, 0, 0.7);
+      background-image: linear-gradient(to bottom, rgba(32, 37, 38, 0.7));
+      background-clip: padding-box;
+      box-shadow: none;
+      text-shadow: none;
+      -gtk-icon-shadow: none; }
+  popover.touch-selection .check {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-unchecked-dark.png"), 
url("assets/checkbox-unchecked-dark 2 png")); }
+  popover.touch-selection .check:hover {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-unchecked-hover-dark.png"), 
url("assets/checkbox-unchecked-hover-dark 2 png")); }
+  popover.touch-selection .check:active {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-unchecked-active-dark.png"), 
url("assets/checkbox-unchecked-active-dark 2 png")); }
+  popover.touch-selection .check:insensitive {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-unchecked-insensitive-dark.png"), 
url("assets/checkbox-unchecked-insensitive-dark 2 png")); }
+  popover.touch-selection .check:inconsistent {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-mixed-dark.png"), url("assets/checkbox-mixed-dark 2 
png")); }
+  popover.touch-selection .check:inconsistent:hover {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-mixed-hover-dark.png"), 
url("assets/checkbox-mixed-hover-dark 2 png")); }
+  popover.touch-selection .check:inconsistent:selected {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-mixed-active-dark.png"), 
url("assets/checkbox-mixed-active-dark 2 png")); }
+  popover.touch-selection .check:inconsistent:insensitive {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-mixed-insensitive-dark.png"), 
url("assets/checkbox-mixed-insensitive-dark 2 png")); }
+  popover.touch-selection .check:checked {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-dark.png"), url("assets/checkbox-checked-dark 
2 png")); }
+  popover.touch-selection .check:checked:insensitive {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-insensitive-dark.png"), 
url("assets/checkbox-checked-insensitive-dark 2 png")); }
+  popover.touch-selection .check:checked:hover {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-hover-dark.png"), 
url("assets/checkbox-checked-hover-dark 2 png")); }
+  popover.touch-selection .check:checked:active {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-active-dark.png"), 
url("assets/checkbox-checked-active-dark 2 png")); }
+  popover.touch-selection .check:backdrop:checked {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-backdrop-dark.png"), 
url("assets/checkbox-checked-backdrop-dark 2 png")); }
+  popover.touch-selection .radio {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-unchecked-dark.png"), url("assets/radio-unchecked-dark 2 
png")); }
+  popover.touch-selection .radio:hover {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-unchecked-hover-dark.png"), 
url("assets/radio-unchecked-hover-dark 2 png")); }
+  popover.touch-selection .radio:active {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-unchecked-active-dark.png"), 
url("assets/radio-unchecked-active-dark 2 png")); }
+  popover.touch-selection .radio:insensitive {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-unchecked-insensitive-dark.png"), 
url("assets/radio-unchecked-insensitive-dark 2 png")); }
+  popover.touch-selection .radio:inconsistent {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-mixed-dark.png"), url("assets/radio-mixed-dark 2 png")); 
}
+  popover.touch-selection .radio:inconsistent:hover {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-mixed-hover-dark.png"), 
url("assets/radio-mixed-hover-dark 2 png")); }
+  popover.touch-selection .radio:inconsistent:selected {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-mixed-active-dark.png"), 
url("assets/radio-mixed-active-dark 2 png")); }
+  popover.touch-selection .radio:inconsistent:insensitive {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-mixed-insensitive-dark.png"), 
url("assets/radio-mixed-insensitive-dark 2 png")); }
+  popover.touch-selection .radio:checked {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-checked-dark.png"), url("assets/radio-checked-dark 2 
png")); }
+  popover.touch-selection .radio:checked:insensitive {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-checked-insensitive-dark.png"), 
url("assets/radio-checked-insensitive-dark 2 png")); }
+  popover.touch-selection .radio:checked:hover {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-checked-hover-dark.png"), 
url("assets/radio-checked-hover-dark 2 png")); }
+  popover.touch-selection .radio:checked:active {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-checked-active-dark.png"), 
url("assets/radio-checked-active-dark 2 png")); }
+  popover.touch-selection .radio:backdrop:checked {
+    -gtk-icon-shadow: none;
+    -gtk-icon-source: -gtk-scaled(url("assets/radio-checked-backdrop-dark.png"), 
url("assets/radio-checked-backdrop-dark 2 png")); }
+
 button.circular, headerbar button.circular.titlebutton,
 .titlebar button.circular.titlebutton {
   border-radius: 20px;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]