From: Philipp Zabel Date: Sun, 8 Aug 2010 13:51:08 +0000 (+0200) Subject: Movie list window: correct calculation of movies per screen X-Git-Url: https://vcs.maemo.org/git/?p=cinaest;a=commitdiff_plain;h=46d20e0c5a837fd0f54b357f4f3ed704d098d94d Movie list window: correct calculation of movies per screen Factor in search bar visibility. --- diff --git a/src/movie-list-window.vala b/src/movie-list-window.vala index 6cc6add..5d702ef 100644 --- a/src/movie-list-window.vala +++ b/src/movie-list-window.vala @@ -268,11 +268,17 @@ public class MovieListWindow : StackableWindow { private int movies_per_screen () { if (portrait_mode) { - // 3x3 full posters or 10 full list items - return movie_list.poster_mode ? 9 : 10; + // 3x3 full posters or 10 full list items, + // 10 full list items in list mode without search bar + return (search_bar_visible || movie_list.poster_mode) ? 9 : 10; } else { - // 5x2 posters or 6 list items - return movie_list.poster_mode ? 10 : 6; + if (search_bar_visible) { + // 5x1 full posters or 5 list items + return 5; + } else { + // 5x2 posters or 6 list items + return movie_list.poster_mode ? 10 : 6; + } } }