Skip to content

Instantly share code, notes, and snippets.

@petabyt
Created August 8, 2021 16:18
Show Gist options
  • Save petabyt/a761932df272a1608996feb54ced7459 to your computer and use it in GitHub Desktop.
Save petabyt/a761932df272a1608996feb54ced7459 to your computer and use it in GitHub Desktop.
GTK Markup label example
label = gtk_label_new(NULL);
gtk_widget_set_hexpand(label, TRUE);
gtk_label_set_markup(GTK_LABEL(label),
"Hello, World\n"
"<span size='large'>This is a test.</span?");
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER);
gtk_grid_attach(GTK_GRID(mainGrid), label, 0, 0, 1, 1);
gtk_widget_show(label);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment