From ffb8d386216e6fbb58e5a51028da031cf5f44512 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 17 Oct 2023 22:55:14 -0400 Subject: fix gap in connections if image not found --- src/windows/profile/userinfopane.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/windows/profile/userinfopane.cpp b/src/windows/profile/userinfopane.cpp index b6f0d59..8c1605a 100644 --- a/src/windows/profile/userinfopane.cpp +++ b/src/windows/profile/userinfopane.cpp @@ -96,12 +96,13 @@ void ConnectionsContainer::SetConnections(const std::vector &con "facebook" }; - for (size_t i = 0; i < connections.size(); i++) { - const auto &conn = connections[i]; + int i = 0; + for (const auto &conn : connections) { if (supported_services.find(conn.Type) == supported_services.end()) continue; auto widget = Gtk::manage(new ConnectionItem(conn)); widget->show(); - attach(*widget, static_cast(i % 2), static_cast(i / 2), 1, 1); + attach(*widget, i % 2, i / 2, 1, 1); + i++; } set_halign(Gtk::ALIGN_FILL); -- cgit v1.2.3