From d2e7cfd9a2e24ada9d97deed62861869d4709bd3 Mon Sep 17 00:00:00 2001 From: Hibyehello Date: Sat, 21 May 2022 16:25:14 -0500 Subject: [PATCH] Make Editor resizable --- .gitignore | 1 + src/data/PlayerTypeInstance.cpp | 2 +- src/ui/TTKMainWindow.cpp | 3 --- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 09bba23..72e80f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ x64/ .vs/ +.vscode/ *.user .github/ build/ diff --git a/src/data/PlayerTypeInstance.cpp b/src/data/PlayerTypeInstance.cpp index 66cb1e2..ab8bdc6 100644 --- a/src/data/PlayerTypeInstance.cpp +++ b/src/data/PlayerTypeInstance.cpp @@ -34,7 +34,7 @@ void PlayerTypeInstance::setupUI(QWidget* parent) m_pTableView = new InputTableView(); - m_pTableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed); + m_pTableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); m_pTableView->horizontalHeader()->setMinimumSectionSize(0); // prevents minimum column size enforcement m_pTableView->setVisible(false); diff --git a/src/ui/TTKMainWindow.cpp b/src/ui/TTKMainWindow.cpp index 5d9ee5c..7de9bff 100644 --- a/src/ui/TTKMainWindow.cpp +++ b/src/ui/TTKMainWindow.cpp @@ -36,7 +36,6 @@ void TTKMainWindow::openFile(PlayerTypeInstance& typeInstance) { actionSwapFiles->setEnabled(true); actionScrollTogether->setEnabled(true); - setMaximumWidth(DOUBLE_FILE_WINDOW_WIDTH); setMinimumWidth(DOUBLE_FILE_WINDOW_WIDTH); } } @@ -72,7 +71,6 @@ void TTKMainWindow::swapModels() void TTKMainWindow::adjustUiOnClose() { setMinimumWidth(SINGLE_FILE_WINDOW_WIDTH); - setMaximumWidth(SINGLE_FILE_WINDOW_WIDTH); actionSwapFiles->setEnabled(false); @@ -146,7 +144,6 @@ void TTKMainWindow::setupUi() { // setup main window setMinimumWidth(SINGLE_FILE_WINDOW_WIDTH); - setMaximumWidth(SINGLE_FILE_WINDOW_WIDTH); resize(SINGLE_FILE_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT); addMenuItems();