Label in tray = P in the A

10:06 pm General

In GNOME 2.30, the kbd indicator moved to the tray. People are happy, most of them. But … there is a trouble here.

StatusIcons are not GTK widgets. And, as the result, the indicator has to “emulate” gtk widget. That’s a real pain, folks. The indicator renders text to cairo, converts cairo to pixbuf, sets status icon from pixbuf. Worst of all, the widget has to follow and track all changes in gtk style, font rendering etc. What a pain.. Bug reports… Now, another one. Here is my question of the day: can anybody tell me why the font size retrieved from gtk and provided to cairo gives different results comparing to the gtk itself? I simply do not get that…

4 Responses

  1. tm Says:

    did not look on the code, but a few guesses

    * make sure you are getting the info from a realised widget (something that has or is displayed)
    * if i remember correctly the font size has to be multiplied by the pango pixel

    And all in all, there is nothing bad about they way you have solved the display (trip is long, but hey – dynamic icon!)

  2. Mike Says:

    To me the last screenshot[0] looks very good. Does it have to be the same size? OK, the color is one thing you can fix but for the size I wouldn’t mess with it. I even kind of believe a bigger size will look less neat besides the other status icons.

    Here is another idea, did you try putting the flag as, perhaps, greyed background and on top of that the locale name? :)

    Anyway, nicely done, it sounds like this gives the possibility to use the application outsides GNOME.

    [0] http://bugzilla-attachments.gnome.org/attachment.cgi?id=156845

  3. Milan Says:

    Hi, I am one of those not happy users. I would like to turn off, disable this kbd indicator, I need sometimes the other layout and for that I have shortcut and don’t need indicator in tray to remind me. Since you work on this can you tell me is there some key in gconf to disable this? Thanks.

  4. Sergey Udaltsov Says:

    @Milan
    http://git.gnome.org/browse/gnome-settings-daemon/commit/?id=d5fc6ca9440417a0fd66a30733b9d73470edb45d