Mercurial > dwindows
changeset 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 |
files | gtk4/dw.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk4/dw.c Tue Feb 16 06:39:37 2021 +0000 +++ b/gtk4/dw.c Tue Feb 16 07:17:09 2021 +0000 @@ -8551,11 +8551,12 @@ { if(mask & DW_BS_NOBORDER) { - /* TODO: Figure out how to do this in GTK4 with no Shadow or Relief */ + GtkStyleContext *context = gtk_widget_get_style_context(GTK_WIDGET(handle)); + if(style & DW_BS_NOBORDER) - ; + gtk_style_context_add_class(context, "flat"); else - ; + gtk_style_context_remove_class(context, "flat"); } } if(GTK_IS_LABEL(handle2))