Remove hardcoded color stylesheets from shader labels in pipeline views

This commit is contained in:
baldurk
2017-05-29 17:52:25 +01:00
parent 886ec3190c
commit 19218b6bef
8 changed files with 76 additions and 106 deletions
@@ -121,7 +121,12 @@ D3D11PipelineStateViewer::D3D11PipelineStateViewer(ICaptureContext &ctx,
QObject::connect(b, &QToolButton::clicked, this, &D3D11PipelineStateViewer::shaderView_clicked);
for(RDLabel *b : shaderLabels)
{
QObject::connect(b, &RDLabel::clicked, this, &D3D11PipelineStateViewer::shaderLabel_clicked);
b->setAutoFillBackground(true);
b->setBackgroundRole(QPalette::ToolTipBase);
b->setForegroundRole(QPalette::ToolTipText);
}
for(QToolButton *b : editButtons)
QObject::connect(b, &QToolButton::clicked, this, &D3D11PipelineStateViewer::shaderEdit_clicked);
@@ -182,7 +182,7 @@
<item>
<widget class="QTabWidget" name="stagesTabs">
<property name="currentIndex">
<number>8</number>
<number>1</number>
</property>
<property name="documentMode">
<bool>true</bool>
@@ -466,10 +466,8 @@
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -583,10 +581,8 @@ border: 1px solid black;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -946,10 +942,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -1309,10 +1303,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -1672,10 +1664,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -2609,10 +2599,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -3588,10 +3576,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -4011,16 +3997,16 @@ padding: 0px;</string>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>RDTreeWidget</class>
<extends>QTreeView</extends>
<header>Widgets/Extended/RDTreeWidget.h</header>
</customwidget>
<customwidget>
<class>RDLabel</class>
<extends>QLabel</extends>
<header>Widgets/Extended/RDLabel.h</header>
</customwidget>
<customwidget>
<class>RDTreeWidget</class>
<extends>QTreeView</extends>
<header>Widgets/Extended/RDTreeWidget.h</header>
</customwidget>
<customwidget>
<class>PipelineFlowChart</class>
<extends>QFrame</extends>
@@ -148,7 +148,12 @@ D3D12PipelineStateViewer::D3D12PipelineStateViewer(ICaptureContext &ctx,
QObject::connect(b, &QToolButton::clicked, this, &D3D12PipelineStateViewer::shaderView_clicked);
for(RDLabel *b : shaderLabels)
{
QObject::connect(b, &RDLabel::clicked, this, &D3D12PipelineStateViewer::shaderLabel_clicked);
b->setAutoFillBackground(true);
b->setBackgroundRole(QPalette::ToolTipBase);
b->setForegroundRole(QPalette::ToolTipText);
}
for(QToolButton *b : editButtons)
QObject::connect(b, &QToolButton::clicked, this, &D3D12PipelineStateViewer::shaderEdit_clicked);
@@ -500,10 +500,8 @@
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -863,10 +861,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -1226,10 +1222,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -1589,10 +1583,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -2528,10 +2520,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -3479,10 +3469,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -127,7 +127,12 @@ GLPipelineStateViewer::GLPipelineStateViewer(ICaptureContext &ctx, PipelineState
QObject::connect(b, &QToolButton::clicked, this, &GLPipelineStateViewer::shaderView_clicked);
for(RDLabel *b : shaderLabels)
{
QObject::connect(b, &RDLabel::clicked, this, &GLPipelineStateViewer::shaderLabel_clicked);
b->setAutoFillBackground(true);
b->setBackgroundRole(QPalette::ToolTipBase);
b->setForegroundRole(QPalette::ToolTipText);
}
for(QToolButton *b : editButtons)
QObject::connect(b, &QToolButton::clicked, this, &GLPipelineStateViewer::shaderEdit_clicked);
@@ -500,10 +500,8 @@
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -918,10 +916,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -1336,10 +1332,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -1754,10 +1748,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -3093,10 +3085,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -3956,10 +3946,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -130,7 +130,12 @@ VulkanPipelineStateViewer::VulkanPipelineStateViewer(ICaptureContext &ctx,
QObject::connect(b, &QToolButton::clicked, this, &VulkanPipelineStateViewer::shaderView_clicked);
for(RDLabel *b : shaderLabels)
{
QObject::connect(b, &RDLabel::clicked, this, &VulkanPipelineStateViewer::shaderLabel_clicked);
b->setAutoFillBackground(true);
b->setBackgroundRole(QPalette::ToolTipBase);
b->setForegroundRole(QPalette::ToolTipText);
}
for(QToolButton *b : editButtons)
QObject::connect(b, &QToolButton::clicked, this, &VulkanPipelineStateViewer::shaderEdit_clicked);
@@ -500,10 +500,8 @@
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -753,10 +751,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -1006,10 +1002,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -1259,10 +1253,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -2115,10 +2107,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
@@ -2851,10 +2841,8 @@ padding: 0px;</string>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid black;
background-color: rgb(255, 255, 191);
padding: 0px;</string>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>