From b3ceedde767d719a2881e0c6bb3dd98cf21617b5 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Fri, 11 Jan 2019 16:05:48 +0100 Subject: [PATCH] refactor(bar): Remove bar_settings.center Not used anywhere --- include/components/types.hpp | 1 - src/components/bar.cpp | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/include/components/types.hpp b/include/components/types.hpp index dba383af..b9810cc0 100644 --- a/include/components/types.hpp +++ b/include/components/types.hpp @@ -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}; diff --git a/src/components/bar.cpp b/src/components/bar.cpp index 42c5e559..1ba76b5f 100644 --- a/src/components/bar.cpp +++ b/src/components/bar.cpp @@ -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(m_opts.size.w, 0, m_opts.monitor->w); - // m_opts.size.h = math_util::cap(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,