diff --git a/src/ui/collapsibleGroupBox2.py b/src/ui/collapsibleGroupBox2.py
new file mode 100644
index 00000000..9721b32a
--- /dev/null
+++ b/src/ui/collapsibleGroupBox2.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+#--!-- coding: utf8 --!--
+
+from __future__ import print_function
+from __future__ import unicode_literals
+
+from qt import *
+
+class collapsibleGroupBox2(QWidget):
+
+ def __init__(self, parent=None):
+ QWidget.__init__(self, parent)
+ self.frame = QFrame(self)
+ self.button = QPushButton("Toggle", self)
+ self.button.setCheckable(True)
+ self.button.setChecked(True)
+ self.switched = False
+ self.vPolicy = None
+
+ def resizeEvent(self, event):
+ if not self.switched:
+ self.switchLayout()
+ return QWidget.resizeEvent(self, event)
+
+ def switchLayout(self):
+ self.frame.setLayout(self.layout())
+ self.wLayout = QVBoxLayout(self)
+ self.wLayout.setContentsMargins(0, 0, 0, 0)
+ self.wLayout.addWidget(self.button)
+ self.wLayout.addWidget(self.frame)
+ self.button.toggled.connect(self.setExpanded)
+ self.frame.layout().setContentsMargins(5, 0, 5, 0)
+ self.switched = True
+
+ self.vPolicy = self.sizePolicy().verticalPolicy()
+
+ def setFlat(self, val):
+ if val:
+ self.frame.setFrameShape(QFrame.NoFrame)
+
+ def setCheckable(self, val):
+ pass
+
+ def setTitle(self, title):
+ self.button.setText(title)
+
+ def setExpanded(self, val):
+ self.frame.setVisible(val)
+ if val:
+ self.setSizePolicy(QSizePolicy.Preferred, self.vPolicy)
+ else:
+ self.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Maximum)
\ No newline at end of file
diff --git a/src/ui/mainWindow.py b/src/ui/mainWindow.py
index 5f9f3939..116eb1a4 100644
--- a/src/ui/mainWindow.py
+++ b/src/ui/mainWindow.py
@@ -879,7 +879,7 @@ class Ui_MainWindow(object):
self.verticalLayout_20.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize)
self.verticalLayout_20.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_20.setObjectName("verticalLayout_20")
- self.groupBox_4 = collapsibleGroupBox(self.tab_17)
+ self.groupBox_4 = collapsibleGroupBox2(self.tab_17)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
@@ -938,7 +938,7 @@ class Ui_MainWindow(object):
self.txtRedacGoal.setObjectName("txtRedacGoal")
self.formLayout_5.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.txtRedacGoal)
self.verticalLayout_20.addWidget(self.groupBox_4)
- self.groupBox_5 = collapsibleGroupBox(self.tab_17)
+ self.groupBox_5 = collapsibleGroupBox2(self.tab_17)
self.groupBox_5.setFlat(True)
self.groupBox_5.setCheckable(True)
self.groupBox_5.setObjectName("groupBox_5")
@@ -953,7 +953,7 @@ class Ui_MainWindow(object):
self.txtRedacSummaryFull.setObjectName("txtRedacSummaryFull")
self.verticalLayout_22.addWidget(self.txtRedacSummaryFull)
self.verticalLayout_20.addWidget(self.groupBox_5)
- self.groupBox_6 = collapsibleGroupBox(self.tab_17)
+ self.groupBox_6 = collapsibleGroupBox2(self.tab_17)
self.groupBox_6.setFlat(True)
self.groupBox_6.setCheckable(True)
self.groupBox_6.setObjectName("groupBox_6")
@@ -1273,9 +1273,9 @@ class Ui_MainWindow(object):
self.actShowHelp.setText(_translate("MainWindow", "Afficher les &bulles d\'aide"))
self.actShowHelp.setShortcut(_translate("MainWindow", "Ctrl+Shift+B"))
-from ui.collapsibleGroupBox import collapsibleGroupBox
-from ui.chkOutlineCompile import chkOutlineCompile
-from ui.cmbOutlineStatusChoser import cmbOutlineStatusChoser
-from ui.sldImportance import sldImportance
-from ui.editorWidget import editorWidget
from ui.cmbOutlinePersoChoser import cmbOutlinePersoChoser
+from ui.sldImportance import sldImportance
+from ui.cmbOutlineStatusChoser import cmbOutlineStatusChoser
+from ui.chkOutlineCompile import chkOutlineCompile
+from ui.collapsibleGroupBox2 import collapsibleGroupBox2
+from ui.editorWidget import editorWidget
diff --git a/src/ui/mainWindow.ui b/src/ui/mainWindow.ui
index c58a3e71..ce20370a 100644
--- a/src/ui/mainWindow.ui
+++ b/src/ui/mainWindow.ui
@@ -1717,7 +1717,7 @@
0
-
-
+
0
@@ -1827,7 +1827,7 @@
-
-
+
Résumé de la scène
@@ -1858,7 +1858,7 @@
-
-
+
Notes pour la scène
@@ -2167,12 +2167,6 @@
1
-
- collapsibleGroupBox
- QGroupBox
-
- 1
-
cmbOutlinePersoChoser
QComboBox
@@ -2194,6 +2188,12 @@
1
+
+ collapsibleGroupBox2
+ QGroupBox
+ ui.collapsibleGroupBox2.h
+ 1
+