parent
eae612ce95
commit
02ab1b9a81
@ -137,23 +137,15 @@ bar::bar(connection& conn, signal_emitter& emitter, const config& config, const
|
||||
m_opts.locale = m_conf.get(bs, "locale", ""s);
|
||||
m_opts.radius = m_conf.get(bs, "radius", m_opts.radius);
|
||||
|
||||
try {
|
||||
auto padding = m_conf.get<decltype(m_opts.padding.left)>(bs, "padding");
|
||||
m_opts.padding.left = padding;
|
||||
m_opts.padding.right = padding;
|
||||
} catch (const key_error& err) {
|
||||
m_opts.padding.left = m_conf.get(bs, "padding-left", m_opts.padding.left);
|
||||
m_opts.padding.right = m_conf.get(bs, "padding-right", m_opts.padding.right);
|
||||
}
|
||||
auto padding = m_conf.get<unsigned int>(bs, "padding", 0U);
|
||||
m_opts.padding.left = padding;
|
||||
m_opts.padding.right = padding;
|
||||
m_opts.padding.left = m_conf.get(bs, "padding-left", padding);
|
||||
m_opts.padding.right = m_conf.get(bs, "padding-right", padding);
|
||||
|
||||
try {
|
||||
auto margin = m_conf.get<decltype(m_opts.padding.left)>(bs, "module-margin");
|
||||
m_opts.module_margin.left = margin;
|
||||
m_opts.module_margin.right = margin;
|
||||
} catch (const key_error& err) {
|
||||
m_opts.module_margin.left = m_conf.get(bs, "module-margin-left", m_opts.module_margin.left);
|
||||
m_opts.module_margin.right = m_conf.get(bs, "module-margin-right", m_opts.module_margin.right);
|
||||
}
|
||||
auto margin = m_conf.get<unsigned int>(bs, "module-margin", 0U);
|
||||
m_opts.module_margin.left = m_conf.get(bs, "module-margin-left", margin);
|
||||
m_opts.module_margin.right = m_conf.get(bs, "module-margin-right", margin);
|
||||
|
||||
if (only_initialize_values) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user