Minor Bug

Forums

In dark themes, modified spinBoxes display in light yellow, making the text unreadable.

The method void drumkv1widget_param::setValue ( float fValue )
is not working as intended.

Perhaps one option would be to always use dark text on a light yellow background, regardless of the selected palette.
That would avoid having to deal with managing the palettes.

I'm just letting you know; I know it's a trivial matter, nothing urgent.

It seems to work...
It was necessary to include the default case to restore it with default palette.

void drumkv1widget_param::setValue(float fValue)
{
	if (m_iDefaultValue == 0) {
		m_fDefaultValue = fValue;
		m_iDefaultValue++;
	}

	const bool isDefault =
		::fabsf(fValue - m_fDefaultValue) <= 0.0001f;

	if (!QWidget::isEnabled() || isDefault) {
		QWidget::setPalette(QPalette());
	} else {
		QPalette pal = QWidget::palette();
		pal.setColor(QPalette::Base,
			(pal.window().color().value() < 0x7f
				? QColor(Qt::darkYellow).darker()
				: QColor(Qt::yellow).lighter()));
		QWidget::setPalette(pal);
	}

	if (::fabsf(fValue - m_fValue) > 0.0001f) {
		m_fValue = fValue;
		emit valueChanged(m_fValue);
	}
}

Add new comment

The content of this field is kept private and will not be shown publicly.

Markdown

  • Parses markdown and converts it to HTML.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt height width> <strike> <pre> <p> <br>
  • Lines and paragraphs break automatically.

Filtered HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <b> <i> <pre> <img src alt height width> <strike>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
File attachments
Unlimited number of files can be uploaded to this field.
2 MB limit.
Allowed types: jpg jpeg gif png txt doc docx xls xlsx pdf ppt pps odt ods odp zip gz bz2 xz patch diff wav ogg flac ogv mp4 qtz.