3 #include "preferences/preferences.hpp"
4 #include "nlohmann/json.hpp"
8 class CanvasPreferencesEditor :
public Gtk::Box {
10 CanvasPreferencesEditor(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> &x,
class Preferences &prefs,
12 static CanvasPreferencesEditor *create(Preferences &prefs,
bool layered);
15 Preferences &preferences;
16 CanvasPreferences &canvas_preferences;
17 const bool is_layered;
19 Gtk::FlowBox *canvas_colors_fb =
nullptr;
20 Glib::RefPtr<Gtk::ColorChooser> color_chooser;
21 sigc::connection color_chooser_conn;
24 void handle_default();
25 void handle_load_preset(
unsigned int idx);
26 void load_colors(
const json &j);
27 void update_color_chooser();