mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 08:26:50 +00:00
Tweak colour used for 'view details' highlighting in pipeline state view
* This helps those who have chosen the dark theme where rich resource text uses the default window text colour assuming it's a contrasting colour against the background (except when highlighted).
This commit is contained in:
@@ -664,10 +664,7 @@ void D3D11PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D1
|
||||
node->setToolTip(text);
|
||||
|
||||
if(viewdetails)
|
||||
{
|
||||
node->setBackgroundColor(QColor(127, 255, 212));
|
||||
node->setForegroundColor(QColor(0, 0, 0));
|
||||
}
|
||||
node->setBackgroundColor(m_Common.GetViewDetailsColor());
|
||||
}
|
||||
|
||||
void D3D11PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D11ViewTag &view,
|
||||
@@ -697,8 +694,7 @@ void D3D11PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D1
|
||||
}
|
||||
|
||||
node->setToolTip(text);
|
||||
node->setBackgroundColor(QColor(127, 255, 212));
|
||||
node->setForegroundColor(QColor(0, 0, 0));
|
||||
node->setBackgroundColor(m_Common.GetViewDetailsColor());
|
||||
}
|
||||
|
||||
void D3D11PipelineStateViewer::addResourceRow(const D3D11ViewTag &view,
|
||||
|
||||
@@ -678,10 +678,7 @@ void D3D12PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D1
|
||||
node->setToolTip(text);
|
||||
|
||||
if(viewdetails)
|
||||
{
|
||||
node->setBackgroundColor(QColor(127, 255, 212));
|
||||
node->setForegroundColor(QColor(0, 0, 0));
|
||||
}
|
||||
node->setBackgroundColor(m_Common.GetViewDetailsColor());
|
||||
}
|
||||
|
||||
void D3D12PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D12ViewTag &view,
|
||||
@@ -723,10 +720,7 @@ void D3D12PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D1
|
||||
node->setToolTip(text);
|
||||
|
||||
if(viewdetails)
|
||||
{
|
||||
node->setBackgroundColor(QColor(127, 255, 212));
|
||||
node->setForegroundColor(QColor(0, 0, 0));
|
||||
}
|
||||
node->setBackgroundColor(m_Common.GetViewDetailsColor());
|
||||
}
|
||||
|
||||
void D3D12PipelineStateViewer::addResourceRow(const D3D12ViewTag &view, const Bindpoint *bind,
|
||||
|
||||
@@ -570,9 +570,7 @@ void GLPipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, TextureDescri
|
||||
if(!text.isEmpty())
|
||||
{
|
||||
node->setToolTip(text);
|
||||
|
||||
node->setBackgroundColor(QColor(127, 255, 212));
|
||||
node->setForegroundColor(QColor(0, 0, 0));
|
||||
node->setBackgroundColor(m_Common.GetViewDetailsColor());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1498,6 +1498,12 @@ QString PipelineStateViewer::GetVBufferFormatString(uint32_t slot)
|
||||
return format;
|
||||
}
|
||||
|
||||
QColor PipelineStateViewer::GetViewDetailsColor()
|
||||
{
|
||||
return QColor::fromHslF(0.45f, 1.0f,
|
||||
qBound(0.25, palette().color(QPalette::Base).lightnessF(), 0.75));
|
||||
}
|
||||
|
||||
bool PipelineStateViewer::SaveShaderFile(const ShaderReflection *shader)
|
||||
{
|
||||
if(!shader)
|
||||
|
||||
@@ -109,6 +109,8 @@ public:
|
||||
|
||||
QString GetVBufferFormatString(uint32_t slot);
|
||||
|
||||
QColor GetViewDetailsColor();
|
||||
|
||||
void setTopologyDiagram(QLabel *diagram, Topology topo);
|
||||
void setMeshViewPixmap(RDLabel *meshView);
|
||||
|
||||
|
||||
@@ -703,8 +703,7 @@ bool VulkanPipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const bin
|
||||
|
||||
if(viewdetails && stageBitsIncluded)
|
||||
{
|
||||
node->setBackgroundColor(QColor(127, 255, 212));
|
||||
node->setForegroundColor(QColor(0, 0, 0));
|
||||
node->setBackgroundColor(m_Common.GetViewDetailsColor());
|
||||
}
|
||||
|
||||
return viewdetails;
|
||||
@@ -737,10 +736,7 @@ bool VulkanPipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const bin
|
||||
node->setToolTip(text);
|
||||
|
||||
if(stageBitsIncluded)
|
||||
{
|
||||
node->setBackgroundColor(QColor(127, 255, 212));
|
||||
node->setForegroundColor(QColor(0, 0, 0));
|
||||
}
|
||||
node->setBackgroundColor(m_Common.GetViewDetailsColor());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user