summary refs log tree commit diff
path: root/src/MainWindow.cpp
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-06-13 01:44:25 +0000
committerGitHub <noreply@github.com>2021-06-13 01:44:25 +0000
commit5b4566d3f959e13b34d34a4156a0646b26c7fd08 (patch)
tree11d1b42e1d9f92977c48670605bb8a2e26ddd43c /src/MainWindow.cpp
parentTranslated using Weblate (Esperanto) (diff)
parentFix button spacing (diff)
downloadnheko-5b4566d3f959e13b34d34a4156a0646b26c7fd08.tar.xz
Merge pull request #605 from Nheko-Reborn/qml-roomlist
Qml roomlist and stuff
Diffstat (limited to 'src/MainWindow.cpp')
-rw-r--r--src/MainWindow.cpp36
1 files changed, 1 insertions, 35 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp

index 92f43e03..ed337ca4 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp
@@ -22,7 +22,6 @@ #include "MainWindow.h" #include "MatrixClient.h" #include "RegisterPage.h" -#include "Splitter.h" #include "TrayIcon.h" #include "UserSettingsPage.h" #include "Utils.h" @@ -109,10 +108,6 @@ MainWindow::MainWindow(QWidget *parent) userSettingsPage_, SIGNAL(trayOptionChanged(bool)), trayIcon_, SLOT(setVisible(bool))); connect( userSettingsPage_, &UserSettingsPage::themeChanged, chat_page_, &ChatPage::themeChanged); - connect(userSettingsPage_, - &UserSettingsPage::decryptSidebarChanged, - chat_page_, - &ChatPage::decryptSidebarChanged); connect(trayIcon_, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, @@ -176,20 +171,6 @@ MainWindow::setWindowTitle(int notificationCount) QMainWindow::setWindowTitle(name); } -void -MainWindow::showEvent(QShowEvent *event) -{ - adjustSideBars(); - QMainWindow::showEvent(event); -} - -void -MainWindow::resizeEvent(QResizeEvent *event) -{ - adjustSideBars(); - QMainWindow::resizeEvent(event); -} - bool MainWindow::event(QEvent *event) { @@ -204,22 +185,6 @@ MainWindow::event(QEvent *event) } void -MainWindow::adjustSideBars() -{ - const auto sz = splitter::calculateSidebarSizes(QFont{}); - - const uint64_t timelineWidth = chat_page_->timelineWidth(); - const uint64_t minAvailableWidth = sz.collapsePoint + sz.groups; - - nhlog::ui()->info("timelineWidth: {}, min {}", timelineWidth, minAvailableWidth); - if (timelineWidth < minAvailableWidth) { - chat_page_->hideSideBars(); - } else { - chat_page_->showSideBars(); - } -} - -void MainWindow::restoreWindowSize() { QSettings settings; @@ -295,6 +260,7 @@ MainWindow::showChatPage() &Cache::secretChanged, userSettingsPage_, &UserSettingsPage::updateSecretStatus); + emit reload(); } void