From aa486a5c0ca9b5e886fedd3b12acf0e5238f2ce7 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sun, 7 Oct 2018 14:09:47 +0300 Subject: Adjustments for the minimized sidebar --- src/MainWindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/MainWindow.cpp') diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index b441978f..55dbba34 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -181,9 +181,10 @@ MainWindow::resizeEvent(QResizeEvent *event) void MainWindow::adjustSideBars() { - const uint64_t timelineWidth = chat_page_->timelineWidth(); - const uint64_t minAvailableWidth = - conf::sideBarCollapsePoint + ui::sidebar::CommunitiesSidebarSize; + const auto sz = utils::calculateSidebarSizes(QFont{}); + + const uint64_t timelineWidth = chat_page_->timelineWidth(); + const uint64_t minAvailableWidth = sz.collapsePoint + sz.groups; if (timelineWidth < minAvailableWidth && !chat_page_->isSideBarExpanded()) { chat_page_->hideSideBars(); -- cgit 1.5.1