After reading this I couldn’t help but think that more vendors will follow. The netbook! That small, low powered laptop that was good enough to surf the web, won’t be around for long. The netbook is recognizable by its size, a bulky base, a big frame around a tiny screen and a keyboard that is hard to use for long periods of time.
If netbooks are on the way out, it means we will see more machines with OpenGL [ES] 2.0 coming to market. This is a good thing; the netbook I use for development has OpenGL 1.4 support.
I will conclude the Nux Layouts series with a look at the Grid and Layered Layout.
The grid layout places views in a typical matrix style. All views in a grid are presented with a size that they may or may not use entirely. And views cannot be rendered outside of their allocated space.
Horizontal and vertical space between views can be controlled by the developer, as is the padding of the grid content.
In addition, a grid layout can be filled in two ways:
- Horizontally, with areas added in rows from left to right
- Vertically, with areas added to columns from top to bottom
Layered Layout is the latest addition to the Layout family. Basically, it stacks areas one onto the other. And the top level area is the one that receives inputs events. The stacked areas are rendered from back to front; and with blending enabled areas can be seen through the stack.
The layouts that have been described through out the series are essential to give structure to Nux user interfaces. The Horizontal and Vertical layouts are the most complex of these layouts. This is due to traditional user interface design that tends to favor rows and columns of user interface components. However, user interface design is changing and things don’t have to be so linear anymore. Areas can be rendered in the 3D space and this offers new possibilities for user interaction.
Last week I attended the Ubuntu Developer Summit in Orlando where we kicked off the development of Precise Pangolin. I was already there the week before to attend our design sprint where I met many new Canonical employees. Canonical is growing!
UDS was full of conferences and presentations. Canonical announced a push toward tablets, smartphones and TV set-top boxes. All this means our products will have to be robust, reliable, great. Or simply exceed expectations.
I have a few pictures to share from UDS.
That is the name of the next Ubuntu release. I am heading to Orlando (Florida) for a Unity design sprint where the designers and developers get to meet and talk about what is coming next. Should be fun!
I am making some Nux sample programs available. The programs are currently available at this branch (lp:~jaytaoko/
Displaying static text is absolutely necessary in any UI toolkit. Not only that, it is important to do it right. I have been working on the text view lately. It uses Pango/Cairo on Ubuntu and Direct2D/DirectWrite on Windows.
I did some fixes in the StatictText class to make it better suited when it is used inside other views. For instance, the StaticText view may become larger or smaller according to size negotiation in a layout. However, its vertical size (the height) is determined by the size of the font. The StaticText view height cannot be controlled through the layout API. Its height is controlled by changing the size of the font.
The picture above, is showing the alignment of StatictText view in a vertical layout (VLayout). It also shows how the text appears with ellipsis if the StaticText view is too small to contain it. In the second line of text, the StaticText view maximum width has been forced to 250 pixels while the text inside occupies more than 250 pixels in width. Rather than cutting the text abruptly (or wrapping it), the rendering API (Cairo or DirectWrite) is showing ellipsis instead.
Lately I have been revisiting the Button user interface of Nux. The former Button design was very simple; it featured a label in the middle of the area, and the button changed its visual appearance as a result of the mouse pointer action over itself. If you wanted a button with more feature, then you had to write one yourself or subclass the existing one. Although I didn’t want to add too many to features to the Button design, I felt it was important to have just enough so you don’t need to recreate a new button from scratch to get started.
With the new Button design, a button may have a label, an image or both. The label and the image may displayed horizontal or vertically. You can control the space between them or choose which one comes first in an horizontal or vertical arrangement. Here is what it looks like.
I am using horizontal and vertical layouts to hold the image and the label together. It all came down together nicely and this should be enough to get started. No code available for now but it will be made available with the release of Nux 2.0 in a week.