Mercurial > hg > svgui
comparison widgets/AudioDial.cpp @ 1545:bdf284b29722
Make audio dial more visible in Mac dark mode
author | Chris Cannam |
---|---|
date | Wed, 16 Oct 2019 16:20:12 +0100 |
parents | c268fe2ad597 |
children | e5464dc2f6cf |
comparison
equal
deleted
inserted
replaced
1544:2d4107270015 | 1545:bdf284b29722 |
---|---|
140 QColor meterColor(m_meterColor); | 140 QColor meterColor(m_meterColor); |
141 if (!isEnabled()) { | 141 if (!isEnabled()) { |
142 meterColor = palette().mid().color(); | 142 meterColor = palette().mid().color(); |
143 } else if (m_meterColor == Qt::white) { | 143 } else if (m_meterColor == Qt::white) { |
144 if (knobIsDark) { | 144 if (knobIsDark) { |
145 meterColor = palette().light().color(); | 145 meterColor = palette().text().color(); |
146 } else { | 146 } else { |
147 meterColor = palette().highlight().color(); | 147 meterColor = palette().highlight().color(); |
148 } | 148 } |
149 } | 149 } |
150 | 150 |
151 QColor notchColor(palette().dark().color()); | 151 QColor notchColor(palette().dark().color()); |
152 if (knobIsDark) { | 152 if (knobIsDark) { |
153 notchColor = palette().light().color(); | 153 notchColor = palette().text().color(); |
154 } | 154 } |
155 | 155 |
156 int m_size = width() < height() ? width() : height(); | 156 int m_size = width() < height() ? width() : height(); |
157 int scale = 1; | 157 int scale = 1; |
158 int width = m_size - 2*scale; | 158 int width = m_size - 2*scale; |
198 } | 198 } |
199 | 199 |
200 // Tick notches... | 200 // Tick notches... |
201 | 201 |
202 if ( notchesVisible() ) { | 202 if ( notchesVisible() ) { |
203 // cerr << "Notches visible" << endl; | |
204 pen.setColor(notchColor); | 203 pen.setColor(notchColor); |
205 pen.setWidth(scale); | 204 pen.setWidth(scale); |
206 paint.setPen(pen); | 205 paint.setPen(pen); |
207 for (int i = 0; i < numTicks; ++i) { | 206 for (int i = 0; i < numTicks; ++i) { |
208 int div = numTicks; | 207 int div = numTicks; |