diff options
author | Philipp Erhardt <Philipp.Erhardt@informatik.stud.uni-erlangen.de> | 2015-06-19 13:33:51 +0200 |
---|---|---|
committer | Philipp Erhardt <Philipp.Erhardt@informatik.stud.uni-erlangen.de> | 2015-06-19 13:33:51 +0200 |
commit | 1b75ff2afaca88bcf9565331c318742a6890466a (patch) | |
tree | cd6518405547aa980168343406a84ac31b00a910 /src/layout | |
parent | 36d117a19d10adfd594d79c2b09ccf0e6c35b726 (diff) |
Improve presenterlayout, make space for future GUI
Diffstat (limited to 'src/layout')
-rw-r--r-- | src/layout/presenterlayout.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/layout/presenterlayout.cpp b/src/layout/presenterlayout.cpp index a4e6750..27ab28d 100644 --- a/src/layout/presenterlayout.cpp +++ b/src/layout/presenterlayout.cpp @@ -59,6 +59,7 @@ void PresenterLayout::resize(int w, int h) { vert_height = width / aspect; } + // maximize main slide area if (horiz_width * horiz_height > vert_width * vert_height) { horizontal_split = true; } else { @@ -109,11 +110,11 @@ void PresenterLayout::render(QPainter *painter) { w[0] = optimized_ratio * width; h[0] = height; w[1] = width - w[0] - useless_gap; - h[1] = height; + h[1] = height / 2; } else { w[0] = width; h[0] = optimized_ratio * height; - w[1] = width; + w[1] = width / 2; h[1] = height - h[0] - useless_gap; } @@ -130,11 +131,13 @@ void PresenterLayout::render(QPainter *painter) { } } - center_x[1] = width - page_width[1]; + // calculate position of next slide if (horizontal_split) { + center_x[1] = w[0] + useless_gap; center_y[1] = 0; } else { - center_y[1] = height - page_height[1]; + center_x[1] = width - page_width[1]; + center_y[1] = h[0] + useless_gap; } for (int i = 0; i < 2; i++) { |