Просмотр исходного кода

app: overlay for scifi theme have consistent styling everywhere.

darkfi 1 день назад
Родитель
Сommit
88d43cdef4
2 измененных файлов с 16 добавлено и 0 удалено
  1. 8 0
      bin/app/src/app/schema/menu/channel.rs
  2. 8 0
      bin/app/src/app/schema/menu/contact.rs

+ 8 - 0
bin/app/src/app/schema/menu/channel.rs

@@ -744,6 +744,10 @@ pub async fn make(
     node.set_property_u32(atom, Role::App, "priority", 2).unwrap();
     //node.set_property_bool(atom, Role::App, "debug", true).unwrap();
 
+    let theme = app.sg_root.lookup_node("/theme").unwrap();
+    wire_color(&node, "action_fg_color", &theme, "edit.action_fg_color").unwrap();
+    wire_color(&node, "action_bg_color", &theme, "edit.action_bg_color").unwrap();
+
     node.set_property_str(atom, Role::App, "placeholder_text", "#NAME").unwrap();
     let prop = node.get_property("placeholder_color").unwrap();
     prop.set_default_f32_multi(&[
@@ -856,6 +860,10 @@ pub async fn make(
     node.set_property_u32(atom, Role::App, "priority", 3).unwrap();
     //node.set_property_bool(atom, Role::App, "debug", true).unwrap();
 
+    let theme = app.sg_root.lookup_node("/theme").unwrap();
+    wire_color(&node, "action_fg_color", &theme, "edit.action_fg_color").unwrap();
+    wire_color(&node, "action_bg_color", &theme, "edit.action_bg_color").unwrap();
+
     node.set_property_str(atom, Role::App, "placeholder_text", "KEY (OPTIONAL)").unwrap();
     let prop = node.get_property("placeholder_color").unwrap();
     prop.set_default_f32_multi(&[

+ 8 - 0
bin/app/src/app/schema/menu/contact.rs

@@ -943,6 +943,10 @@ pub async fn make(
     node.set_property_u32(atom, Role::App, "priority", 2).unwrap();
     //node.set_property_bool(atom, Role::App, "debug", true).unwrap();
 
+    let theme = app.sg_root.lookup_node("/theme").unwrap();
+    wire_color(&node, "action_fg_color", &theme, "edit.action_fg_color").unwrap();
+    wire_color(&node, "action_bg_color", &theme, "edit.action_bg_color").unwrap();
+
     node.set_property_str(atom, Role::App, "placeholder_text", "NAME").unwrap();
     let prop = node.get_property("placeholder_color").unwrap();
     prop.set_default_f32_multi(&[
@@ -1056,6 +1060,10 @@ pub async fn make(
     node.set_property_u32(atom, Role::App, "priority", 3).unwrap();
     //node.set_property_bool(atom, Role::App, "debug", true).unwrap();
 
+    let theme = app.sg_root.lookup_node("/theme").unwrap();
+    wire_color(&node, "action_fg_color", &theme, "edit.action_fg_color").unwrap();
+    wire_color(&node, "action_bg_color", &theme, "edit.action_bg_color").unwrap();
+
     node.set_property_str(atom, Role::App, "placeholder_text", "KEY").unwrap();
     let prop = node.get_property("placeholder_color").unwrap();
     prop.set_default_f32_multi(&[