View Single Post
jaeezzy's Avatar
Posts: 664 | Thanked: 160 times | Joined on Jul 2008 @ Australia
#1
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)
{
	HdpAppletPrivate *priv;
	priv = HDP_APPLET(widget)->priv;
	if (priv->large_screen_flag){
	  	requisition->width  = HDP_WIDTH;
	  	requisition->height = HDP_HEIGHT;
  	} else{
  		requisition->width  = HDP_WIDTH_NORMAL;
	  	requisition->height = HDP_HEIGHT_NORMAL;
	}
}
all resulting in the same thing as in the screenshots.

When the widget is initialized with normal display and later changed to large:


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)

Last edited by jaeezzy; 2009-12-12 at 00:19.