![]() |
Desktop widget behaviour when changing sizes.
Hi,
It's been a while now since I'm stuck with this problem: I have a widget and from the settings I want to set the size either large or small. The result I'm getting is kinda satisfactory, but the problem is that the "close" & "settings" button in the edit mode don't fit to the widget like they normally should. They stay within the same range when the widget was first initialized. More problematic is that when the widget is initialized with large display and when normalized later from settings, as the "close" & "settings" buttons are quite beyond the display area, they are unresponsive and nothing happens. I would be very grateful if someone could help/suggest on this one. Below are the screenshots. Thanks: ALSO, It only uses the main window and the rest are just drawn on the window so no other widgets, just cairo*, pixbufs and pixmaps. However, I've tried using GdkGeometry, gtk_widget_set_size_request() and/just gtk_window_resize() and also the gtk_widget_size_request() as when the widget first initializes it uses this function: (But when using GdkGeometry I set the default size in the _init() function and commented out this one.) Code:
static void hdp_applet_size_request (GtkWidget *widget, GtkRequisition *requisition) When the widget is initialized with normal display and later changed to large: http://farm3.static.flickr.com/2522/...02d3d3ac_o.png When the widget is initialized with large display and later changed to normal: (Here "close" button does nothing at all but the "settings" button does response only when clicking at the point where it is connected to the display) http://farm3.static.flickr.com/2554/...f6124f9a_o.png |
Re: Desktop widget behaviour when changing sizes.
Well, one option would be to make the initial size small and then offset all drawing in x and y by HILDON_ICON_PIXEL_SIZE_FINGER. This should, I think, place the settings button and close button to the left and above, respectively, of the content. Which would hopefully also have the advantage of keeping them in the same position regardless of the widget size.
Course, this is a hack and assumes a lot about how hildon-home chooses the position for the buttons. |
Re: Desktop widget behaviour when changing sizes.
Quote:
|
Re: Desktop widget behaviour when changing sizes.
sorry about that! hehe
I'm at work so I don't have a dev environment on hand to try it out. I have a simple widget that should be easy enough for me to test what I described. If it works out I'll let you know. |
Re: Desktop widget behaviour when changing sizes.
Quote:
|
Re: Desktop widget behaviour when changing sizes.
Sorry. Got distracted adding gconf support to fat-label. Hopefully I'll be able to poke at it tonight.
|
All times are GMT. The time now is 22:50. |
vBulletin® Version 3.8.8