One Ruler Class to Rule the World

In KOffice 1.x, Krita had its own custom ruler implementation, while KOffice had another, KOffice-wide ruler implementation. The reason for this was that KOffice uses Postscript points (of which there are 72 to the inch), while Krita uses pixels. And pixels notoriously don’t have a size.

In KOffice 2.x, Krita knows how big its pixels are, so it suddenly becomes possible to re-use the KOffice ruler implementation. Which is exactly what Casper Boemann did yesterday: use the KOffice rulers in Krita:

Currently, the rulers show the scale in points: soon this will be settable, or configurable. We’re discussing this: is it useful to have a widget, for instance in the top-left corner between the rulers to cycle between the units (points, millimeters, inches, pixels etc.), or is changing the unit you view your image in something so seldom done that it’s better to put it in the preferences dialog?

Also note the extension to the statusbar: Monday David Vignoni will start working on icons to replace the radion buttons, but the slider and the text box will stay. This is the “view bar” where you can set the zoom level of your document. Also coded by Casper in the last week.