#include "gtkscrolledwindow.h"
#include "gtkintl.h"
#include "gtkaccessible.h"
-#include "gtkprivate.h"
#include "gtkbuildable.h"
+#include "gtkprivate.h"
struct _GtkFontSelectionPrivate
{
atk_relation_set_add (relation_set, relation);
}
g_object_unref (relation_set);
- }
-
+ }
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_show (vbox);
gtk_box_pack_start (GTK_BOX (fontsel), vbox, FALSE, TRUE, 0);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
-
- text_box = gtk_hbox_new (FALSE, 0);
+
+ text_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_show (text_box);
gtk_box_pack_start (GTK_BOX (vbox), text_box, FALSE, TRUE, 0);
GtkFontSelectionPrivate *priv = fontsel->priv;
GtkRcStyle *rc_style;
gint new_height;
- GtkRequisition old_requisition;
+ GtkRequisition old_requisition, new_requisition;
GtkWidget *preview_entry = priv->preview_entry;
const gchar *text;
- gtk_widget_get_child_requisition (preview_entry, &old_requisition);
-
+ gtk_widget_get_preferred_size (preview_entry, &old_requisition, NULL);
+
rc_style = gtk_rc_style_new ();
rc_style->font_desc = gtk_font_selection_get_font_description (fontsel);
gtk_widget_modify_style (preview_entry, rc_style);
g_object_unref (rc_style);
- gtk_widget_size_request (preview_entry, NULL);
+ gtk_widget_get_preferred_size (preview_entry, &new_requisition, NULL);
/* We don't ever want to be over MAX_PREVIEW_HEIGHT pixels high. */
- new_height = CLAMP (preview_entry->requisition.height, INITIAL_PREVIEW_HEIGHT, MAX_PREVIEW_HEIGHT);
+ new_height = CLAMP (new_requisition.height, INITIAL_PREVIEW_HEIGHT, MAX_PREVIEW_HEIGHT);
if (new_height > old_requisition.height || new_height < old_requisition.height - 30)
gtk_widget_set_size_request (preview_entry, -1, new_height);
*
* This returns the #GtkTreeView that lists font families, for
* example, 'Sans', 'Serif', etc.
- *
- * Return value: A #GtkWidget that is part of @fontsel
+ *
+ * Return value: (transfer none): A #GtkWidget that is part of @fontsel
*
* Since: 2.14
*/
* This returns the #GtkTreeView which lists all styles available for
* the selected font. For example, 'Regular', 'Bold', etc.
*
- * Return value: A #GtkWidget that is part of @fontsel
+ * Return value: (transfer none): A #GtkWidget that is part of @fontsel
*
* Since: 2.14
*/
* @fontsel: a #GtkFontSelection
*
* This returns the #GtkEntry used to allow the user to edit the font
- * number manually instead of selecting it from the list of font sizes.
- *
- * Return value: A #GtkWidget that is part of @fontsel
+ * number manually instead of selecting it from the list of font sizes.
+ *
+ * Return value: (transfer none): A #GtkWidget that is part of @fontsel
*
* Since: 2.14
*/
* gtk_font_selection_get_size_list:
* @fontsel: a #GtkFontSelection
*
- * This returns the #GtkTreeeView used to list font sizes.
- *
- * Return value: A #GtkWidget that is part of @fontsel
+ * This returns the #GtkTreeeView used to list font sizes.
+ *
+ * Return value: (transfer none): A #GtkWidget that is part of @fontsel
*
* Since: 2.14
*/
/**
* gtk_font_selection_get_preview_entry:
* @fontsel: a #GtkFontSelection
- *
+ *
* This returns the #GtkEntry used to display the font as a preview.
*
- * Return value: A #GtkWidget that is part of @fontsel
+ * Return value: (transfer none): A #GtkWidget that is part of @fontsel
*
* Since: 2.14
*/
/**
* gtk_font_selection_get_family:
* @fontsel: a #GtkFontSelection
- *
+ *
* Gets the #PangoFontFamily representing the selected font family.
*
- * Return value: A #PangoFontFamily representing the selected font
- * family. Font families are a collection of font faces. The
- * returned object is owned by @fontsel and must not be modified
- * or freed.
+ * Return value: (transfer none): A #PangoFontFamily representing the
+ * selected font family. Font families are a collection of font
+ * faces. The returned object is owned by @fontsel and must not
+ * be modified or freed.
*
* Since: 2.14
*/
/**
* gtk_font_selection_get_face:
* @fontsel: a #GtkFontSelection
- *
+ *
* Gets the #PangoFontFace representing the selected font group
- * details (i.e. family, slant, weight, width, etc).
+ * details (i.e. family, slant, weight, width, etc).
*
- * Return value: A #PangoFontFace representing the selected font
- * group details. The returned object is owned by @fontsel and
- * must not be modified or freed.
+ * Return value: (transfer none): A #PangoFontFace representing the
+ * selected font group details. The returned object is owned by
+ * @fontsel and must not be modified or freed.
*
* Since: 2.14
*/
/**
* gtk_font_selection_get_size:
* @fontsel: a #GtkFontSelection
- *
+ *
* The selected font size.
*
- * Return value: A n integer representing the selected font size,
+ * Return value: A n integer representing the selected font size,
* or -1 if no font size is selected.
*
* Since: 2.14
content_area = gtk_dialog_get_content_area (dialog);
action_area = gtk_dialog_get_action_area (dialog);
- gtk_dialog_set_has_separator (dialog, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
_("Font Selection"));
gtk_widget_pop_composite_child ();
-
- _gtk_dialog_set_ignore_separator (dialog, TRUE);
}
/**
/**
* gtk_font_selection_dialog_get_font_selection:
- * @colorsel: a #GtkFontSelectionDialog
+ * @fsd: a #GtkFontSelectionDialog
*
* Retrieves the #GtkFontSelection widget embedded in the dialog.
*
- * Returns: the embedded #GtkFontSelection
+ * Returns: (transfer none): the embedded #GtkFontSelection
*
* Since: 2.22
**/
*
* Gets the 'OK' button.
*
- * Return value: the #GtkWidget used in the dialog for the 'OK' button.
+ * Return value: (transfer none): the #GtkWidget used in the dialog
+ * for the 'OK' button.
*
* Since: 2.14
*/
*
* Gets the 'Cancel' button.
*
- * Return value: the #GtkWidget used in the dialog for the 'Cancel' button.
+ * Return value: (transfer none): the #GtkWidget used in the dialog
+ * for the 'Cancel' button.
*
* Since: 2.14
*/