X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bigscreen%2Fgroupscreen.cpp;h=6b2ad3d5ae6ff83778710ea1df6aaf08b0a1dc96;hb=7490ced526e0ac9a19d62b95a81244c1d01df226;hp=a9251a316a0ed663ee9ec5d900c953ee25fa069b;hpb=b37186a18ef4c10cf13a5d44603f9d41a17e2883;p=ccbs diff --git a/bigscreen/groupscreen.cpp b/bigscreen/groupscreen.cpp index a9251a3..6b2ad3d 100644 --- a/bigscreen/groupscreen.cpp +++ b/bigscreen/groupscreen.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include "resolution.h" #include "groupscreen.h" @@ -197,7 +198,7 @@ void GroupScreen::find_column_widths(const Group &group, std::vector & for (unsigned i = 0; i <= num_scores + 2; ++i) sumcolwidth += colwidth[i] + 20; - if (sumcolwidth < 780) + if (sumcolwidth < LOGICAL_SCREEN_WIDTH - 20) break; if (mode == 0) { @@ -209,7 +210,7 @@ void GroupScreen::find_column_widths(const Group &group, std::vector & * If we have space to go, distribute as much as we can to the chosen song column, so we won't have * total and rank jumping around. */ - if (sumcolwidth < 780) { + if (sumcolwidth < LOGICAL_SCREEN_WIDTH - 20) { int first_chosen_col = -1; unsigned col = 1; @@ -221,7 +222,7 @@ void GroupScreen::find_column_widths(const Group &group, std::vector & } if (first_chosen_col != -1) { - colwidth[first_chosen_col] += 780 - sumcolwidth; + colwidth[first_chosen_col] += LOGICAL_SCREEN_WIDTH - 20 - sumcolwidth; } } }