Qt: Add hex index to palette view
Vicki Pfau vi@endrift.com
Mon, 17 Feb 2020 14:24:51 -0800
3 files changed,
4 insertions(+),
3 deletions(-)
M
src/platform/qt/PaletteView.cpp
→
src/platform/qt/PaletteView.cpp
@@ -120,7 +120,7 @@ uint32_t hexcode = (r << 19) | (g << 11) | (b << 3);
hexcode |= (hexcode >> 5) & 0x070707; m_ui.hexcode->setText(tr("#%0").arg(hexcode, 6, 16, QChar('0'))); m_ui.value->setText(tr("0x%0").arg(color, 4, 16, QChar('0'))); - m_ui.index->setText(tr("%0").arg(index, 3, 10, QChar('0'))); + m_ui.index->setText(tr("0x%0 (%1)").arg(index, 3, 16, QChar('0')).arg(index, 3, 10, QChar('0'))); m_ui.r->setText(tr("0x%0 (%1)").arg(r, 2, 16, QChar('0')).arg(r, 2, 10, QChar('0'))); m_ui.g->setText(tr("0x%0 (%1)").arg(g, 2, 16, QChar('0')).arg(g, 2, 10, QChar('0'))); m_ui.b->setText(tr("0x%0 (%1)").arg(b, 2, 16, QChar('0')).arg(b, 2, 10, QChar('0')));
M
src/platform/qt/PaletteView.ui
→
src/platform/qt/PaletteView.ui
@@ -6,7 +6,7 @@ <property name="geometry">
<rect> <x>0</x> <y>0</y> - <width>443</width> + <width>500</width> <height>397</height> </rect> </property>@@ -289,7 +289,7 @@ </item>
<item> <widget class="QLabel" name="index"> <property name="text"> - <string>000</string> + <string>0x000 (000)</string> </property> <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>