changeset 128:611aa309f033

Check for DW_DARK_MODE environment variable to enable full dark mode. This perhaps should be a command line option, but this is easier for the moment.
author Brian Smith <brian@dbsoft.org>
date Sun, 13 Dec 2020 07:16:06 -0600
parents 8baca19f709d
children 82f1ebbb41c6
files src/handyftp.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/handyftp.c	Sun Nov 29 16:04:34 2020 -0600
+++ b/src/handyftp.c	Sun Dec 13 07:16:06 2020 -0600
@@ -2982,6 +2982,13 @@
 
 	dw_mle_set_editable(mle, FALSE);
 
+#ifdef __WIN32__
+	if(dw_feature_get(DW_FEATURE_DARK_MODE) >= DW_DARK_MODE_FULL)
+		dw_window_set_color(mle, DW_CLR_WHITE, DW_CLR_DARKGRAY);
+	else
+		dw_window_set_color(mle, DW_CLR_BLACK, DW_CLR_PALEGRAY);
+#endif
+
 	/* Buttons */
 	buttonbox = dw_box_new(BOXHORZ, 0);
 
@@ -6967,6 +6974,10 @@
 {
 	int cx, cy;
 
+	/* Enable full dark mode on platforms that support it */
+	if(getenv("DW_DARK_MODE"))
+		dw_feature_set(DW_FEATURE_DARK_MODE, DW_DARK_MODE_FULL);
+
 	/* Set the application ID so notifications will work */
 	dw_app_id_set("org.dbsoft.handyftp", "HandyFTP");