mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 12:10:57 -06:00
parent
47d0c3ed5e
commit
6c672d9c9c
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 497 B |
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 497 B |
@ -232,6 +232,8 @@
|
||||
<file>CellFilter_Polygon.png</file>
|
||||
<file>undo.png</file>
|
||||
<file>redo.png</file>
|
||||
<file>ComboBoxDown.svg</file>
|
||||
<file>ComboBoxUp.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/Shader">
|
||||
<file>fs_CellFace.glsl</file>
|
||||
|
@ -955,6 +955,8 @@ void RimWellLogCurveCommonDataSource::defineEditorAttribute( const caf::PdmField
|
||||
if ( field == &m_case || field == &m_simWellName || field == &m_wellPath || field == &m_timeStep )
|
||||
{
|
||||
myAttr->showPreviousAndNextButtons = true;
|
||||
myAttr->nextIcon = QIcon( ":/ComboBoxDown.svg" );
|
||||
myAttr->previousIcon = QIcon( ":/ComboBoxUp.svg" );
|
||||
}
|
||||
|
||||
QString modifierText;
|
||||
|
@ -1127,6 +1127,8 @@ void RimSummaryPlotSourceStepping::defineEditorAttribute( const caf::PdmFieldHan
|
||||
if ( myAttr )
|
||||
{
|
||||
myAttr->showPreviousAndNextButtons = true;
|
||||
myAttr->nextIcon = QIcon( ":/ComboBoxDown.svg" );
|
||||
myAttr->previousIcon = QIcon( ":/ComboBoxUp.svg" );
|
||||
|
||||
QString modifierText;
|
||||
|
||||
|
@ -315,24 +315,47 @@ void PdmUiComboBoxEditor::configureAndUpdateUi( const QString& uiConfigName )
|
||||
m_layout->insertWidget( 1, m_previousItemButton );
|
||||
m_layout->insertWidget( 2, m_nextItemButton );
|
||||
|
||||
if ( m_comboBox->count() == 0 || m_comboBox->currentIndex() <= 0 )
|
||||
{
|
||||
QIcon disabledIcon( stepUpIcon().pixmap( 16, 16, QIcon::Disabled ) );
|
||||
m_previousItemButton->setIcon( disabledIcon );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_previousItemButton->setIcon( stepUpIcon() );
|
||||
QIcon toolButtonIcon;
|
||||
if ( !m_attributes.previousIcon.isNull() )
|
||||
{
|
||||
toolButtonIcon = m_attributes.previousIcon;
|
||||
}
|
||||
else
|
||||
{
|
||||
toolButtonIcon = stepUpIcon();
|
||||
}
|
||||
|
||||
if ( m_comboBox->count() == 0 || m_comboBox->currentIndex() <= 0 )
|
||||
{
|
||||
QIcon disabledIcon( toolButtonIcon.pixmap( 16, 16, QIcon::Disabled ) );
|
||||
m_previousItemButton->setIcon( disabledIcon );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_previousItemButton->setIcon( toolButtonIcon );
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_comboBox->count() == 0 || m_comboBox->currentIndex() >= m_comboBox->count() - 1 )
|
||||
{
|
||||
QIcon disabledIcon( stepDownIcon().pixmap( 16, 16, QIcon::Disabled ) );
|
||||
m_nextItemButton->setIcon( disabledIcon );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_nextItemButton->setIcon( stepDownIcon() );
|
||||
QIcon toolButtonIcon;
|
||||
if ( !m_attributes.nextIcon.isNull() )
|
||||
{
|
||||
toolButtonIcon = m_attributes.nextIcon;
|
||||
}
|
||||
else
|
||||
{
|
||||
toolButtonIcon = stepUpIcon();
|
||||
}
|
||||
if ( m_comboBox->count() == 0 || m_comboBox->currentIndex() >= m_comboBox->count() - 1 )
|
||||
{
|
||||
QIcon disabledIcon( toolButtonIcon.pixmap( 16, 16, QIcon::Disabled ) );
|
||||
m_nextItemButton->setIcon( disabledIcon );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_nextItemButton->setIcon( toolButtonIcon );
|
||||
}
|
||||
}
|
||||
|
||||
// Update button texts
|
||||
|
@ -78,6 +78,8 @@ public:
|
||||
QString prevButtonText;
|
||||
|
||||
QSize iconSize;
|
||||
QIcon nextIcon;
|
||||
QIcon previousIcon;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user