Browse Source

ui improvements

nordsoft 2 years ago
parent
commit
006def7690
2 changed files with 15 additions and 22 deletions
  1. 2 0
      mapeditor/mainwindow.cpp
  2. 13 22
      mapeditor/mainwindow.ui

+ 2 - 0
mapeditor/mainwindow.cpp

@@ -939,6 +939,8 @@ void MainWindow::preparePreview(const QModelIndex &index)
 			scenePreview->addPixmap(objPreview);
 		}
 	}
+
+	ui->objectPreview->fitInView(scenePreview->itemsBoundingRect(), Qt::KeepAspectRatio);
 }
 
 

+ 13 - 22
mapeditor/mainwindow.ui

@@ -163,6 +163,9 @@
      <height>214</height>
     </size>
    </property>
+   <property name="features">
+    <set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable</set>
+   </property>
    <property name="windowTitle">
     <string>Minimap</string>
    </property>
@@ -203,12 +206,6 @@
          <height>192</height>
         </size>
        </property>
-       <property name="maximumSize">
-        <size>
-         <width>192</width>
-         <height>192</height>
-        </size>
-       </property>
        <property name="verticalScrollBarPolicy">
         <enum>Qt::ScrollBarAlwaysOff</enum>
        </property>
@@ -239,6 +236,9 @@
      <height>524287</height>
     </size>
    </property>
+   <property name="features">
+    <set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable</set>
+   </property>
    <property name="windowTitle">
     <string>Map Objects View</string>
    </property>
@@ -435,11 +435,8 @@
      <height>192</height>
     </size>
    </property>
-   <property name="maximumSize">
-    <size>
-     <width>524287</width>
-     <height>192</height>
-    </size>
+   <property name="features">
+    <set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable</set>
    </property>
    <property name="windowTitle">
     <string>Tools</string>
@@ -762,6 +759,9 @@
      <verstretch>0</verstretch>
     </sizepolicy>
    </property>
+   <property name="features">
+    <set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable</set>
+   </property>
    <property name="windowTitle">
     <string>Painting</string>
    </property>
@@ -920,11 +920,8 @@
    </widget>
   </widget>
   <widget class="QDockWidget" name="dockWidget_5">
-   <property name="maximumSize">
-    <size>
-     <width>524287</width>
-     <height>150</height>
-    </size>
+   <property name="features">
+    <set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable</set>
    </property>
    <property name="windowTitle">
     <string>Preview</string>
@@ -954,12 +951,6 @@
          <height>128</height>
         </size>
        </property>
-       <property name="maximumSize">
-        <size>
-         <width>128</width>
-         <height>128</height>
-        </size>
-       </property>
       </widget>
      </item>
     </layout>