We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 46ff6e0 commit d0e66eaCopy full SHA for d0e66ea
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