diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f9204c9..b6ddd91b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -150,7 +150,6 @@ include_directories(include/events/messages)
qt5_wrap_ui (UI_HEADERS
forms/ChatPage.ui
- forms/MainWindow.ui
forms/RoomList.ui
)
diff --git a/forms/MainWindow.ui b/forms/MainWindow.ui
deleted file mode 100644
index 5549bad0..00000000
--- a/forms/MainWindow.ui
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
- MainWindow
-
-
-
- 0
- 0
- 1066
- 600
-
-
-
-
- 0
- 0
-
-
-
-
- 950
- 600
-
-
-
-
- Open Sans
- PreferAntialias
-
-
-
- nheko
-
-
- background-color: #f9f9f9
-
-
-
-
-
-
-
diff --git a/include/MainWindow.h b/include/MainWindow.h
index f1582f85..182b959a 100644
--- a/include/MainWindow.h
+++ b/include/MainWindow.h
@@ -30,11 +30,6 @@
#include "SlidingStackWidget.h"
#include "WelcomePage.h"
-namespace Ui
-{
-class MainWindow;
-}
-
class MainWindow : public QMainWindow
{
Q_OBJECT
@@ -59,9 +54,6 @@ private slots:
void removeOverlayProgressBar();
private:
- // The UI component of the main window.
- Ui::MainWindow *ui_;
-
// The initial welcome screen.
WelcomePage *welcome_page_;
diff --git a/src/MainWindow.cc b/src/MainWindow.cc
index bc64198c..9a3a44ef 100644
--- a/src/MainWindow.cc
+++ b/src/MainWindow.cc
@@ -16,7 +16,6 @@
*/
#include "MainWindow.h"
-#include "ui_MainWindow.h"
#include
#include
@@ -24,15 +23,24 @@
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
- , ui_(new Ui::MainWindow)
, progress_modal_{nullptr}
, spinner_{nullptr}
{
- ui_->setupUi(this);
+ QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ setSizePolicy(sizePolicy);
+ setWindowTitle("nheko");
+
+ resize(1066, 600); // 16:9 ratio
+ setMinimumSize(QSize(950, 600));
+ setStyleSheet("background-color: #f9f9f9");
+
+ QFont font("Open Sans", 12);
+ font.setStyleStrategy(QFont::PreferAntialias);
+ setFont(font);
+
client_ = QSharedPointer(new MatrixClient("matrix.org"));
welcome_page_ = new WelcomePage(this);
-
login_page_ = new LoginPage(client_, this);
register_page_ = new RegisterPage(client_, this);
chat_page_ = new ChatPage(client_, this);
@@ -153,5 +161,4 @@ void MainWindow::showRegisterPage()
MainWindow::~MainWindow()
{
- delete ui_;
}