[maemo-developers] overlaid buttons

From: Cornelius Hald hald at icandy.de
Date: Fri Dec 11 11:28:19 EET 2009
On Tue, 2009-12-08 at 23:58 +0200, Marius Gedminas wrote:
> On Tue, Dec 08, 2009 at 01:53:03AM -0600, kyle cronan wrote:
> > The browser (when you're in full screen) and the media player (when
> > you're browsing media) both have a little button in the bottom right
> > hand corner of the screen that is overlaid over the main window
> > content.  How can I do this in my application with Hildon and GTK?  I
> > was under the impression that GTK doesn't support overlapping widgets.
> 
> There's a package called hildon-extras that implements this kind of
> widget.  It's called HeFullscreenButton, IIRC.

Yes, the code can be found here:
https://garage.maemo.org/plugins/scmsvn/viewcvs.php/trunk/hildon-extras/hildon-extras/he-fullscreen-button.c?revision=6&root=hildon-extras&view=markup

What you do is, you basically create a new window without decorations
and with transparent background. On that window you draw using Cairo. So
you're not using standard widgets but you paint everything by your self.

The code I linked is a specific implementation for a button which will
let you leave fullscreen mode easily. It's not a generic overlay widget.
It would be nice to have such a widget in hildon-extras, so if you're
writing one, please let me know.

Cheers!
Conny


More information about the maemo-developers mailing list