diff -r 3f2a84587e4e -r 98b26a19cbeb ui/gtk/display.c
--- a/ui/gtk/display.c Sun Oct 27 10:23:02 2024 +0100
+++ b/ui/gtk/display.c Sun Oct 27 10:33:24 2024 +0100
@@ -51,24 +51,41 @@
const char *css_class = NULL;
char *markup = NULL;
-#if GTK_MAJOR_VERSION < 3
- switch(args.type && args.label) {
- case UI_LABEL_STYLE_DEFAULT: break;
- case UI_LABEL_STYLE_HEADING: {
- cxmutstr m = cx_asprintf("%s", args.label);
- markup = m.ptr;
- args.label = NULL;
- }
+ if(args.label) {
+ #if GTK_MAJOR_VERSION < 3
+ switch(args.style) {
+ case UI_LABEL_STYLE_DEFAULT: break;
+ case UI_LABEL_STYLE_TITLE: {
+ cxmutstr m = cx_asprintf("%s", args.label);
+ markup = m.ptr;
+ args.label = NULL;
+ }
+ case UI_LABEL_STYLE_SUBTITLE: {
+ break;
+ }
+ case UI_LABEL_STYLE_DIM: {
+ break;
+ }
+ }
+# else
+ switch(args.style) {
+ case UI_LABEL_STYLE_DEFAULT: break;
+ case UI_LABEL_STYLE_TITLE: {
+ css_class = "ui_label_title";
+ break;
+ }
+ case UI_LABEL_STYLE_SUBTITLE: {
+ css_class = "subtitle";
+ break;
+ }
+ case UI_LABEL_STYLE_DIM: {
+ css_class = "dim-label";
+ break;
+ }
+ }
+# endif
}
-#else
- switch(args.type && args.label) {
- case UI_LABEL_STYLE_DEFAULT: break;
- case UI_LABEL_STYLE_HEADING: {
- css_class = "ui_label_heading";
- break;
- }
- }
-#endif
+
GtkWidget *widget = gtk_label_new(args.label);
if(markup) {