[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KAStatusBar
From: Espen Sand <espen.sand () neo ! no>
Date: 2000-03-15 14:36:03
[Download RAW message or body]
On Wed, 15 Mar 2000, Sven Radej wrote:
>On Wed, 15 Mar 2000, Espen Sand wrote:
>(...)
>>Hm, do you think it is possible to add an option so that an item can get a fixed
>>width? In khexedit I print quite a lot of data on the status line and I don't
>>like (it looks bad) that the width of an entry changes all the time depending on
>>what is printed because it causes other entries to be moved horizontally when
>>this happens. Ok, I can add a widget (and freeze its width) to QStatusBar
>>bypassing KStatusBar but I prefer to avoid that.
>
>OK, here you are:
> /**
> * Sets item @p id to have fixed width. This cannot be undone.
> *
> * @param id id of item
> * @param width fixed width in pixels
> */
> void setItemFixed(int id, int width);
>
thanks
Perhaps nitpicking but I think a "void freezeItem(int id)" would be useful as
well. Quite often one define a "max" string in insertItem(..) so the width could
be automatically computed using the string already present. I think new
programmers would prefer that over something like:
statusBar()->insertItem( string, id ....)
statusBar()->setItemFixed( id,
statusBar()->fontMetrics().boundingRect(string).width() );
--
Espen Sand
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic