Re: resizing stock icons



On Fri, Oct 1, 2010 at 14:30, Dirk Koopman <djk tobit co uk> wrote:
I am writing a little app that uses a notebook and I want to be able to
delete pages in that notebook. The mechanisms for that I understand. In my
naivete I thought that stock icon called "close" would do nicely as the icon
to put with the title in the page tab. However, it's far too big and creates
a tab that is about 2.5 times bigger than I want.
Use the "menu" size, or rule your own (see Gtk2::IconSize for more info).

Is there a mechanism to (auto) resize the stock icon to fit with the text
size in the page tab?
No idea about an automatic method, but you could use:
my ($stock_id, $icon_size) = $image->get_stock;
$image->set_from_stock ($stock_id, $new_size);

Cheers
--ab



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