summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-02-14 22:56:35 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2022-02-14 22:56:35 +0100
commite077bdbdd577ef2ca6cbdd3fb617195426797d1e (patch)
tree9eae62ea1e7f7119f5c20c509da60cf8d58a9a9f /src
parentFix second codeblock not wrapping (diff)
downloadnheko-e077bdbdd577ef2ca6cbdd3fb617195426797d1e.tar.xz
Allow window sizes smaller than 400x400
Diffstat (limited to 'src')
-rw-r--r--src/Config.h7
-rw-r--r--src/MainWindow.cpp4
-rw-r--r--src/dialogs/CreateRoom.cpp2
3 files changed, 5 insertions, 8 deletions
diff --git a/src/Config.h b/src/Config.h

index b093665c..1acb395a 100644 --- a/src/Config.h +++ b/src/Config.h
@@ -39,9 +39,6 @@ constexpr int labelSize = 15; } namespace modals { -constexpr int MIN_WIDGET_WIDTH = 400; -constexpr int MIN_WIDGET_HEIGHT = 400; - constexpr int WIDGET_MARGIN = 20; constexpr int WIDGET_SPACING = 15; constexpr int WIDGET_TOP_MARGiN = 2 * WIDGET_MARGIN; @@ -76,8 +73,8 @@ constexpr int height = 600; constexpr int width = 1066; constexpr int minModalWidth = 340; -constexpr int minHeight = height; -constexpr int minWidth = 950; +constexpr int minHeight = 340; +constexpr int minWidth = 340; } // namespace window namespace textInput { diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 01a05891..872e61f8 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp
@@ -70,8 +70,8 @@ MainWindow::MainWindow(QWindow *parent) MainWindow::setWindowTitle(0); setObjectName(QStringLiteral("MainWindow")); setResizeMode(QQuickView::SizeRootObjectToView); - setMinimumHeight(400); - setMinimumWidth(400); + setMinimumHeight(conf::window::minHeight); + setMinimumWidth(conf::window::minWidth); restoreWindowSize(); chat_page_ = new ChatPage(userSettings_, this); diff --git a/src/dialogs/CreateRoom.cpp b/src/dialogs/CreateRoom.cpp
index bd963229..038289e8 100644 --- a/src/dialogs/CreateRoom.cpp +++ b/src/dialogs/CreateRoom.cpp
@@ -28,7 +28,7 @@ CreateRoom::CreateRoom(QWidget *parent) largeFont.setPointSizeF(largeFont.pointSizeF() * 1.5); setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); - setMinimumHeight(conf::modals::MIN_WIDGET_HEIGHT); + setMinimumHeight(conf::window::minHeight); setMinimumWidth(conf::window::minModalWidth); auto layout = new QVBoxLayout(this);