st-scroll-bar: Add support for :active
Add the :active pseudo class to the handle while it is dragged. https://bugzilla.gnome.org/show_bug.cgi?id=680974
This commit is contained in:
parent
5c7992beef
commit
aa120e0902
@ -591,6 +591,8 @@ stop_scrolling (StScrollBar *bar)
|
|||||||
if (!bar->priv->capture_handler)
|
if (!bar->priv->capture_handler)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
st_widget_remove_style_pseudo_class (bar->priv->handle, "active");
|
||||||
|
|
||||||
stage = CLUTTER_STAGE (clutter_actor_get_stage (bar->priv->trough));
|
stage = CLUTTER_STAGE (clutter_actor_get_stage (bar->priv->trough));
|
||||||
g_signal_handler_disconnect (stage, bar->priv->capture_handler);
|
g_signal_handler_disconnect (stage, bar->priv->capture_handler);
|
||||||
bar->priv->capture_handler = 0;
|
bar->priv->capture_handler = 0;
|
||||||
@ -651,6 +653,8 @@ handle_button_press_event_cb (ClutterActor *actor,
|
|||||||
&priv->y_origin))
|
&priv->y_origin))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
st_widget_add_style_pseudo_class (priv->handle, "active");
|
||||||
|
|
||||||
/* Account for the scrollbar-trough-handle nesting. */
|
/* Account for the scrollbar-trough-handle nesting. */
|
||||||
priv->x_origin += clutter_actor_get_x (priv->trough);
|
priv->x_origin += clutter_actor_get_x (priv->trough);
|
||||||
priv->y_origin += clutter_actor_get_y (priv->trough);
|
priv->y_origin += clutter_actor_get_y (priv->trough);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user