refactor(bar): Remove bar_settings.center

Not used anywhere
This commit is contained in:
patrick96 2019-01-11 16:05:48 +01:00 committed by Patrick Ziegler
parent f148f16da7
commit b3ceedde76
2 changed files with 0 additions and 14 deletions

View File

@ -131,7 +131,6 @@ struct bar_settings {
};
position pos{0, 0};
position offset{0, 0};
position center{0, 0};
side_values padding{0U, 0U};
side_values margin{0U, 0U};
side_values module_margin{0U, 0U};

View File

@ -278,19 +278,6 @@ bar::bar(connection& conn, signal_emitter& emitter, const config& config, const
throw application_error("Resulting bar height is out of bounds (" + to_string(m_opts.size.h) + ")");
}
// m_opts.size.w = math_util::cap<int>(m_opts.size.w, 0, m_opts.monitor->w);
// m_opts.size.h = math_util::cap<int>(m_opts.size.h, 0, m_opts.monitor->h);
m_opts.center.y = m_opts.size.h;
m_opts.center.y -= m_opts.borders[edge::BOTTOM].size;
m_opts.center.y /= 2;
m_opts.center.y += m_opts.borders[edge::TOP].size;
m_opts.center.x = m_opts.size.w;
m_opts.center.x -= m_opts.borders[edge::RIGHT].size;
m_opts.center.x /= 2;
m_opts.center.x += m_opts.borders[edge::LEFT].size;
m_log.info("Bar geometry: %ix%i+%i+%i; Borders: %d,%d,%d,%d", m_opts.size.w,
m_opts.size.h, m_opts.pos.x, m_opts.pos.y,
m_opts.borders[edge::TOP].size, m_opts.borders[edge::RIGHT].size,