![]() |
2009-12-17
, 14:30
|
|
Posts: 319 |
Thanked: 289 times |
Joined on Sep 2009
@ Lisboa, Portugal
|
#2
|
![]() |
2009-12-17
, 15:45
|
|
Posts: 2,121 |
Thanked: 1,540 times |
Joined on Mar 2008
@ Oxford, UK
|
#3
|
![]() |
2009-12-17
, 19:20
|
|
Posts: 319 |
Thanked: 289 times |
Joined on Sep 2009
@ Lisboa, Portugal
|
#4
|
No idea, but maybe if you post the full source code (or even better, cut down to a minimal version that shows the problem), someone might be able to help.
imports.... def hello(widget, data): print "Hello World!" class HelloHomePlugin(hildondesktop.HomePluginItem): def __init__(self): button = hildon.Button(gtk.HILDON_SIZE_THUMB_HEIGHT | gtk.HILDON_SIZE_FINGER_HEIGHT, hildon.BUTTON_ARRANGEMENT_VERTICAL) image = gtk.Image() image.set_from_file("/usr/lib/hildon-desktop/image.jpg") image.show() button.set_image(image) button.show_all() self.add(button) hd_plugin_type = HelloHomePlugin
![]() |
2009-12-18
, 09:33
|
Posts: 432 |
Thanked: 645 times |
Joined on Mar 2009
|
#5
|
button = gtk.Button() button.set_size_request(200,200)
The Following User Says Thank You to danielwilms For This Useful Post: | ||
![]() |
2009-12-18
, 09:48
|
|
Posts: 1,391 |
Thanked: 4,272 times |
Joined on Sep 2007
@ Vienna, Austria
|
#6
|
why aren't you using a gtk button, and set the size like:
if you don't specify the size, then it will be set automatically. Or try HILDON_SIZE_AUTO?Code:button = gtk.Button() button.set_size_request(200,200)
import gtk import hildon w = hildon.StackableWindow() w.connect('destroy', gtk.main_quit) b = hildon.Button(gtk.HILDON_SIZE_THUMB_HEIGHT, hildon.BUTTON_ARRANGEMENT_VERTICAL) b.set_title('Bla') b.set_value('Blubb') w.add(b) w.show_all() gtk.main()
import gtk import hildon w = hildon.StackableWindow() w.connect('destroy', gtk.main_quit) b = hildon.Button(gtk.HILDON_SIZE_THUMB_HEIGHT, hildon.BUTTON_ARRANGEMENT_VERTICAL) b.set_title('Bla') b.set_value('Blubb') vb = gtk.VBox() w.add(vb) vb.pack_start(b, expand=False) w.show_all() gtk.main()
The Following 4 Users Say Thank You to thp For This Useful Post: | ||
What am I doing wrong?
------