python - Scaling an image to its parent button size in GTK? -


I have a GTK layout in which there is a widget on the left side of a HBox that I want the maximum height and one VBox With the right three buttons, each has only one image and no text. Images are a GTK stock icon, and they have stock storage type.

Using the extension = true, fill = button packing without images is really the height that I want - with an arbitrary small width and an image of 1/3 of the left half of each HBox, They are either too long - 3 * ICON_SIZE_MENU is too long in too many topics - or if I force the height request of the button, then they are cut. I will not raise them to the size of the original legs.

Do I have to make my pixix for every stock icons that I am using (and if the size changes, then they are reborn)? Or can GTK fit the button instead of other ways rather than fitting the image independently? Since images have stopped some pixels from fitting in every subject, so what is the way to disable the clipping button?

This application is written using PyGTK in PIJ, but language is appreciated in any solution.

(I tried to make it a storage type of an icon name, but an icon is REVERT_TO_SAVED, which turned into a broken strikage image when I tried to apply it to the height of a particular pixel Besides, I do not want to apply it to the height of a certain pixel.)

Do not you want that you want you to have gtk.image sub-classes and your sub-classes Want to scale a pixx in the size of the allocation of your widget. The advantage of this is that you will have a reusable widget and you will be able to resize your image when it is flying.

The downside is that you have an ugly, enhanced pixmap. You might want to look into scalable vector graphics.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -