Revert "st/scrollview: Add ::content-padding property to StScrollView"
This reverts commit 0d62dadfbc
.
The only consumer of such API is now gone.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2335>
This commit is contained in:
parent
8f247971eb
commit
078aca220d
@ -99,7 +99,6 @@ st_scroll_view_fade_paint_target (ClutterOffscreenEffect *effect,
|
||||
gboolean h_scroll_visible, v_scroll_visible, rtl;
|
||||
|
||||
ClutterActorBox allocation, content_box, paint_box;
|
||||
ClutterMargin *content_padding;
|
||||
|
||||
float fade_area_topleft[2];
|
||||
float fade_area_bottomright[2];
|
||||
@ -111,13 +110,6 @@ st_scroll_view_fade_paint_target (ClutterOffscreenEffect *effect,
|
||||
clutter_actor_get_allocation_box (self->actor, &allocation);
|
||||
st_theme_node_get_content_box (st_widget_get_theme_node (ST_WIDGET (self->actor)),
|
||||
(const ClutterActorBox *)&allocation, &content_box);
|
||||
g_object_get (self->actor, "content-padding", &content_padding, NULL);
|
||||
|
||||
content_box.x1 += content_padding->left;
|
||||
content_box.x2 -= content_padding->right;
|
||||
content_box.y1 += content_padding->top;
|
||||
content_box.y2 -= content_padding->bottom;
|
||||
clutter_margin_free (content_padding);
|
||||
|
||||
/*
|
||||
* The FBO is based on the paint_volume's size which can be larger then the actual
|
||||
|
@ -84,8 +84,6 @@ struct _StScrollViewPrivate
|
||||
StAdjustment *vadjustment;
|
||||
ClutterActor *vscroll;
|
||||
|
||||
ClutterMargin content_padding;
|
||||
|
||||
StPolicyType hscrollbar_policy;
|
||||
StPolicyType vscrollbar_policy;
|
||||
|
||||
@ -118,7 +116,6 @@ enum {
|
||||
PROP_VSCROLLBAR_VISIBLE,
|
||||
PROP_MOUSE_SCROLL,
|
||||
PROP_OVERLAY_SCROLLBARS,
|
||||
PROP_CONTENT_PADDING,
|
||||
|
||||
N_PROPS
|
||||
};
|
||||
@ -159,9 +156,6 @@ st_scroll_view_get_property (GObject *object,
|
||||
case PROP_OVERLAY_SCROLLBARS:
|
||||
g_value_set_boolean (value, priv->overlay_scrollbars);
|
||||
break;
|
||||
case PROP_CONTENT_PADDING:
|
||||
g_value_set_boxed (value, &priv->content_padding);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
}
|
||||
@ -208,23 +202,6 @@ st_scroll_view_update_fade_effect (StScrollView *scroll,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
st_scroll_view_set_content_padding (StScrollView *scroll,
|
||||
ClutterMargin *content_padding)
|
||||
{
|
||||
StScrollViewPrivate *priv = ST_SCROLL_VIEW (scroll)->priv;
|
||||
|
||||
if (priv->content_padding.left == content_padding->left &&
|
||||
priv->content_padding.right == content_padding->right &&
|
||||
priv->content_padding.top == content_padding->top &&
|
||||
priv->content_padding.bottom == content_padding->bottom)
|
||||
return;
|
||||
|
||||
priv->content_padding = *content_padding;
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (scroll), props[PROP_CONTENT_PADDING]);
|
||||
}
|
||||
|
||||
static void
|
||||
st_scroll_view_set_property (GObject *object,
|
||||
guint property_id,
|
||||
@ -254,10 +231,6 @@ st_scroll_view_set_property (GObject *object,
|
||||
priv->hscrollbar_policy,
|
||||
g_value_get_enum (value));
|
||||
break;
|
||||
case PROP_CONTENT_PADDING:
|
||||
st_scroll_view_set_content_padding (self,
|
||||
(ClutterMargin *)g_value_get_boxed (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
}
|
||||
@ -570,11 +543,6 @@ st_scroll_view_allocate (ClutterActor *actor,
|
||||
|
||||
st_theme_node_get_content_box (theme_node, box, &content_box);
|
||||
|
||||
content_box.x1 += priv->content_padding.left;
|
||||
content_box.x2 -= priv->content_padding.right;
|
||||
content_box.y1 += priv->content_padding.top;
|
||||
content_box.y2 += priv->content_padding.bottom;
|
||||
|
||||
avail_width = content_box.x2 - content_box.x1;
|
||||
avail_height = content_box.y2 - content_box.y1;
|
||||
|
||||
@ -966,13 +934,6 @@ st_scroll_view_class_init (StScrollViewClass *klass)
|
||||
FALSE,
|
||||
ST_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
props[PROP_CONTENT_PADDING] =
|
||||
g_param_spec_boxed ("content-padding",
|
||||
"Content padding",
|
||||
"Content padding",
|
||||
CLUTTER_TYPE_MARGIN,
|
||||
ST_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
g_object_class_install_properties (object_class, N_PROPS, props);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user