st/scroll-bar: Remove pointless condition

Both branches are identical (which is correct - orientation or
text direction is irrelevant for the trough).

Spotted by coverity in CID 351261.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>
This commit is contained in:
Florian Müllner 2021-08-13 04:06:24 +02:00
parent 506001ebc2
commit f719ea8d69

View File

@ -200,23 +200,11 @@ scroll_bar_allocate_children (StScrollBar *bar,
st_theme_node_get_content_box (theme_node, box, &content_box); st_theme_node_get_content_box (theme_node, box, &content_box);
if (priv->vertical) trough_box.x1 = content_box.x1;
{ trough_box.y1 = content_box.y1;
trough_box.x1 = content_box.x1; trough_box.x2 = content_box.x2;
trough_box.y1 = content_box.y1; trough_box.y2 = content_box.y2;
trough_box.x2 = content_box.x2; clutter_actor_allocate (priv->trough, &trough_box);
trough_box.y2 = content_box.y2;
clutter_actor_allocate (priv->trough, &trough_box);
}
else
{
trough_box.x1 = content_box.x1;
trough_box.y1 = content_box.y1;
trough_box.x2 = content_box.x2;
trough_box.y2 = content_box.y2;
clutter_actor_allocate (priv->trough, &trough_box);
}
if (priv->adjustment) if (priv->adjustment)
{ {