From 20b87cf5f286a098d4fe191950394b3ede679490 Mon Sep 17 00:00:00 2001 From: Goombert Date: Sat, 22 Aug 2020 18:50:25 -0400 Subject: [PATCH 1/5] Tileset group box should be Fixed vertical size policy. --- Editors/BackgroundEditor.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Editors/BackgroundEditor.ui b/Editors/BackgroundEditor.ui index 92521698e..83b7228f7 100644 --- a/Editors/BackgroundEditor.ui +++ b/Editors/BackgroundEditor.ui @@ -125,7 +125,7 @@ - + 0 0 From cd79a8fb020d9c212853a282372b2ebfc89770d7 Mon Sep 17 00:00:00 2001 From: Goombert Date: Sat, 22 Aug 2020 19:46:31 -0400 Subject: [PATCH 2/5] Push properties to top of vertical layout with a bottom spacer. --- Editors/BackgroundEditor.ui | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Editors/BackgroundEditor.ui b/Editors/BackgroundEditor.ui index 83b7228f7..02ee279a9 100644 --- a/Editors/BackgroundEditor.ui +++ b/Editors/BackgroundEditor.ui @@ -352,6 +352,16 @@ + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + From a077e593e86697afd6f28a0ea1dfe64feaa7b732 Mon Sep 17 00:00:00 2001 From: Goombert Date: Sun, 23 Aug 2020 16:43:02 -0400 Subject: [PATCH 3/5] Change properties layout to form layout for 2 columns/no spacer. --- Editors/BackgroundEditor.ui | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/Editors/BackgroundEditor.ui b/Editors/BackgroundEditor.ui index 02ee279a9..350a17316 100644 --- a/Editors/BackgroundEditor.ui +++ b/Editors/BackgroundEditor.ui @@ -89,13 +89,16 @@ 0 - - - 4 - + QLayout::SetDefaultConstraint + + 4 + + + 4 + 4 @@ -108,21 +111,21 @@ 4 - + &Smooth edges - + Pre&load texture - + @@ -352,16 +355,6 @@ - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - From d91ca5f4752824f6cf99caaab6b68619e1288b90 Mon Sep 17 00:00:00 2001 From: Goombert Date: Sun, 23 Aug 2020 16:47:54 -0400 Subject: [PATCH 4/5] Add name label and line edit. --- Editors/BackgroundEditor.ui | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Editors/BackgroundEditor.ui b/Editors/BackgroundEditor.ui index 350a17316..9c6069da9 100644 --- a/Editors/BackgroundEditor.ui +++ b/Editors/BackgroundEditor.ui @@ -111,21 +111,21 @@ 4 - + &Smooth edges - + Pre&load texture - + @@ -355,6 +355,19 @@ + + + + &Name + + + nameEdit + + + + + + From ea8820867b833c9076009e65c81476fb83ece47b Mon Sep 17 00:00:00 2001 From: Goombert Date: Sun, 23 Aug 2020 16:49:14 -0400 Subject: [PATCH 5/5] Map name edit to the model. --- Editors/BackgroundEditor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Editors/BackgroundEditor.cpp b/Editors/BackgroundEditor.cpp index 927fdfb98..6ccd52180 100644 --- a/Editors/BackgroundEditor.cpp +++ b/Editors/BackgroundEditor.cpp @@ -21,6 +21,7 @@ BackgroundEditor::BackgroundEditor(MessageModel* model, QWidget* parent) connect(_ui->actionSave, &QAction::triggered, this, &BaseEditor::OnSave); + _nodeMapper->addMapping(_ui->nameEdit, TreeNode::kNameFieldNumber); _resMapper->addMapping(_ui->smoothCheckBox, Background::kSmoothEdgesFieldNumber); _resMapper->addMapping(_ui->preloadCheckBox, Background::kPreloadFieldNumber); _resMapper->addMapping(_ui->tilesetGroupBox, Background::kUseAsTilesetFieldNumber);