gui: full module description only in detailed mode
* take only the first line of the description, this makes the normal view more condensed if it is formatted like a git commit message or similar Change-Id: I268dce0aa09d3ad5133815fe33577532bf0a2e96 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30749 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de>
This commit is contained in:
@ -226,8 +226,10 @@ class ModuleWidget(QWidget):
|
||||
def _initModuleInfo(self):
|
||||
props = dict(self._node.getModuleProperties(self._name))
|
||||
self.moduleName.setText(self._name)
|
||||
self.moduleDescription.setText(props.pop('description',
|
||||
'no description provided'))
|
||||
self._moduleDescription = props.pop('description',
|
||||
'no description provided')
|
||||
text = self._moduleDescription.split('\n', 1)[0]
|
||||
self.moduleDescription.setText(text)
|
||||
|
||||
self.groupInfo.setText(props.pop('group', '-'))
|
||||
feats = ','.join(props.pop('features', [])) or '-'
|
||||
@ -401,6 +403,11 @@ class ModuleWidget(QWidget):
|
||||
self._setParamHidden(param, True)
|
||||
|
||||
def showDetails(self, show):
|
||||
if show:
|
||||
self.moduleDescription.setText(self._moduleDescription)
|
||||
else:
|
||||
text = self._moduleDescription.split('\n', 1)[0]
|
||||
self.moduleDescription.setText(text)
|
||||
self.infoGrid.setHidden(not show)
|
||||
for param in self.independentParams:
|
||||
if param in ['value', 'status', 'target']:
|
||||
|
@ -21,7 +21,7 @@
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1,10,0,0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0,10,0,0">
|
||||
<item>
|
||||
<widget class="AnimatedLabel" name="moduleName">
|
||||
<property name="font">
|
||||
@ -46,7 +46,7 @@
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
|
Reference in New Issue
Block a user