Product manager of MeeGo native tools.
lavonius | 22 December, 2011 14:30
Once more we have published a new version of the Developer Library. Some of the highlights include:
Remember that you can also download the Developer Library as a QCH file, which you can integrate into your Qt SDK.
vuorisalmi | 21 December, 2011 14:49
As announced on 18th November in this blog, we have a new version of the default font of Nokia N9, the Nokia Pure Text. The updated font is already publically available in the Middle East and African variant (PR1.1.1, 22.2011.44-2) and it will be changed in all devices in a future software update.
The reasons for the change are the requirements of certain non-latin scripts, e.g. Arabic, and also the need to fix a number of small issues in the latin script as well.
As a result of the update, the text will take approximately 20% more space vertically. There are also other smaller changes, but the increase in the height of the text is the most significant one. This will impact the UIs of many of the applications and needs to be taken into account one way or the other. The change only applies to the Nokia Pure Text font, if you use some other typeface, your application is not impacted.
Typically the application developers would like the text to render more or less identically on the screen independent of the platform software version of the device. The first blog post presented an idea of wrapping each text Label into an invisible Qt Quick Item whose size was relative to the pixel size of the font.
This blog entry provides another proposal, something that is more suitable for multi-line text, especially when you do not know or do not want to know how many lines of text will actually be shown (a typical case when e.g. localizing the texts into multiple different languages).
The Qt Quick Text element has two interesting properties Text.lineHeightMode and Text.lineHeight, also inherited by the Label element of Qt Quick Components, which is the one that you should use in most of the cases:
The default mode is Text.ProportionalHeight. It causes the text to render quite differently when using the old (PR1.0/PR1.1 on the left) and the new version of the font (on the right):
However, if we change the mode to Text.FixedHeight and then adjust the Text.lineHeight into a suitable pixel value, the resulting text will render (almost) exactly the same independent of the N9 software release. In the next example, the line height has been set to 1.3 x pixel size of the font, and it looks almost the same as the default rendering with the new font (compare to the right-hand side of the first picture above):
And here is how the last part of the second example would look like in Qt Quick code:
import QtQuick 1.1 import com.nokia.meego 1.0 Page { // ... Rectangle { color: "#ffffbb" width: parent.width height: multiLineLabel.height // ... Label { id: multiLineLabel font.pixelSize: 24 width: parent.width wrapMode: Text.WordWrap lineHeightMode: Text.FixedHeight // Based on trials 1.3 gives quite nice line spacing lineHeight: font.pixelSize * 1.3 text: "In general, it is a good idea ..." } } }
Using these ideas, you should be able to create a UI that will look almost exactly the same in all software releases.
A final note: The change will not just impact the application UIs now, when preparing existing applications from PR1.0/PR1.1 to PR1.1.1 and the future software release. Later on, when developing on N9 with new software, you also have to ensure the application UI looks correct on devices with older software version.
In this article, our target was to make the text look the same independent of the version of the font and device software. This is a common need, but the drawback is that we do not get any benefit of the updated (and better) font metrics either. In other cases, it is perfectly ok and acceptable that the space the text takes varies from one software release to another (also, from one language to another). That will be the topic of the next article.
lavonius | 16 December, 2011 13:41
As announced yesterday, the Qt Quick Developer Guides have been updated with Harmattan-related additional material.
The guide takes the reader through developing a ToDo-application, and the added chapter describes the changes needed when porting the application to Harmattan.
The required changes are mainly on account of the differences between the Qt Quick Components in MeeGo and Symbian environments.
lavonius | 16 December, 2011 13:21
We have noted that a few games and other sound-using applications do not behave properly when the volume keys of the device are used. When the keys are used when a game is running, they should control the volume of the game instead of changing the current volume settings (and the profile) of the device.
This is done by stating that the program belongs to the "gaming"-class of applications. The full theory and practice on the topic is available in the developer library.
But simply put, you need to create a configuration file with the following content:
[classify gaming]
/full/path/to/the/game
And place it into the /usr/share/policy/etc/syspart.conf.d directory as game.conf.
vuorisalmi | 15 December, 2011 15:10
The second instance of Qt Developer Days 2011 took place in San Francisco from 29th November to 1st December. As well as in the QtDD event in Munich a month earlier, the N9 App Doctors in white jackets were there, hosting the N9 App Clinic.
Also in San Francisco, the main purpose of the clinic was help developers with their new N9 applications or bringing their existing Qt and/or Symbian apps to Nokia N9.
Santa Claus made an early visit at the event in the form of Richard Kerris, and the lucky participants with a red dot in their badges got a brand new Nokia N9 device. After that, the N9 App Clinic helped those lucky to-be N9 developers to get started with their devices and assisted them in reducing the size of their SIM cards into the MicroSIM form-factor. The SIM cutter is indeed an essential instrument in a doctor's toolbox.
N9 App Doctors - Santa's little helpers.
As it comes to the actual developer questions, some of the highlights of the discussions were:
We did get quite a lot of praise on N9, both the hardware and software. We even learned that N9 already has fans who are willing to spend their air mile points to fly to the Salo factory, in order to ensure that they get a recently announced white N9.
Maybe one has no needs to go that extreme to get the device - but for us, having spent years to make the N9 happen, this was really nice to hear.
It was indeed a pleasure to leave the event with a high note. Big thanks to all patients of the N9 App Clinic!
lavonius | 01 December, 2011 12:52
The two Qt Quick Components galleries that showcase the user interface components have been updated.
We accidentally introduced a regression, which made a few of the component-specific pages not work in the updated Harmattan environment (PR1.1, provided via over-the-air distribution).
If you have already installed the examples on an updated device, you have to remove the devtools-examples-package from the application manager (settings -> applications -> manage applications) and re-install the Examples-package with the developer-mode (settings -> security -> developer mode).