Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background Editor Layout Improvements #156

Merged
merged 5 commits into from
Aug 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Editors/BackgroundEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
32 changes: 24 additions & 8 deletions Editors/BackgroundEditor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,16 @@
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="propertiesLayout">
<property name="spacing">
<number>4</number>
</property>
<layout class="QFormLayout" name="propertiesLayout">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<property name="horizontalSpacing">
<number>4</number>
</property>
<property name="verticalSpacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>4</number>
</property>
Expand All @@ -108,24 +111,24 @@
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<item row="1" column="0" colspan="2">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shit's worse than SVG, honestly.

<widget class="QCheckBox" name="smoothCheckBox">
<property name="text">
<string>&amp;Smooth edges</string>
</property>
</widget>
</item>
<item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="preloadCheckBox">
<property name="text">
<string>Pre&amp;load texture</string>
</property>
</widget>
</item>
<item>
<item row="3" column="0" colspan="2">
<widget class="QGroupBox" name="tilesetGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
Expand Down Expand Up @@ -352,6 +355,19 @@
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="nameLabel">
<property name="text">
<string>&amp;Name</string>
</property>
<property name="buddy">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "buddy"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The buddy is where if you press the mnemonic key of the label the buddy is focused. That's why the N is underlined in GameMaker.

GM Label Buddy

<cstring>nameEdit</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="nameEdit"/>
</item>
</layout>
</item>
<item>
Expand Down