Bug 380464 - screen is not scaled if started after resizing
Summary: screen is not scaled if started after resizing
Status: RESOLVED FIXED
Alias: None
Product: kblocks
Classification: Applications
Component: general (show other bugs)
Version: 0.3
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Zhongjie Cai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-02 11:33 UTC by a_b_c
Modified: 2017-07-27 13:04 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description a_b_c 2017-06-02 11:33:55 UTC
I start the program, resize window and then start a new game. Game area is still small, but scales up when window is resized slightly. Sometimes game scales up after (resizing and) starting, but not to the full amount. If window is maximized before starting a new game, it scales up properly.
Comment 1 a_b_c 2017-06-26 15:34:38 UTC
I upgraded to Debian 9 and KBlock 0.4. The bug still occurs.
Comment 2 Frederik Schwarzer 2017-06-26 17:48:51 UTC
I can confirm this with the 0.4 from Ubuntu.
Comment 3 Julian Helfferich 2017-06-27 19:21:06 UTC
I can confirm this with the current master branch.
Comment 4 Julian Helfferich 2017-06-27 20:37:42 UTC
I have suggested a fix on reviewboard:

https://git.reviewboard.kde.org/r/130167/
Comment 5 Albert Astals Cid 2017-07-27 13:04:47 UTC
Git commit 6ee616019ea9e67eb19ed0a8ce53feca4e7633a0 by Albert Astals Cid, on behalf of Julian Helfferich.
Committed on 27/07/2017 at 13:04.
Pushed by aacid into branch 'Applications/17.08'.

Fix incorrect resize before game is started

When the game window is resized before a game is started, the game scene is not correctly rescaled. When starting the game it might be too small (it seems never to be too large).

This commit fixes the bug by triggering a fitInView() call of the gameView. The same function is triggered by a resize event.
REVIEW: 130167

M  +2    -0    KBlocksWin.cpp

https://commits.kde.org/kblocks/6ee616019ea9e67eb19ed0a8ce53feca4e7633a0