Commit 00ab4ba4 authored by finetjul's avatar finetjul
Browse files

ENH: Replace complicated arrow QPushButton with simpler QToolButton

QToolButton::ArrowType does what we want here.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@14693 3bd1e089-480b-0410-8dfb-8563597acbee
parent fbd0f43b
......@@ -30,7 +30,13 @@
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="SliceCollapsibleButton">
<widget class="QToolButton" name="SliceCollapsibleButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
......@@ -44,10 +50,10 @@
</size>
</property>
<property name="text">
<string/>
<string>...</string>
</property>
<property name="checked">
<bool>false</bool>
<property name="arrowType">
<enum>Qt::DownArrow</enum>
</property>
</widget>
</item>
......
......@@ -52,7 +52,7 @@ qMRMLSliceControllerWidgetPrivate::qMRMLSliceControllerWidgetPrivate()
qMRMLSliceControllerWidgetPrivate::~qMRMLSliceControllerWidgetPrivate()
{
}
/*
//-----------------------------------------------------------------------------
class qMRMLSliceCollapsibleButtonStyle:public QProxyStyle
{
......@@ -79,7 +79,7 @@ public:
}
}
};
*/
//---------------------------------------------------------------------------
void qMRMLSliceControllerWidgetPrivate::setupUi(qMRMLWidget* widget)
{
......@@ -88,7 +88,7 @@ void qMRMLSliceControllerWidgetPrivate::setupUi(qMRMLWidget* widget)
this->Ui_qMRMLSliceControllerWidget::setupUi(widget);
// Set a ProxyStyle responsible for drawing the arrow
this->SliceCollapsibleButton->setStyle(new qMRMLSliceCollapsibleButtonStyle(p->style()));
//this->SliceCollapsibleButton->setStyle(new qMRMLSliceCollapsibleButtonStyle(p->style()));
// Set selector attributes
this->LabelMapSelector->addAttribute("vtkMRMLVolumeNode", "LabelMap", "1");
......@@ -140,7 +140,10 @@ void qMRMLSliceControllerWidgetPrivate::onImageDataModifiedEvent()
// --------------------------------------------------------------------------
void qMRMLSliceControllerWidgetPrivate::toggleControllerWidgetGroupVisibility()
{
this->ControllerWidgetGroup->setVisible(!this->ControllerWidgetGroup->isVisible());
this->ControllerWidgetGroup->setVisible(
!this->ControllerWidgetGroup->isVisible());
this->SliceCollapsibleButton->setArrowType(
this->ControllerWidgetGroup->isVisible() ? Qt::UpArrow : Qt::DownArrow);
}
// --------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment