-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
100 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
private class AccentColorButton : Gtk.CheckButton { | ||
public string color { get; construct; } | ||
|
||
private static GLib.Settings tau_appearance_settings; | ||
static construct { | ||
tau_appearance_settings = new GLib.Settings ("com.fyralabs.desktop.appearance"); | ||
} | ||
|
||
public AccentColorButton (string color, Gtk.CheckButton? group_member = null) { | ||
Object ( | ||
color : color, | ||
group: group_member | ||
); | ||
|
||
add_css_class (color.to_string ()); | ||
add_css_class ("accent-mode"); | ||
} | ||
|
||
construct { | ||
active = color == tau_appearance_settings.get_string ("accent-color"); | ||
toggled.connect (() => { | ||
if (color == "purple") { | ||
tau_appearance_settings.set_string ("accent-color", "purple"); | ||
} else if (color == "pink") { | ||
tau_appearance_settings.set_string ("accent-color", "pink"); | ||
} else if (color == "red") { | ||
tau_appearance_settings.set_string ("accent-color", "red"); | ||
} else if (color == "yellow") { | ||
tau_appearance_settings.set_string ("accent-color", "yellow"); | ||
} else if (color == "green") { | ||
tau_appearance_settings.set_string ("accent-color", "green"); | ||
} else if (color == "blue") { | ||
tau_appearance_settings.set_string ("accent-color", "blue"); | ||
} else if (color == "multi") { | ||
tau_appearance_settings.set_string ("accent-color", "multi"); | ||
} | ||
}); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters