[maemo-developers] Fremantle: HildonCheckButton with two labels

From: ext-mox.soini at nokia.com ext-mox.soini at nokia.com
Date: Sun Sep 20 10:15:34 EEST 2009
Hi,

The purpose of the two labels in HildonButton, is to have different semantics for the labels.
The first one is "title", the second one is "value" (HildonPickerButton) or "description" (Hildonbutton)

The checkbutton doesn't really fit so well with this kind of semantics. So you're not really supposed to have two labels there.
So I guess you have something weird in your UI design.

If you put the checkbutton widget on a row of it's own, there should be enough width for any sane text for the single label.
If you have lack of space, then the first thing to do is to reduce the length of the string.

BR,

       Mox

________________________________________
From: maemo-developers-bounces at maemo.org [maemo-developers-bounces at maemo.org] On Behalf Of ext Cornelius Hald [hald at icandy.de]
Sent: Saturday, September 19, 2009 13:00
To: maemo-developers at maemo.org
Subject: Re: Fremantle: HildonCheckButton with two labels

Ah, I forgot another thing I tried:

In my HildonButton subclass. Instead of setting the GtkCellView using
hildon_button_set_image(), I also tried gtk_button_set_image(). The
problem with the latter is, that it's just never shown. Probably
HildonButton is somehow overriding the image part of GtkButton.

Cheers!
Conny



On Sat, 2009-09-19 at 11:55 +0200, Cornelius Hald wrote:
> Hi,
>
> I'm trying to create a Hildon check button with two labels. The problem
> is that HildonCheckButton only supports one label. Why? I don't know,
> but I'm looking for a work around.
>
> What I tried so far:
>
> * Creating a HildonButton with two labels and an image that looks like a
> check box.
> Does work somehow, but looks slightly different is not themable.
>
> * Creating a subclass of HildonButton and adding as an image a
> GtkCellView with a GtkCellRendererToggle.
> Does work somehow. The problem is that HildonButton calls
> gtk_misc_set_alignment() on the image and a GtkCellView is not a
> GtkMisc, but only a GtkWidget. Therefore this results in many warnings
> and errors.
>
> * Implementing my own subclass of GtkMisc which proxies a GtkCellView,
> so that I could use this widget as 'image' on HildonButton.
> No success at all. Way to complicated :(
>
>
> It looks like the inheritance tree of the Hildon*Buttons is quite messy!
> Are there any plans to fix that or will it be fixed with Qt?
>
> Anyways, points to a cleaner work around would be highly appreciated!
>
> Thanks!
> Conny
>
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers

_______________________________________________
maemo-developers mailing list
maemo-developers at maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers
More information about the maemo-developers mailing list