Skip to content
Permalink
Browse files
remove spin box background color
  • Loading branch information
pblottiere committed May 18, 2016
1 parent eb9ab8a commit 842be91e61f1048d3c0a5b66166eee8cbe119683
@@ -14,12 +14,6 @@ class QgsDoubleSpinBox : QDoubleSpinBox

explicit QgsDoubleSpinBox( QWidget *parent /TransferThis/ = 0 );

/** Sets background color of QLineEdit widget within spin box
* @param color the background color
* @note added in QGIS 2.16
*/
void setBackgroundColor( const QColor *color = nullptr );

//! determines if the widget will show a clear button
//! @note the clear button will set the widget to its minimum value
void setShowClearButton( const bool showClearButton );
@@ -100,15 +100,6 @@ void QgsStatusBarMagnifierWidget::updateMagnifier()
// get current data
mMagnifier = mSpinBox->value();

// update background color
QSettings mySettings;
int value = mySettings.value( "/qgis/magnifier_level", 100 ).toInt();

if ( mMagnifier == value )
mSpinBox->setBackgroundColor();
else
mSpinBox->setBackgroundColor( new QColor( 200, 200, 255 ) );

// update map canvas
mCanvas->setMagnificationFactor( mMagnifier / double( mMagnifierMin ) );
}
@@ -46,19 +46,6 @@ QgsDoubleSpinBox::QgsDoubleSpinBox( QWidget *parent )
connect( this, SIGNAL( valueChanged( double ) ), this, SLOT( changed( double ) ) );
}

void QgsDoubleSpinBox::setBackgroundColor( const QColor *c )
{
if ( c )
{
QString rgb = QString( "rgb(%1, %2, %3)" ).arg( c->red() ).arg( c->green() ).arg( c->blue() );
this->lineEdit()->setStyleSheet( QString( "background-color: %1" ).arg( rgb ) );
}
else
this->lineEdit()->setStyleSheet( "" );

this->setStyleSheet( "" );
}

void QgsDoubleSpinBox::setShowClearButton( const bool showClearButton )
{
mShowClearButton = showClearButton;
@@ -40,12 +40,6 @@ class GUI_EXPORT QgsDoubleSpinBox : public QDoubleSpinBox

explicit QgsDoubleSpinBox( QWidget *parent = nullptr );

/** Sets background color of QLineEdit widget within spin box
* @param color the background color
* @note added in QGIS 2.16
*/
void setBackgroundColor( const QColor *color = nullptr );

//! determines if the widget will show a clear button
//! @note the clear button will set the widget to its minimum value
void setShowClearButton( const bool showClearButton );

0 comments on commit 842be91

Please sign in to comment.