Skip to content

Commit

Permalink
Still trying out something
Browse files Browse the repository at this point in the history
  • Loading branch information
lainsce committed Aug 19, 2024
1 parent 7e30ede commit ed2987b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 1 addition & 0 deletions fuses/appearance/AppearanceView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ public class AppearanceView : Gtk.Box {
ensor_flowbox.child_activated.connect ((c) => {
var ensor = ((EnsorModeButton)c.get_first_child ()).mode;
tau_appearance_settings.set_string ("ensor-scheme", ensor);
tau_appearance_settings.set_string ("accent-color", He.hexcode_argb (argb_ints[i]));
});

color_carousel.append (ensor_flowbox);
Expand Down
8 changes: 0 additions & 8 deletions fuses/appearance/Utils/EnsorModeButton.vala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ public class EnsorModeButton : Gtk.Box {
public Gee.ArrayList<int> colors;
ColorGenerator generator;

private static GLib.Settings tau_appearance_settings;

private string _mode;
public string mode {
get { return _mode; }
Expand All @@ -16,19 +14,13 @@ public class EnsorModeButton : Gtk.Box {
}
}

static construct {
tau_appearance_settings = new GLib.Settings ("com.fyralabs.desktop.appearance");
}

public EnsorModeButton(int color, string initial_mode) {
this.mode = initial_mode;
generator = new ColorGenerator ({color});
set_colors(generator.get_generated_colors(get_scheme_variant(mode)));

overflow = HIDDEN;
add_css_class ("circle-radius");

tau_appearance_settings.set_string ("accent-color", He.hexcode_argb (color));
}

private void update_colors() {
Expand Down
4 changes: 2 additions & 2 deletions fuses/locale/LocaleView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class Locale.LocaleView : Gtk.Box {
});
});

var language_block = new He.MiniContentBlock.with_details (_("Language"), null, language_button) {
var language_block = new He.MiniContentBlock.with_details (_("Language"), null, language_button, null) {
hexpand = true,
};
print ("%s", this.current_user_locale.language ? .name ?? system_locale.language.name);
Expand Down Expand Up @@ -92,7 +92,7 @@ public class Locale.LocaleView : Gtk.Box {
}
});
});
var format_block = new He.MiniContentBlock.with_details (_("Format"), null, format_button) {
var format_block = new He.MiniContentBlock.with_details (_("Format"), null, format_button, null) {
hexpand = true,
};
format_block.subtitle = this.current_user_locale.format ? .name ??
Expand Down

0 comments on commit ed2987b

Please sign in to comment.