new libkdegames class KGameBasicWindow to replace KXmlGuiWindow on mobile formfactors

Review Request #6744 - Created July 8, 2011 and discarded

Information
Stefan Majewsky
kde
Reviewers
kdegames, usability
General outline: Many games present only a small set of menuitems and toolbar actions to the user. Even on mobile form factors, all relevant actions can in many cases easily fit in the toolbar, thus removing the need for the (touch-unfriendly) and redundant menubar. On the implementation side, it would be beneficial to replace KXmlGuiWindow, which provides important features to desktop apps, but overcomplicates the problem for apps as simple as most games.

Solution: The new KGameBasicWindow class provides a hard-coded toolbar arrangement, in which only one toolbar is created at the top of the window. The most relevant actions are placed here directly, like one expects for a toolbar. Less used actions (like those commonly found in the "Settings" and "Help" menu) can be placed in a hierarchy, but only one level of the hierarchy is made visible at once in the toolbar.

For example, if the user wants to open the handbook, he finds the "Help" button on the toolbar. Upon clicking it, the toolbar changes and displays all actions in the "Help" group (plus a "Back" button). After selecting the "Handbook" action (and thus opening the handbook), the toolbar automatically returns to its default setup and presents the "important" actions again.

Implementation: KGameBasicWindow is a new class in libkdegames. Besides this new class, the only change is in KGameDifficulty, whose init() function may now take not only KXmlGuiWindows, but also KGameBasicWindows. This change is trivial because KGameBasicWindow provides an action collection, too. The build of KGameBasicWindow is toggled by the CMake flag "-DKDEGAMESMOBILE=ON", which is "OFF" by default (for all desktop users).

What's missing? The standard dialog for editing shortcuts could be made available, I do not consider this top priority because keyboard shortcuts are not that relevant on mobile formfactors.
As usual, my guinea pig is KDiamond. The needed changes are included in this patch. Everything works fine here. Patch has also been tested on a WeTab tablet (with ToolBarPosition=bottom) and got positive feedback from users.
Ian Wadham
Ian Wadham
Ian Wadham
Stefan Majewsky
Ian Wadham
Stefan Majewsky
Stefan Majewsky
Aurélien Gâteau
Stefan Majewsky
Review request changed

Status: Discarded

Change Summary:

Approach is flawed. Currently trying a new concept in libtagaro ("active" branch).
Loading...