comparison gtk4/dw.c @ 2318:5951752fa7af

GTK4: Implement borderless button style for buttons.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 16 Feb 2021 07:17:09 +0000
parents a2020f907a6c
children 36522ed00ef8
comparison
equal deleted inserted replaced
2317:a2020f907a6c 2318:5951752fa7af
8549 } 8549 }
8550 else if(GTK_IS_BUTTON(handle)) 8550 else if(GTK_IS_BUTTON(handle))
8551 { 8551 {
8552 if(mask & DW_BS_NOBORDER) 8552 if(mask & DW_BS_NOBORDER)
8553 { 8553 {
8554 /* TODO: Figure out how to do this in GTK4 with no Shadow or Relief */ 8554 GtkStyleContext *context = gtk_widget_get_style_context(GTK_WIDGET(handle));
8555
8555 if(style & DW_BS_NOBORDER) 8556 if(style & DW_BS_NOBORDER)
8556 ; 8557 gtk_style_context_add_class(context, "flat");
8557 else 8558 else
8558 ; 8559 gtk_style_context_remove_class(context, "flat");
8559 } 8560 }
8560 } 8561 }
8561 if(GTK_IS_LABEL(handle2)) 8562 if(GTK_IS_LABEL(handle2))
8562 { 8563 {
8563 gfloat x=DW_LEFT, y=DW_CENTER; 8564 gfloat x=DW_LEFT, y=DW_CENTER;