Postings tagged with Extended Layout
So the summer of code has reached its hands-down phasis and few minutes before the deadline finally height-for-width support has landed:
Proper support for rotated labels with ellipses also has been backported to GTK+:
Well, but end of Summer of Code doesn't mean end of hacking: Have to teach GtkHBox and GtkTable the size-for-allocation trick. The icon view could profit from exposing such information. Well, and finally the extended layout branch has to be merged into GTK+ trunk, which currently is feature frozen.
Guess this Summer of Code was quite some success for me: Implemented some useful features and finally managed to fully join the GNOME community.
I didn't provide a status report for some time, so what happend in extended layout world?
I stopped to waste time with baseline alignment and switched to spreading natural size support over GTK+. As a result of this effort many widgets and one cell renderer are providing and interpreting natural size information now: GtkAlignment, GtkBin, GtkButton, GtkCellRendererText, GtkCellView, GtkFrame, GtkHBox, GtkLabel, GtkSocket, GtkTable and GtkVBox.
When working on GtkVBox and vertical natural size aware alignment in GtkTable I realized GtkLabel doesn't support ellipses when rotated. So I implemented ellipsizing support for rotated labels. This code only works properly for angles being multiples of 90° so far (first screencast), but I managed to write some test program getting ellipses right for any angle (second screencast) - just have to adopt the code to the label.
Completly unrelated Teemu Ikonen reminded me of my common file format chooser project. So I moved the code from Bugzilla to libegg. Finally I also figured out how to automatically integrate that widget with file choosers. So I added file filter synchronization and automatic file extension appending (third screencast). The code still is quite rough. Icons should be retrieved via the MIME type API of GVFS. Nevertheless it would be nice if interested parties would verify if it works for them in principle. Change requests should be posted in Bug 440431.
Last week I wanted to implement something to show, so I started on baseline alignment. First lesson I've learned: The original idea, of just changing the vertical position of the widgets turned out to be thought too simple. Instead of applying the baseline adjustments from the outside by tweaking the widgets GtkAllocation, I have to tell the widgets which offset they should apply to their baselines to produce a proper offset. This was easy to implement for GtkLabel - despite all xalign and xscale hacks in that widget. What bloat we have in GTK+, that a simple label widget has to consume more than 4500 lines of code!? On propagating those baseline offsets through simple GtkBin, especially GtkAlignment widgets I've cut my teeth. So I dedided to take a break from baseline alignment and implement natural sizing. Results of my efforts can be watched in the screencast. Well, or in the extented-layout branch of GTK+.
During the last week I've adding GtkExtendedLayout support to GtkLabel and GtkBin. GtkVBox got some first code to use this extended layout information. Results are not that fancy yet, but the next days should bring some nice break-through.
The test program got rather confusing with all the guides drawn, so it got checkboxes to toggle visibility of certain guide types. When hovering a widget, the widget itself and its guides start blinking.
Completly unrelated: Peter Sikking posted on gtk-devel today, to introduce his ideas for tag based printing dialogs. Meet him already at the LinuxTag and I absolutely liked his mockups (despite looking quite raw). He suggests to tag printing options instead of randomly spreading them over notebook pages. When opening the printing dialog, you choose tags fitting your current task ("Quick Printing", "Handouts", ...) and get presented all the relevant switches. No more searching for the page holding duplex options and such. Tags are proven to be efficient to organize information. So I definitely consider Peter's concepts being worth to consider.
Here comes a new Summer of Code status report.
- I've increased my involvement with the GTK+ team: Took care about some GTK+ bugs. Got permissions to close bugs after applying reviewed patches (see: GtkTasks). During that process I've got more familiar with git-svn - had my first dcommits.
- Wasted time on extending libzip to support extracting PPMd compressed ZIP files. Having two important(?) features InfoZIP doesn't support, it seems about time to trigger libzip support in file-roller.
- The giant GtkBuilder patch has landed in GTK+ trunk. So I decided to resynch my extended-layout branch with the trunk. This is not the usual way to handle Subversion branches, but it should help me to avoid merge conflicts in the future.
- Finally came around to write real extended-layout code: The interface is there and GtkLabel implements get_baseline, testextendedlayout got new tests, autotestextendedlayout showed up as distcheck.
- Wasted quite some time by fighting with and waiting for gtk-doc to build documentation for GtkExtendedLayout: It found my new methods and added them to gtk-unused.txt, but I still had to manually move those declarations to gtk-sections.txt. Also had to register GtkExtendedLayout in gtk.types and to link it from gtk-docs.sgml. Clearly not state of the art. Extra annoyance points for xsltproc being incredibly slow.
Update: Learned from Federico and Matthias Clasen, that they usually comment out large parts of gtk-docs.sgml when doing documentation, well and that partly the Docbook stylesheets are too be blamed for the poor performance as they do alot of O(n^2) stuff.
No much progress on my SoC project: This year the LinuxTag took place in my home town Berlin, so I helped out at GNOME booth there. Nice opportunity to meet some GNOME people. Tim Janik told me about some height-for-width traps - looks like I have to extend my unit tests. Talked with Rob Taylor about some document centric usability improvements for GNOME. Sven Herzberg enlightened me, that I want to use GNOME Launch Box. Took a birds-eye view on Bug 347883 which was bugging Michael Natterer for some time and fixed it intermediatly. It was interesting to see how accustomed visitors of LinuxTag are to GNOME.
Got distracted from GNOME hacking by the forced server switch for taschenorakel.de. Took the chance to setup a django based blog. Also got distracted by Bug 440431: Needed that kind of widget for my Photobuch software.