changeset 98:c5387d9e572a

change the size of the different widget (decrease layer width...)
author lbajardsilogic
date Tue, 10 Jul 2007 16:35:33 +0000
parents 486e44e12a5d
children ca1f73f027f5
files sv/main/MainWindow.cpp widgets/ExpandWidget.cpp
diffstat 2 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sv/main/MainWindow.cpp	Tue Jul 10 16:01:13 2007 +0000
+++ b/sv/main/MainWindow.cpp	Tue Jul 10 16:35:33 2007 +0000
@@ -288,7 +288,7 @@
 	
 	m_filterPropertyStack = new RealTimeFilterPropertyStack();
 	m_toolBox->addItem("Real-time filters",m_filterPropertyStack);
-
+	
 	/******** only for logo ****/
 	QLabel *logo = new QLabel;
 	logo->setPixmap(QPixmap(":icons/easaier.png"));
@@ -301,7 +301,7 @@
 	logoLayout->addWidget(m_toolBox);
 	logoLayout->addStretch();
 	logoLayout->addWidget(logo);
-
+	
 	QWidget *widgetAuxForLogo = new QWidget;
 	widgetAuxForLogo->setLayout(logoLayout);
 	/****************************/
--- a/widgets/ExpandWidget.cpp	Tue Jul 10 16:01:13 2007 +0000
+++ b/widgets/ExpandWidget.cpp	Tue Jul 10 16:35:33 2007 +0000
@@ -89,6 +89,9 @@
 
 void ExpandWidget::setPanes(QWidget *newCenterPane, QWidget *newOtherPane){
 
+	QList<int> sizes;
+	int maxsize = 0;
+
 	m_centerPane =  newCenterPane;
 	m_otherPane = newOtherPane;
 	
@@ -123,6 +126,10 @@
 			widgetAux->setLayout(lay);
 			this->addWidget(widgetAux);
 			this->addWidget(m_otherPane);
+			maxsize = widgetAux->height() + m_otherPane->height();
+			sizes.push_back(maxsize/5);
+			sizes.push_back(maxsize*4/5);
+			this->setSizes(sizes);
 			break;
 		case ExpandWidget::Location_Top:
 			lay = new QVBoxLayout();
@@ -150,6 +157,10 @@
 			widgetAux->setLayout(lay);
 			this->addWidget(m_otherPane);
 			this->addWidget(widgetAux);
+			maxsize = widgetAux->width() + m_otherPane->width();
+			sizes.push_back(maxsize/4);
+			sizes.push_back(maxsize*3/4);
+			this->setSizes(sizes);
 			break;
 		case ExpandWidget::Location_Right:
 		default :
@@ -161,6 +172,10 @@
 			widgetAux->setLayout(lay);
 			this->addWidget(widgetAux);
 			this->addWidget(m_otherPane);
+			maxsize = widgetAux->width() + m_otherPane->width();
+			sizes.push_back(maxsize*3/4);
+			sizes.push_back(maxsize/4);
+			this->setSizes(sizes);
 			break;
 	}
 }