diff dwtest.c @ 2248:4fb54b9fcf78

GTK3: Switch to using CSS syntax for specifying fonts from Pango. Apparently the theme warnings produced on GTK3 were from using Pango syntax for specifying fonts, instead of CSS syntax. Can't find any information about when CSS syntax was introduced... So hopefully it works through the entire GTK3 series. Also fix some GCC warnings in the new dwtest code.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 24 Jan 2021 19:27:16 +0000
parents 703023e1a644
children 5dbe950115c1
line wrap: on
line diff
--- a/dwtest.c	Sat Jan 23 00:48:12 2021 +0000
+++ b/dwtest.c	Sun Jan 24 19:27:16 2021 +0000
@@ -1333,7 +1333,6 @@
 int mle_fontsize_cb(HWND hwnd, int size, void *data)
 {
     HWND hbox = (HWND)data;
-    HWND fontsize = (HWND)dw_window_get_data(hbox, "fontsize");
     HWND fontname = (HWND)dw_window_get_data(hbox, "fontname");
     char *font = dw_window_get_text(fontname);
 
@@ -1389,8 +1388,8 @@
         dw_window_set_style(text, DW_DT_VCENTER, DW_DT_VCENTER);
         dw_box_pack_start(hbox, text, -1, -1, FALSE, TRUE, 1);
         fontsize = dw_spinbutton_new("9", 0);
-        dw_spinbutton_set_limits(fontsize, 5, 100);
-        dw_box_pack_start(hbox, fontname, 50, -1, TRUE, FALSE, 1);
+        dw_box_pack_start(hbox, fontsize, 50, -1, TRUE, FALSE, 1);
+        dw_spinbutton_set_limits(fontsize, 100, 5);
         fontname = dw_combobox_new("Default", 0);
         dw_listbox_append(fontname, "Default");
         dw_listbox_append(fontname, "Helv");