summary refs log tree commit diff
path: root/src/MainWindow.cpp
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-10-07 14:09:47 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-10-07 14:09:47 +0300
commitaa486a5c0ca9b5e886fedd3b12acf0e5238f2ce7 (patch)
tree45cb4e1dd0727f188298e17dd4c7c7cb3fc16dfa /src/MainWindow.cpp
parentRemove the bundled open sans font (diff)
downloadnheko-aa486a5c0ca9b5e886fedd3b12acf0e5238f2ce7.tar.xz
Adjustments for the minimized sidebar
Diffstat (limited to '')
-rw-r--r--src/MainWindow.cpp7
1 files changed, 4 insertions, 3 deletions
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();