Re: automatically resizing widgets properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> even so, i still have to use set_usize/set_size_request quite often,
>> particularly to size any kind of textual display widget so that its
>> wide enough to show the largest string i will ever put there without
>> resizing dynamically, which looks really, really stupid in my
>> programs. this also applies to compound widgets like spinbuttons. 
>
>If you are doing this, you really, really need to check your program
>with a wide range of font sizes to make sure that it still works.

i always use ensure_style(), and then call set_usize/set_size_request
based on the string extents using the selected font. i have the code
to do this with pango, thanks to someone on this list, which we'll do
when we migrate to gtk+2.

>Using set_set_request() occasionally is normal; you shouldn't have
>to do it *frequently*. 

i also have to use set_usize/set_size_request on many containers whose
contents will vary significantly over the course of the program's
execution. you may like dynamic resizing, but for ardour, it just
looks dumb. in fact, this is really the dominant use i have for this
call: to set the actual widget size to something bigger than it thinks
it wants to be, because i have extra information about "the future".
			
>			And GtkSpinbutton does pick a width based on
>the range of values you set.

yeah, but in 1.2 it appears broken.


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux