Make more streams visible when window is narrow.

When user list displays on the left, the maximum height of the
<code>stream-filters-container</code> is determined by the function
<code>confine_to_range(lo,val,high)</code>. By changing the value of
<code>lo</code> to 80, the <code>stream-filters-container</code>
resizes to 80 px instead of 40 px.

Fixes #2510.
This commit is contained in:
Katy310
2017-01-09 16:08:38 +05:30
committed by Tim Abbott
parent 591efe2d64
commit 7206685dae

View File

@@ -23,7 +23,7 @@ function size_blocks(blocks, usable_height) {
_.each(blocks, function (block) {
var ratio = block.real_height / sum_height;
ratio = confine_to_range(0.05, ratio, 0.85);
block.max_height = confine_to_range(40, usable_height * ratio, 1.2 * block.real_height);
block.max_height = confine_to_range(80, usable_height * ratio, 1.2 * block.real_height);
});
}
@@ -73,7 +73,7 @@ function get_new_heights() {
}
// Don't let us crush the stream sidebar completely out of view
res.stream_filters_max_height = Math.max(40, res.stream_filters_max_height);
res.stream_filters_max_height = Math.max(80, res.stream_filters_max_height);
// RIGHT SIDEBAR
var user_presences = $('#user_presences').expectOne();