diff --git a/plugins/project-manager/dialogs.c b/plugins/project-manager/dialogs.c
index eff82e5..385d4d4 100644
--- a/plugins/project-manager/dialogs.c
+++ b/plugins/project-manager/dialogs.c
@@ -691,6 +691,8 @@ update_properties (PropertiesTable *table)
 		gtk_widget_show (table->expand);
 	else
 		gtk_widget_hide (table->expand);
+
+	pm_project_resize_properties_dialog (table);
 }
 
 static void
@@ -817,6 +819,13 @@ on_node_changed (AnjutaTreeComboBox *view,
 	}
 }
 
+static void
+on_expand_changed (GtkWidget * widget, gpointer user_data)
+{
+	PropertiesTable *table = (PropertiesTable *)user_data;
+	pm_project_resize_properties_dialog (table);
+}
+
 static GtkWidget *
 pm_project_create_properties_dialog (AnjutaPmProject *project, GtkWindow *parent, GbfProjectView *view, GbfTreeData *data, GtkTreeIter *selected)
 {
@@ -860,6 +869,10 @@ pm_project_create_properties_dialog (AnjutaPmProject *project, GtkWindow *parent
 	g_signal_connect (node_combo, "changed",
 					G_CALLBACK (on_node_changed),
 					table);
+	
+	g_signal_connect_after (table->expand, "activate",
+					G_CALLBACK (on_expand_changed),
+					table);
 
 	update_properties (table);
 
@@ -867,12 +880,51 @@ pm_project_create_properties_dialog (AnjutaPmProject *project, GtkWindow *parent
 					G_CALLBACK (on_properties_dialog_response),
 					table);
 
-	gtk_window_set_default_size (GTK_WINDOW (table->dialog), 450, -1);
+	pm_project_resize_properties_dialog (table);
 	gtk_widget_show (table->dialog);
 
 	return table->dialog;
 }
 
+void
+pm_project_resize_properties_dialog (PropertiesTable *table)
+{
+	gint border_width, maximum_width, maximum_height;
+	GtkRequisition dialog_size, head_size, main_size, expand_size, scrollbar_minimum_size;
+	GtkWidget *parent;
+
+	gtk_widget_get_preferred_size (table->dialog, NULL, &dialog_size);
+	gtk_widget_get_preferred_size (table->head, NULL, &head_size);
+	gtk_widget_get_preferred_size (table->main, NULL, &main_size);
+	gtk_widget_get_preferred_size (table->expand, NULL, &expand_size);
+
+	//auxiliary variables
+	border_width = dialog_size.width - head_size.width;
+	maximum_width = gdk_screen_width() * 3/4;
+	maximum_height = gdk_screen_height() * 3/4;
+
+	//get minimum size of scrollbar
+	parent = table->main;
+	while (parent != NULL && GTK_IS_WIDGET (parent) && !GTK_IS_SCROLLED_WINDOW (parent))
+		parent = gtk_widget_get_parent (GTK_WIDGET (parent));
+
+	if (GTK_IS_SCROLLED_WINDOW (parent))
+		gtk_widget_get_preferred_size (parent, &scrollbar_minimum_size, NULL);
+	else
+		scrollbar_minimum_size.height = 0;
+	
+	gint height = dialog_size.height - scrollbar_minimum_size.height + main_size.height + expand_size.height;
+	gint width = (head_size.width>main_size.width)?head_size.width:main_size.width;
+	width = ((width>expand_size.width)?width:expand_size.width) + border_width;
+	
+	if (height > maximum_height)
+		height = maximum_height;
+
+	if (width > maximum_width)
+		width = maximum_width;
+	
+	gtk_window_resize (GTK_WINDOW (table->dialog), width, height);
+}
 
 /* Properties dialog
  *---------------------------------------------------------------------------*/
diff --git a/plugins/project-manager/pm_dialogs.ui b/plugins/project-manager/pm_dialogs.ui
index 2d5e615..b32565e 100644
--- a/plugins/project-manager/pm_dialogs.ui
+++ b/plugins/project-manager/pm_dialogs.ui
@@ -1225,6 +1225,7 @@
             </child>
             <child>
               <object class="GtkTable" id="head_table">
+                <property name="width_request">600</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="n_rows">3</property>
@@ -1258,7 +1259,6 @@
             <child>
               <object class="GtkScrolledWindow" id="scrolledwindow4">
                 <property name="width_request">600</property>
-                <property name="height_request">144</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <child>
