From 86d0200441056184d75222b6486cf176692eb6f0 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 12 Jan 2024 22:11:07 -0500 Subject: [PATCH] Add scrolling to border metatiles, splitter for Metatiles tab --- CHANGELOG.md | 1 + forms/mainwindow.ui | 788 +++++++++++++++++++++++--------------------- src/mainwindow.cpp | 2 +- 3 files changed, 408 insertions(+), 383 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68fd5e9e..e1680a63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d - Fix slow speed for the script label autcomplete. - Fix deleted script labels still appearing in the autocomplete after project reload. - Fix the map search bar stealing focus on startup. +- Fix border metatiles view not resizing properly. - Fix Open Recent Project not clearing the API overlay - Fix API error reporting. diff --git a/forms/mainwindow.ui b/forms/mainwindow.ui index 34ee86c6..ef056829 100644 --- a/forms/mainwindow.ui +++ b/forms/mainwindow.ui @@ -673,6 +673,412 @@ 3 + + + + 10 + + + 90 + + + 30 + + + Qt::Horizontal + + + + + + + QFrame::NoFrame + + + QFrame::Plain + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + Qt::Vertical + + + + + 0 + 1 + + + + Border + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + QFrame::NoFrame + + + QFrame::Plain + + + true + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + <html><head/><body><p>The border is a 2x2 metatile which is repeated outside of the map layout's boundary. Draw on this border area to modify it.</p></body></html> + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + 0 + 1 + + + + Selection + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + QFrame::NoFrame + + + QFrame::Plain + + + true + + + + + 0 + 0 + 423 + 199 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + 0 + 4 + + + + Qt::ScrollBarAlwaysOn + + + Qt::ScrollBarAsNeeded + + + QAbstractScrollArea::AdjustIgnored + + + true + + + Qt::AlignHCenter|Qt::AlignTop + + + + true + + + + 8 + 0 + 411 + 239 + + + + + 0 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + true + + + + 0 + 0 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractScrollArea::AdjustIgnored + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + @@ -731,388 +1137,6 @@ - - - - - 0 - 0 - - - - - 0 - 92 - - - - - 16777215 - 92 - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - QLayout::SetDefaultConstraint - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Selection - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - QFrame::Plain - - - true - - - - - 0 - 0 - 423 - 74 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - - - - Border - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 16777215 - 48 - - - - <html><head/><body><p>The border is a 2x2 metatile which is repeated outside of the map layout's boundary. Draw on this border area to modify it.</p></body></html> - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::ScrollBarAsNeeded - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - 0 - 0 - - - - Qt::ScrollBarAlwaysOn - - - Qt::ScrollBarAsNeeded - - - QAbstractScrollArea::AdjustIgnored - - - true - - - Qt::AlignHCenter|Qt::AlignTop - - - - true - - - - 8 - 0 - 411 - 413 - - - - - 0 - 0 - - - - - QLayout::SetDefaultConstraint - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - true - - - - 0 - 0 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QAbstractScrollArea::AdjustIgnored - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - 10 - - - 90 - - - 30 - - - Qt::Horizontal - - - diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1d739ce0..da1c14f1 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1389,7 +1389,7 @@ void MainWindow::redrawMetatileSelection() MetatileSelection selection = editor->metatile_selector_item->getMetatileSelection(); QPoint pos = editor->metatile_selector_item->getMetatileIdCoordsOnWidget(selection.metatileItems.first().metatileId); pos *= scale; - ui->scrollArea_2->ensureVisible(pos.x(), pos.y(), 8 * scale, 8 * scale); + ui->scrollArea_MetatileSelector->ensureVisible(pos.x(), pos.y(), 8 * scale, 8 * scale); } }