From 2a6cfad97548605183dc1b9e7f2dc7d727736e74 Mon Sep 17 00:00:00 2001 From: Be Date: Tue, 24 Mar 2020 19:42:51 -0500 Subject: [PATCH] WColorPicker: always show custom color button There's no need to hide it. --- src/widget/wcolorpicker.cpp | 10 +++------- src/widget/wcolorpicker.h | 1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/widget/wcolorpicker.cpp b/src/widget/wcolorpicker.cpp index 0c5fde4a764c..911b9fea0f89 100644 --- a/src/widget/wcolorpicker.cpp +++ b/src/widget/wcolorpicker.cpp @@ -102,12 +102,10 @@ void WColorPicker::addColorButtons() { int column = 0; int numColors = m_palette.size(); + numColors++; // for custom color button if (m_options.testFlag(Option::AllowNoColor)) { numColors++; } - if (m_options.testFlag(Option::AllowCustomColor)) { - numColors++; - } int numColumns = idealColumnCount(numColors); if (m_options.testFlag(Option::AllowNoColor)) { @@ -124,10 +122,8 @@ void WColorPicker::addColorButtons() { } } - if (m_options.testFlag(Option::AllowCustomColor)) { - addCustomColorButton(pLayout, row, column); - column++; - } + addCustomColorButton(pLayout, row, column); + column++; } void WColorPicker::addColorButton(mixxx::RgbColor color, QGridLayout* pLayout, int row, int column) { diff --git a/src/widget/wcolorpicker.h b/src/widget/wcolorpicker.h index 679f235b5603..12f400754c08 100644 --- a/src/widget/wcolorpicker.h +++ b/src/widget/wcolorpicker.h @@ -15,7 +15,6 @@ class WColorPicker : public QWidget { enum class Option { NoOptions = 0, AllowNoColor = 1, - AllowCustomColor = 1 << 1, }; Q_DECLARE_FLAGS(Options, Option);