Brush tool option layout has better flow now

This commit is contained in:
David Vierra 2016-02-08 17:15:51 -10:00
parent 114e3341ad
commit 0d3ebf10a8
2 changed files with 19 additions and 5 deletions

View File

@ -88,9 +88,7 @@ class Fill(BrushMode):
self.blockTypeButton.block = brushTool.editorSession.worldEditor.blocktypes['minecraft:stone']
self.blockTypeButton.blocksChanged.connect(brushTool.updateCursor)
self.optionsWidget.setLayout(Column(
Row(label, self.blockTypeButton, margin=0),
None, margin=0))
self.optionsWidget.setLayout(Row(label, self.blockTypeButton, margin=0))
def getOptions(self):
return {'blockInfo': self.blockTypeButton.block}
@ -138,7 +136,7 @@ class Biome(BrushMode):
self.biomeTypeBox.addItem(biome.name, biome.ID)
self.biomeTypeBox.activated.connect(brushTool.updateCursor)
self.optionsWidget.setLayout(Column(Row(label, self.biomeTypeBox, margin=0), None, margin=0))
self.optionsWidget.setLayout(Row(label, self.biomeTypeBox, margin=0))
def getOptions(self):
return {'biomeID': self.biomeTypeBox.itemData(self.biomeTypeBox.currentIndex())}

View File

@ -13,7 +13,7 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1">
<item>
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,0,0">
<item row="6" column="1" colspan="2">
@ -135,6 +135,22 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<customwidgets>