mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
Use GTK_ALIGN_BASELINE_FILL
Replace GTK_ALIGN_BASELINE with its new name everywhere.
This commit is contained in:
parent
91ca6d0851
commit
ff920d98ec
@ -1294,18 +1294,18 @@ add_axis (hb_face_t *hb_face,
|
||||
|
||||
axis_label = gtk_label_new (name);
|
||||
gtk_widget_set_halign (axis_label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (axis_label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (axis_label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_grid_attach (GTK_GRID (demo->variations_grid), axis_label, 0, i, 1, 1);
|
||||
adjustment = gtk_adjustment_new (value, ax->min_value, ax->max_value,
|
||||
1.0, 10.0, 0.0);
|
||||
axis_scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
|
||||
gtk_scale_add_mark (GTK_SCALE (axis_scale), ax->default_value, GTK_POS_TOP, NULL);
|
||||
gtk_widget_set_valign (axis_scale, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (axis_scale, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_widget_set_hexpand (axis_scale, TRUE);
|
||||
gtk_widget_set_size_request (axis_scale, 100, -1);
|
||||
gtk_grid_attach (GTK_GRID (demo->variations_grid), axis_scale, 1, i, 1, 1);
|
||||
axis_entry = gtk_entry_new ();
|
||||
gtk_widget_set_valign (axis_entry, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (axis_entry, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_editable_set_width_chars (GTK_EDITABLE (axis_entry), 4);
|
||||
gtk_editable_set_max_width_chars (GTK_EDITABLE (axis_entry), 4);
|
||||
gtk_widget_set_hexpand (axis_entry, FALSE);
|
||||
@ -1562,14 +1562,14 @@ update_font_variations (void)
|
||||
label = gtk_label_new ("Instance");
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_grid_attach (GTK_GRID (demo->variations_grid), label, 0, -1, 1, 1);
|
||||
|
||||
strings = gtk_string_list_new (NULL);
|
||||
combo = gtk_drop_down_new (G_LIST_MODEL (strings), NULL);
|
||||
|
||||
gtk_widget_set_halign (combo, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (combo, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (combo, GTK_ALIGN_BASELINE_FILL);
|
||||
|
||||
gtk_string_list_append (strings, "");
|
||||
|
||||
|
@ -28,14 +28,14 @@ add_row (GtkGrid *table,
|
||||
|
||||
label = gtk_label_new_with_mnemonic (label_text);
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
gtk_grid_attach (table, label, 0, row, 1, 1);
|
||||
|
||||
dropdown = gtk_drop_down_new_from_strings (options);
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), dropdown);
|
||||
gtk_widget_set_halign (dropdown, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (dropdown, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (dropdown, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_size_group_add_widget (size_group, dropdown);
|
||||
gtk_grid_attach (table, dropdown, 1, row, 1, 1);
|
||||
}
|
||||
|
@ -455,7 +455,9 @@ gtk_center_layout_allocate (GtkLayoutManager *layout_manager,
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
if (child[i] && gtk_widget_get_valign (child[i]) == GTK_ALIGN_BASELINE)
|
||||
if (child[i] &&
|
||||
(gtk_widget_get_valign (child[i]) == GTK_ALIGN_BASELINE_FILL ||
|
||||
gtk_widget_get_valign (child[i]) == GTK_ALIGN_BASELINE_CENTER))
|
||||
{
|
||||
int child_min_height, child_nat_height;
|
||||
int child_min_baseline, child_nat_baseline;
|
||||
|
@ -429,7 +429,7 @@ new_unit_widget (GtkCustomPaperUnixDialog *dialog,
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
|
||||
button = gtk_spin_button_new_with_range (0.0, 9999.0, 1);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE_FILL);
|
||||
if (unit == GTK_UNIT_INCH)
|
||||
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (button), 2);
|
||||
else
|
||||
@ -446,7 +446,7 @@ new_unit_widget (GtkCustomPaperUnixDialog *dialog,
|
||||
label = gtk_label_new (_("inch"));
|
||||
else
|
||||
label = gtk_label_new (_("mm"));
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
|
||||
gtk_box_append (GTK_BOX (hbox), label);
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (mnemonic_label), button);
|
||||
@ -913,7 +913,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
label = gtk_label_new_with_mnemonic (_("_Width:"));
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
|
||||
|
||||
widget = new_unit_widget (dialog, user_units, label);
|
||||
@ -922,7 +922,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
label = gtk_label_new_with_mnemonic (_("_Height:"));
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
|
||||
|
||||
widget = new_unit_widget (dialog, user_units, label);
|
||||
@ -938,7 +938,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
label = gtk_label_new_with_mnemonic (_("_Top:"));
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
|
||||
|
||||
widget = new_unit_widget (dialog, user_units, label);
|
||||
@ -947,7 +947,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
label = gtk_label_new_with_mnemonic (_("_Bottom:"));
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
|
||||
|
||||
widget = new_unit_widget (dialog, user_units, label);
|
||||
@ -956,7 +956,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
label = gtk_label_new_with_mnemonic (_("_Left:"));
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
|
||||
|
||||
widget = new_unit_widget (dialog, user_units, label);
|
||||
@ -965,7 +965,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
label = gtk_label_new_with_mnemonic (_("_Right:"));
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
|
||||
|
||||
widget = new_unit_widget (dialog, user_units, label);
|
||||
|
@ -1706,7 +1706,8 @@ gtk_entry_size_allocate (GtkWidget *widget,
|
||||
text_alloc.width = width;
|
||||
text_alloc.height = height;
|
||||
|
||||
if (gtk_widget_get_valign (widget) != GTK_ALIGN_BASELINE)
|
||||
if (gtk_widget_get_valign (widget) != GTK_ALIGN_BASELINE_FILL &&
|
||||
gtk_widget_get_valign (widget) != GTK_ALIGN_BASELINE_CENTER)
|
||||
baseline = -1;
|
||||
|
||||
for (i = 0; i < MAX_ICONS; i++)
|
||||
|
@ -1587,7 +1587,7 @@ add_axis (GtkFontChooserWidget *fontchooser,
|
||||
axis->label = gtk_label_new (name);
|
||||
|
||||
gtk_widget_set_halign (axis->label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (axis->label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (axis->label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_grid_attach (GTK_GRID (fontchooser->axis_grid), axis->label, 0, row, 1, 1);
|
||||
axis->adjustment = gtk_adjustment_new ((double)value,
|
||||
(double)ax->min_value,
|
||||
@ -1595,14 +1595,14 @@ add_axis (GtkFontChooserWidget *fontchooser,
|
||||
1.0, 10.0, 0.0);
|
||||
axis->scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, axis->adjustment);
|
||||
gtk_scale_add_mark (GTK_SCALE (axis->scale), (double)ax->default_value, GTK_POS_TOP, NULL);
|
||||
gtk_widget_set_valign (axis->scale, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (axis->scale, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_widget_set_hexpand (axis->scale, TRUE);
|
||||
gtk_widget_set_size_request (axis->scale, 100, -1);
|
||||
gtk_scale_set_draw_value (GTK_SCALE (axis->scale), FALSE);
|
||||
gtk_grid_attach (GTK_GRID (fontchooser->axis_grid), axis->scale, 1, row, 1, 1);
|
||||
axis->spin = gtk_spin_button_new (axis->adjustment, 0, 0);
|
||||
g_signal_connect (axis->spin, "output", G_CALLBACK (output_cb), fontchooser);
|
||||
gtk_widget_set_valign (axis->spin, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (axis->spin, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_grid_attach (GTK_GRID (fontchooser->axis_grid), axis->spin, 2, row, 1, 1);
|
||||
|
||||
g_hash_table_add (fontchooser->axes, axis);
|
||||
|
@ -466,7 +466,7 @@ gtk_grid_class_init (GtkGridClass *class)
|
||||
/**
|
||||
* GtkGrid:baseline-row: (attributes org.gtk.Property.get=gtk_grid_get_baseline_row org.gtk.Property.set=gtk_grid_set_baseline_row)
|
||||
*
|
||||
* The row to align to the baseline when valign is %GTK_ALIGN_BASELINE.
|
||||
* The row to align to the baseline when valign is using baseline alignment.
|
||||
*/
|
||||
obj_properties[PROP_BASELINE_ROW] =
|
||||
g_param_spec_int ("baseline-row", NULL, NULL,
|
||||
|
@ -904,7 +904,7 @@ alternative_append (GtkWidget *box,
|
||||
else
|
||||
*group = button;
|
||||
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
g_object_set_data (G_OBJECT (button), "value", (gpointer)value);
|
||||
@ -983,7 +983,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
|
||||
case GTK_PRINTER_OPTION_TYPE_ALTERNATIVE:
|
||||
group = NULL;
|
||||
priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||
gtk_widget_set_valign (priv->box, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (priv->box, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_box_append (GTK_BOX (widget), priv->box);
|
||||
for (i = 0; i < source->num_choices; i++)
|
||||
{
|
||||
@ -1001,7 +1001,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
|
||||
{
|
||||
text = g_strdup_printf ("%s:", source->display_text);
|
||||
priv->label = gtk_label_new_with_mnemonic (text);
|
||||
gtk_widget_set_valign (priv->label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (priv->label, GTK_ALIGN_BASELINE_FILL);
|
||||
g_free (text);
|
||||
}
|
||||
break;
|
||||
|
@ -1278,16 +1278,16 @@ add_option_to_extension_point (GtkPrinterOption *option,
|
||||
{
|
||||
GtkWidget *label, *hbox;
|
||||
|
||||
gtk_widget_set_valign (widget, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (widget, GTK_ALIGN_BASELINE_FILL);
|
||||
|
||||
label = gtk_printer_option_widget_get_external_label (GTK_PRINTER_OPTION_WIDGET (widget));
|
||||
gtk_widget_set_visible (label, TRUE);
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||
gtk_widget_set_valign (hbox, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (hbox, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_box_append (GTK_BOX (hbox), label);
|
||||
gtk_box_append (GTK_BOX (hbox), widget);
|
||||
|
||||
|
@ -3,10 +3,13 @@
|
||||
#include "gtk.h"
|
||||
#include "gtkprivate.h"
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
/*** END file-header ***/
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
/* enumerations from "@basename@" */
|
||||
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN value-header ***/
|
||||
|
@ -231,7 +231,7 @@
|
||||
* GTK also supports baseline vertical alignment of widgets. This
|
||||
* means that widgets are positioned such that the typographical baseline of
|
||||
* widgets in the same row are aligned. This happens if a widget supports
|
||||
* baselines, has a vertical alignment of %GTK_ALIGN_BASELINE, and is inside
|
||||
* baselines, has a vertical alignment using baselines, and is inside
|
||||
* a widget that supports baselines and has a natural “row” that it aligns to
|
||||
* the baseline, or a baseline assigned to it by the grandparent.
|
||||
*
|
||||
@ -9436,9 +9436,10 @@ gtk_widget_buildable_custom_finished (GtkBuildable *buildable,
|
||||
* Gets the horizontal alignment of @widget.
|
||||
*
|
||||
* For backwards compatibility reasons this method will never return
|
||||
* %GTK_ALIGN_BASELINE, but instead it will convert it to
|
||||
* %GTK_ALIGN_FILL. Baselines are not supported for horizontal
|
||||
* alignment.
|
||||
* one of the baseline alignments, but instead it will convert it to
|
||||
* `GTK_ALIGN_FILL` or `GTK_ALIGN_CENTER`.
|
||||
*
|
||||
* Baselines are not supported for horizontal alignment.
|
||||
*
|
||||
* Returns: the horizontal alignment of @widget
|
||||
*/
|
||||
|
@ -196,7 +196,7 @@ add_content_type_row (GtkInspectorClipboard *self,
|
||||
|
||||
label = gtk_label_new (type_name);
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
gtk_box_append (GTK_BOX (hbox), label);
|
||||
@ -210,7 +210,7 @@ add_content_type_row (GtkInspectorClipboard *self,
|
||||
{
|
||||
button = gtk_toggle_button_new_with_label (_("Show"));
|
||||
gtk_widget_set_halign (button, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_box_append (GTK_BOX (hbox), button);
|
||||
|
||||
g_object_bind_property (G_OBJECT (button), "active",
|
||||
@ -230,7 +230,7 @@ add_content_type_row (GtkInspectorClipboard *self,
|
||||
G_OBJECT (label), "visible",
|
||||
G_BINDING_SYNC_CREATE | G_BINDING_INVERT_BOOLEAN);
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_box_append (GTK_BOX (hbox), label);
|
||||
}
|
||||
|
||||
|
@ -210,14 +210,14 @@ add_check_row (GtkInspectorGeneral *gen,
|
||||
|
||||
label = gtk_label_new (name);
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
gtk_box_append (GTK_BOX (box), label);
|
||||
|
||||
check = gtk_image_new_from_icon_name ("object-select-symbolic");
|
||||
gtk_widget_set_halign (check, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (check, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (check, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_widget_set_opacity (check, value ? 1.0 : 0.0);
|
||||
gtk_box_append (GTK_BOX (box), check);
|
||||
|
||||
@ -247,7 +247,7 @@ add_label_row (GtkInspectorGeneral *gen,
|
||||
|
||||
label = gtk_label_new (name);
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
gtk_box_append (GTK_BOX (box), label);
|
||||
@ -255,7 +255,7 @@ add_label_row (GtkInspectorGeneral *gen,
|
||||
label = gtk_label_new (value);
|
||||
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 1.0);
|
||||
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
|
||||
gtk_label_set_width_chars (GTK_LABEL (label), 25);
|
||||
|
@ -207,7 +207,7 @@ add_widget (GtkInspectorSizeGroups *sl,
|
||||
gtk_widget_set_margin_top (label, 10);
|
||||
gtk_widget_set_margin_bottom (label, 10);
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (row), label);
|
||||
gtk_list_box_insert (listbox, row, -1);
|
||||
}
|
||||
@ -243,13 +243,13 @@ add_size_group (GtkInspectorSizeGroups *sl,
|
||||
gtk_widget_set_margin_top (label, 10);
|
||||
gtk_widget_set_margin_bottom (label, 10);
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_box_append (GTK_BOX (box2), label);
|
||||
|
||||
dropdown = gtk_drop_down_new_from_strings (modes);
|
||||
g_object_set (dropdown, "margin", 10, NULL);
|
||||
gtk_widget_set_halign (dropdown, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (dropdown, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (dropdown, GTK_ALIGN_BASELINE_FILL);
|
||||
g_object_bind_property (group, "mode",
|
||||
dropdown, "selected",
|
||||
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
||||
|
@ -118,7 +118,7 @@ main (int argc,
|
||||
gtk_box_append (GTK_BOX (vbox), hbox);
|
||||
|
||||
const char *aligns_names[] = { "FILL", "BASELINE" };
|
||||
GtkAlign aligns[] = { GTK_ALIGN_FILL, GTK_ALIGN_BASELINE};
|
||||
GtkAlign aligns[] = { GTK_ALIGN_FILL, GTK_ALIGN_BASELINE_FILL};
|
||||
|
||||
label = gtk_label_new (aligns_names[j]);
|
||||
gtk_box_append (GTK_BOX (hbox), label);
|
||||
@ -185,7 +185,7 @@ main (int argc,
|
||||
set_font_size (button, i);
|
||||
|
||||
if (j == 0)
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE_FILL);
|
||||
|
||||
gtk_box_append (GTK_BOX (hbox), button);
|
||||
}
|
||||
@ -202,7 +202,7 @@ main (int argc,
|
||||
set_font_size (button, i);
|
||||
|
||||
if (j == 0)
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE_FILL);
|
||||
|
||||
gtk_box_append (GTK_BOX (hbox), button);
|
||||
}
|
||||
@ -210,27 +210,27 @@ main (int argc,
|
||||
image = gtk_image_new_from_icon_name ("face-sad");
|
||||
gtk_image_set_pixel_size (GTK_IMAGE (image), 34);
|
||||
if (j == 0)
|
||||
gtk_widget_set_valign (image, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (image, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_box_append (GTK_BOX (hbox), image);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("│Xyj,Ö");
|
||||
if (j == 0)
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_box_append (GTK_BOX (hbox), button);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("│Xyj,Ö");
|
||||
if (j == 0)
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_box_append (GTK_BOX (hbox), button);
|
||||
|
||||
button = gtk_check_button_new_with_label ("│Xyj,Ö");
|
||||
if (j == 0)
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_box_append (GTK_BOX (hbox), button);
|
||||
|
||||
button = gtk_check_button_new_with_label ("│Xyj,Ö");
|
||||
if (j == 0)
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_box_append (GTK_BOX (hbox), button);
|
||||
if (group == NULL)
|
||||
{
|
||||
@ -251,12 +251,12 @@ main (int argc,
|
||||
gtk_box_append (GTK_BOX (vbox), hbox);
|
||||
|
||||
label = gtk_label_new ("Align me:");
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
|
||||
gtk_box_append (GTK_BOX (hbox), label);
|
||||
|
||||
grid = gtk_grid_new ();
|
||||
gtk_widget_set_valign (grid, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (grid, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (grid), 8);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), 8);
|
||||
|
||||
@ -282,7 +282,7 @@ main (int argc,
|
||||
set_font_size (label, i);
|
||||
|
||||
if (j != 0)
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_BASELINE_FILL);
|
||||
|
||||
gtk_grid_attach (GTK_GRID (grid),
|
||||
label,
|
||||
@ -302,7 +302,7 @@ main (int argc,
|
||||
set_font_size (button, i);
|
||||
|
||||
if (j != 0)
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE_FILL);
|
||||
|
||||
gtk_grid_attach (GTK_GRID (grid),
|
||||
button,
|
||||
@ -374,7 +374,7 @@ main (int argc,
|
||||
set_font_size (button, i);
|
||||
|
||||
if (i != 0)
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE_FILL);
|
||||
|
||||
gtk_box_append (GTK_BOX (hbox), button);
|
||||
}
|
||||
@ -395,7 +395,7 @@ main (int argc,
|
||||
|
||||
set_font_size (button, i);
|
||||
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE_FILL);
|
||||
|
||||
gtk_box_append (GTK_BOX (hbox), button);
|
||||
}
|
||||
|
@ -31,8 +31,8 @@ main (int argc, char *argv[])
|
||||
g_message ("label3: %p", label3);
|
||||
g_message ("label4: %p", label4);
|
||||
|
||||
gtk_widget_set_valign (label1, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label2, GTK_ALIGN_BASELINE);
|
||||
gtk_widget_set_valign (label1, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_widget_set_valign (label2, GTK_ALIGN_BASELINE_FILL);
|
||||
gtk_widget_set_valign (label3, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label4, GTK_ALIGN_START);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user