@@ -71,10 +71,24 @@ public class He.Application : Gtk.Application {
71
71
}
72
72
73
73
/**
74
- * A scheme variant to use for the application. If not set, the user's preferred scheme will be used .
75
- * This is especially useful for applications with their own color needs, such as media applications using the Content variant .
74
+ * Sets the scheme variant to use for the application as Content .
75
+ * This is especially useful for applications with their own color needs, such as media apps .
76
76
*/
77
- public SchemeVariant ? default_scheme_variant = null ;
77
+ private bool _is_content = false ;
78
+ public bool is_content {
79
+ get { return _is_content; }
80
+ set { _is_content = value ; update_style_manager (); }
81
+ }
82
+
83
+ /**
84
+ * Sets the scheme variant to use for the application as Monochrome.
85
+ * This is especially useful for applications with their own color needs, such as image apps.
86
+ */
87
+ private bool _is_mono = false ;
88
+ public bool is_mono {
89
+ get { return _is_mono; }
90
+ set { _is_mono = value ; update_style_manager (); }
91
+ }
78
92
79
93
private void update_style_manager () {
80
94
if (default_accent_color != null && override_accent_color) {
@@ -85,8 +99,10 @@ public class He.Application : Gtk.Application {
85
99
style_manager. accent_color = default_accent_color;
86
100
}
87
101
88
- if (default_scheme_variant != null ) {
89
- style_manager. scheme_variant = default_scheme_variant;
102
+ if (is_content) {
103
+ style_manager. scheme_variant = SchemeVariant . CONTENT ;
104
+ } else if (is_mono) {
105
+ style_manager. scheme_variant = SchemeVariant . MONOCHROME ;
90
106
} else {
91
107
style_manager. scheme_variant = desktop. ensor_scheme. to_variant ();
92
108
}
0 commit comments