|
From: <cn...@us...> - 2025-09-17 19:14:51
|
Revision: 1603
http://sourceforge.net/p/seq/svn/1603
Author: cn187
Date: 2025-09-17 19:14:48 +0000 (Wed, 17 Sep 2025)
Log Message:
-----------
Show hex codes on map color dialog
Modified Paths:
--------------
showeq/branches/cn187_devel/src/map.cpp
Modified: showeq/branches/cn187_devel/src/map.cpp
===================================================================
--- showeq/branches/cn187_devel/src/map.cpp 2025-09-17 19:14:37 UTC (rev 1602)
+++ showeq/branches/cn187_devel/src/map.cpp 2025-09-17 19:14:48 UTC (rev 1603)
@@ -5807,9 +5807,13 @@
row = floor(i / 8);
col = i % 8;
- m_color_pb[i] = new QPushButton(QString::number(i), this);
+ QColor color = QColor(m_color_user_table[i]);
+
+ m_color_pb[i] = new QPushButton(
+ QString::asprintf("%d\n#%02x%02x%02x",
+ i,color.red(),color.green(),color.blue()), this);
m_color_pb[i]->setStyle(new QCommonStyle());
- m_color_pb[i]->setPalette(QPalette(QColor(m_color_user_table[i])));
+ m_color_pb[i]->setPalette(QPalette(color));
m_color_pb[i]->setProperty("colorIndex", i);
connect(m_color_pb[i], SIGNAL(clicked()), this, SLOT(selectColor()));
@@ -5901,7 +5905,10 @@
{
int i = pb->property("colorIndex").toInt();
m_color_user_table[i] = newColor.name();
- pb->setPalette(QPalette(QColor(m_color_user_table[i])));
+ QColor color = m_color_user_table[i];
+ pb->setPalette(QPalette(color));
+ pb->setText( QString::asprintf("%d\n#%02x%02x%02x",
+ i,color.red(),color.green(),color.blue()));
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|