[Kde-games-devel] Review Request 114846: Add close-up view and highlighting to Palapeli

Ian Wadham iandw.au at gmail.com
Sun Jan 5 22:06:09 UTC 2014



> On Jan. 5, 2014, 6:49 p.m., Alexander Schuch wrote:
> > I have not read the code - I just played this version.
> > 
> > I do not really understand how the space bar is supposed to work. When I am totally zoomed out, I press the space bar and it zooms in. If I press it again, nothing happens. If I zoom in or zoom out then, I can use the space bar to un-close-up. So am I supposed to always use space bar to toggle between two zoom states?

Yes, it is best to always use the space bar. That should toggle between two zoom states, homing in on a spot the mouse is pointing at. I suspect the app had somehow lost keyboard focus before you pressed space bar to zoom out, then regained focus when you did your own zoom.

BTW, how are you doing zoom? With the mouse wheel or by using the zoom-widget in the status bar?


- Ian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114846/#review46873
-----------------------------------------------------------


On Jan. 4, 2014, 11:14 a.m., Ian Wadham wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114846/
> -----------------------------------------------------------
> 
> (Updated Jan. 4, 2014, 11:14 a.m.)
> 
> 
> Review request for KDE Games.
> 
> 
> Repository: palapeli
> 
> 
> Description
> -------
> 
> To add an instant close-up view and an alternative selection highlighting scheme.
> 
> The code has been committed to origin/master. The diff supplied here is for ease of reading only. It seems OK, but is not guaranteed to be authoritative.
> 
> The close-up view is operated by hovering the mouse pointer where you want to see a close-up and then toggling the space bar. The size of pieces, in pixels, is a fixed fraction (1/12th at present) of the number of pixels on the shorter side of the screen. Thus on an Apple MacBook 1440x900 screen, the close-up piece-size is 75 pixels. On a 1024x768 screen, it would be 64 pixels. In each case, the piece should be about the same apparent angular size. This should also work reasonably on 'phones, tablets and TV monitors, where the actual size of pixels (in mm) depends on the expected viewing distance.
> 
> The close-up action will eventually appear on the View menu and toolbar, for the sake of completeness and visibility, but is not expected to work as effectively as when you use the mouse and a shortcut key together.
> 
> The new highlighter is simply an elliptical pixmap containing a circular gradient in a bright color and it appears behind the selected jigsaw piece if the shadowing option is disabled, as if the piece is lit up from behind. The size of the highlight is (at present) about 1.5 times the size of the largest piece in the puzzle, at whatever zoom-level you are using. This gives good visibility of single-piece selections when there are 5,000 pieces in view, which shadow highlighting does not. The default color is bright green, which is good at low scale factors but a bit overpowering at large scale factors, especially when a large number of pieces becomes joined and highlighted. There is scope to choose better defaults, add settings and automatically "tune" settings to the view. This is just a prototype for people to look at.
> 
> Please feel free to comment, either on the UI aspects or the technicalities of the code. I am already finding it easier to handle large puzzles.
> 
> 
> Diffs
> -----
> 
>   src/engine/mergegroup.cpp 098744d 
>   src/engine/piece.h 2c4d8fb 
>   src/engine/piece.cpp 1fc2b94 
>   src/engine/scene.h 2667404 
>   src/engine/scene.cpp cfa51d6 
>   src/engine/view.h 70df58e 
>   src/engine/view.cpp d93ff3d 
>   src/window/mainwindow.cpp 7e6cb95 
> 
> Diff: https://git.reviewboard.kde.org/r/114846/diff/
> 
> 
> Testing
> -------
> 
> Used the new close-up and highlight facilities in a 500-piece puzzle and a 5000-piece puzzle, including joining pieces in the 500-piece puzzle and checking the display of highlights on joined pieces - immediately after joining and also after saving and re-loading the puzzle. On the 5,000 piece puzzle, close-up worked well from a full view of all 5,000 pieces and highlights of selected pieces were easily visible on the 5,000 piece full view. Shadow-based highlights were too small to see at that scale.
> 
> Also did more detailed testing on an 8-piece puzzle, verifying that the highlights had the correct shape around various combinations of joined pieces.
> 
> Noted some desirable upgrades, as described in the TODO comments in the diff, such as use of Settings to control colors and sizes.
> 
> 
> Thanks,
> 
> Ian Wadham
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20140105/c3f49294/attachment.html>


More information about the kde-games-devel mailing list