We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ead3530 commit a039bddCopy full SHA for a039bdd
src/gui/qgscolorbutton.cpp
@@ -34,7 +34,9 @@
34
35
QgsColorButton::QgsColorButton(QWidget *parent)
36
: QToolButton(parent)
37
-{}
+{
38
+ setToolButtonStyle(Qt::ToolButtonTextOnly); // decrease default button height
39
+}
40
41
QgsColorButton::~QgsColorButton()
42
{}
@@ -45,7 +47,12 @@ QgsColorButton::~QgsColorButton()
45
47
void QgsColorButton::paintEvent(QPaintEvent *e)
46
48
{
49
QToolButton::paintEvent(e);
- if (isEnabled())
50
+ if (
51
+#ifdef Q_WS_MAC
52
+ // Mac shows color only a when a window is active
53
+ isActiveWindow() &&
54
+#endif
55
+ isEnabled())
56
57
QPainter p(this);
58
int margin = 2; // Leave some space for highlighting
0 commit comments