Fix some window and scrollbox sizes

This commit is contained in:
GriffinR 2023-09-12 13:25:16 -04:00
parent 26620cd1d4
commit 0c47866e3d
5 changed files with 119 additions and 110 deletions

View file

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>480</height>
<width>522</width>
<height>493</height>
</rect>
</property>
<property name="windowTitle">
@ -23,49 +23,20 @@
<property name="title">
<string>Miscellaneous</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="3">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="checkBox_OpenRecentProject">
<property name="text">
<string>Open recent project on launch</string>
</property>
</widget>
</item>
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="checkBox_MonitorProjectFiles">
<property name="text">
<string>Monitor project files</string>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item>
<widget class="QCheckBox" name="checkBox_OpenRecentProject">
<property name="text">
<string>Open recent project on launch</string>
</property>
<property name="sizeType">
<enum>QSizePolicy::Maximum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</widget>
</item>
</layout>
</widget>
@ -117,8 +88,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>570</width>
<height>322</height>
<width>492</width>
<height>327</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">

View file

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>611</width>
<height>1137</height>
<width>600</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
@ -29,7 +29,7 @@
<x>0</x>
<y>0</y>
<width>585</width>
<height>1486</height>
<height>585</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">

View file

@ -169,7 +169,7 @@
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
<enum>QLayout::SetMinimumSize</enum>
</property>
<property name="leftMargin">
<number>0</number>
@ -186,8 +186,8 @@
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
@ -201,7 +201,44 @@
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="13" column="3">
<item row="0" column="0">
<widget class="QLabel" name="label_BottomTop">
<property name="text">
<string>Bottom/Top</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="3">
<widget class="NoScrollComboBox" name="comboBox_metatileBehaviors"/>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_encounterType">
<property name="text">
<string>Encounter Type</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_terrainType">
<property name="text">
<string>Terrain Type</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="NoScrollComboBox" name="comboBox_terrainType"/>
</item>
<item row="12" column="0" colspan="2">
<widget class="QLabel" name="label_metatileLabel">
<property name="text">
<string>Metatile Label (Optional)</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="NoScrollComboBox" name="comboBox_layerType"/>
</item>
<item row="13" column="2">
<widget class="QToolButton" name="copyButton_metatileLabel">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Copies the full metatile label to the clipboard.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -215,46 +252,29 @@
</property>
</widget>
</item>
<item row="13" column="0" colspan="3">
<item row="13" column="0" colspan="2">
<widget class="QLineEdit" name="lineEdit_metatileLabel">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="12" column="0" colspan="3">
<widget class="QLabel" name="label_metatileLabel">
<item row="0" column="1">
<widget class="QLabel" name="label_layerType">
<property name="text">
<string>Metatile Label (Optional)</string>
<string>Layer Type</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_BottomTop">
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="label_metatileBehavior">
<property name="text">
<string>Bottom/Top</string>
<string>Metatile Behavior</string>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_encounterType">
<property name="text">
<string>Encounter Type</string>
</property>
</widget>
<item row="9" column="0">
<widget class="NoScrollComboBox" name="comboBox_encounterType"/>
</item>
<item row="1" column="0">
<widget class="QGraphicsView" name="graphicsView_metatileLayers">
@ -278,44 +298,17 @@
</property>
</widget>
</item>
<item row="7" column="0" colspan="3">
<widget class="NoScrollComboBox" name="comboBox_metatileBehaviors"/>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_layerType">
<property name="text">
<string>Layer Type</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="NoScrollComboBox" name="comboBox_encounterType"/>
</item>
<item row="2" column="0" colspan="3">
<widget class="QLabel" name="label_metatileBehavior">
<property name="text">
<string>Metatile Behavior</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="NoScrollComboBox" name="comboBox_terrainType"/>
</item>
<item row="1" column="2">
<widget class="NoScrollComboBox" name="comboBox_layerType"/>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_terrainType">
<property name="text">
<string>Terrain Type</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Tile Properties</string>
</property>
@ -331,7 +324,14 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBox_paletteSelector"/>
<widget class="QSpinBox" name="spinBox_paletteSelector">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
@ -364,7 +364,7 @@
</property>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="label_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -377,7 +377,7 @@
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<item row="5" column="0" colspan="2">
<widget class="QGraphicsView" name="graphicsView_selectedTile">
<property name="minimumSize">
<size>
@ -402,6 +402,32 @@
</property>
</widget>
</item>
<item row="3" column="0">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="0">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
@ -410,6 +436,12 @@
</item>
<item>
<widget class="QScrollArea" name="scrollArea_Tiles">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
@ -419,7 +451,7 @@
<x>0</x>
<y>0</y>
<width>411</width>
<height>247</height>
<height>272</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">

View file

@ -17,6 +17,8 @@ PreferenceEditor::PreferenceEditor(QWidget *parent) :
ui->setupUi(this);
auto *formLayout = new QFormLayout(ui->groupBox_Themes);
themeSelector = new NoScrollComboBox(ui->groupBox_Themes);
themeSelector->setEditable(false);
themeSelector->setMinimumContentsLength(0);
formLayout->addRow("Themes", themeSelector);
setAttribute(Qt::WA_DeleteOnClose);
connect(ui->buttonBox, &QDialogButtonBox::clicked,

View file

@ -117,6 +117,7 @@ void TilesetEditor::setAttributesUi() {
for (int num : project->metatileBehaviorMapInverse.keys()) {
this->ui->comboBox_metatileBehaviors->addItem(project->metatileBehaviorMapInverse[num], num);
}
this->ui->comboBox_metatileBehaviors->setMinimumContentsLength(0);
} else {
this->ui->comboBox_metatileBehaviors->setVisible(false);
this->ui->label_metatileBehavior->setVisible(false);
@ -129,6 +130,7 @@ void TilesetEditor::setAttributesUi() {
this->ui->comboBox_terrainType->addItem("Water", TERRAIN_WATER);
this->ui->comboBox_terrainType->addItem("Waterfall", TERRAIN_WATERFALL);
this->ui->comboBox_terrainType->setEditable(false);
this->ui->comboBox_terrainType->setMinimumContentsLength(0);
} else {
this->ui->comboBox_terrainType->setVisible(false);
this->ui->label_terrainType->setVisible(false);
@ -140,6 +142,7 @@ void TilesetEditor::setAttributesUi() {
this->ui->comboBox_encounterType->addItem("Land", ENCOUNTER_LAND);
this->ui->comboBox_encounterType->addItem("Water", ENCOUNTER_WATER);
this->ui->comboBox_encounterType->setEditable(false);
this->ui->comboBox_encounterType->setMinimumContentsLength(0);
} else {
this->ui->comboBox_encounterType->setVisible(false);
this->ui->label_encounterType->setVisible(false);
@ -151,6 +154,7 @@ void TilesetEditor::setAttributesUi() {
this->ui->comboBox_layerType->addItem("Covered - Bottom/Middle", METATILE_LAYER_BOTTOM_MIDDLE);
this->ui->comboBox_layerType->addItem("Split - Bottom/Top", METATILE_LAYER_BOTTOM_TOP);
this->ui->comboBox_layerType->setEditable(false);
this->ui->comboBox_layerType->setMinimumContentsLength(0);
if (!Metatile::getLayerTypeMask()) {
// User doesn't have triple layer metatiles, but has no layer type attribute.
// Porymap is still using the layer type value to render metatiles, and with