[Kde-games-devel] Review Request 110446: This patch allows the player to resize the window. The playarea gets adjusted accordingly. This is very convenient for players using high resolution deplay.

Roney Gomes roney477 at gmail.com
Tue Aug 6 21:21:10 UTC 2013


On 7/18/13, Albert Astals Cid <aacid at kde.org> wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110446/#review36122
> -----------------------------------------------------------
>
>
> Nobody can give Anant some help? Come on, I know there's guys out there in
> kdegames reading this :D

Hello everybody.

I'm answering this via e-mail because my internet access is very
limited at this moment, answering via e-mail is way easier under such
constraints. Hope this is not a problem.

Well Anant, some parts of your patch are hard to understand. Please,
avoid the use of things()->like()->these()->unterminable()->chains().
Use variables in cases where they are inevitable.

Regarding the resizing problem, maybe the key is at
QGraphicsView::setInView(). For a very good example of how scene and
view resizing is done, take a look at Kapman's source code. It shows
that resizing everything the scene contains is not always necessary
and you can avoid that.

You'll also need to improve the method responsible for drawing text
items on the screen, perhaps verifying the coordinates system
considered for placing the text.

Check also how that gray background is drawn, it gets a tile aspect
when resized. A simple setBackground() at construction time is,
perhaps, everything needed to handle that. In my point of view the
background has to be drawn only once.

That's it. Hope it helps. Feel free to ask in case of any doubts
-- 
Roney


More information about the kde-games-devel mailing list