diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-19 11:18:37 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-19 11:18:44 -0400 |
commit | 01df705f701a115c017ca23ee21ff64d8d49bfe2 (patch) | |
tree | c4adbb49cc283f0852c156b01f1e63d6c24a7060 /gtk2_ardour/ui_config.cc | |
parent | 280fc81e05f885c1259ec6513297507b9e6c87b2 (diff) |
change the way font specifications are used in UI config files
If no font family is specified, enforce use of Sans to match GTK behaviour (which we inadvertently relied on, it appears)
Diffstat (limited to 'gtk2_ardour/ui_config.cc')
-rw-r--r-- | gtk2_ardour/ui_config.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc index 342adb294f..3666a280c9 100644 --- a/gtk2_ardour/ui_config.cc +++ b/gtk2_ardour/ui_config.cc @@ -47,11 +47,13 @@ UIConfiguration::UIConfiguration () #define UI_CONFIG_VARIABLE(Type,var,name,val) var (name,val), #define CANVAS_VARIABLE(var,name) var (name), #define CANVAS_STRING_VARIABLE(var,name) var (name), +#define CANVAS_FONT_VARIABLE(var,name) var (name), #include "ui_config_vars.h" #include "canvas_vars.h" #undef UI_CONFIG_VARIABLE #undef CANVAS_VARIABLE #undef CANVAS_STRING_VARIABLE +#undef CANVAS_FONT_VARIABLE _dirty (false) { load_state(); @@ -218,11 +220,13 @@ UIConfiguration::get_variables (std::string which_node) #define UI_CONFIG_VARIABLE(Type,var,Name,value) if (node->name() == "UI") { var.add_to_node (*node); } #define CANVAS_VARIABLE(var,Name) if (node->name() == "Canvas") { var.add_to_node (*node); } #define CANVAS_STRING_VARIABLE(var,Name) if (node->name() == "Canvas") { var.add_to_node (*node); } +#define CANVAS_FONT_VARIABLE(var,Name) if (node->name() == "Canvas") { var.add_to_node (*node); } #include "ui_config_vars.h" #include "canvas_vars.h" #undef UI_CONFIG_VARIABLE #undef CANVAS_VARIABLE #undef CANVAS_STRING_VARIABLE +#undef CANVAS_FONT_VARIABLE return *node; } @@ -270,11 +274,16 @@ UIConfiguration::set_variables (const XMLNode& node) if (var.set_from_node (node)) { \ ParameterChanged (name); \ } +#define CANVAS_FONT_VARIABLE(var,name) \ + if (var.set_from_node (node)) { \ + ParameterChanged (name); \ + } #include "ui_config_vars.h" #include "canvas_vars.h" #undef UI_CONFIG_VARIABLE #undef CANVAS_VARIABLE #undef CANVAS_STRING_VARIABLE +#undef CANVAS_FONT_VARIABLE } void @@ -283,9 +292,11 @@ UIConfiguration::pack_canvasvars () #undef CANVAS_VARIABLE #define CANVAS_VARIABLE(var,name) canvas_colors.insert (std::pair<std::string,ColorVariable<uint32_t>* >(name,&var)); #define CANVAS_STRING_VARIABLE(var,name) +#define CANVAS_FONT_VARIABLE(var,name) #include "canvas_vars.h" #undef CANVAS_VARIABLE #undef CANVAS_STRING_VARIABLE +#undef CANVAS_FONT_VARIABLE } uint32_t |