Set a sensible minimum width for the window

This commit is contained in:
fieldOfView 2016-06-23 18:44:06 +02:00
parent 85942583b1
commit e8743abe68
3 changed files with 10 additions and 0 deletions

View file

@ -809,3 +809,7 @@ class CuraApplication(QtApplication):
def _addProfileWriter(self, profile_writer):
pass
@pyqtSlot("QSize")
def setMinimumWindowSize(self, size):
self.getMainWindow().setMinimumSize(size)

View file

@ -17,6 +17,11 @@ UM.MainWindow
title: catalog.i18nc("@title:window","Cura");
viewportRect: Qt.rect(0, 0, (base.width - sidebar.width) / base.width, 1.0)
Component.onCompleted:
{
Printer.setMinimumWindowSize(UM.Theme.getSize("window_minimum_size"))
}
Item
{
id: backgroundItem;

View file

@ -157,6 +157,7 @@
},
"sizes": {
"window_minimum_size": [70, 54],
"window_margin": [1.0, 1.0],
"default_margin": [1.0, 1.0],
"default_lining": [0.08, 0.08],