Added "\n" to the Resource Preview tooltips

GL was missing them
The other APIs adding them as a precaution for the future
This commit is contained in:
Jake Turner
2023-08-21 18:50:17 +01:00
parent d6898e428c
commit d68a8e9dc4
4 changed files with 9 additions and 8 deletions
@@ -681,7 +681,7 @@ void D3D11PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D1
(res.numElements * res.elementByteSize) < buf->length)
{
text += tr("The view covers bytes %1-%2 (%3 elements).\nThe buffer is %4 bytes in length (%5 "
"elements).")
"elements).\n")
.arg(res.firstElement * res.elementByteSize)
.arg((res.firstElement + res.numElements) * res.elementByteSize)
.arg(res.numElements)
@@ -705,7 +705,7 @@ void D3D12PipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const D3D1
if(res.firstElement > 0 || (res.numElements * res.elementByteSize) < buf->length)
{
text += tr("The view covers bytes %1-%2 (%3 elements).\nThe buffer is %4 bytes in length (%5 "
"elements).")
"elements).\n")
.arg(res.firstElement * res.elementByteSize)
.arg((res.firstElement + res.numElements) * res.elementByteSize)
.arg(res.numElements)
@@ -553,9 +553,9 @@ void GLPipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, TextureDescri
if((tex->mips > 1 && firstMip > 0) || numMips < tex->mips)
{
if(numMips == 1)
text += tr("The texture has %1 mips, the view covers mip %2.").arg(tex->mips).arg(firstMip);
text += tr("The texture has %1 mips, the view covers mip %2.\n").arg(tex->mips).arg(firstMip);
else
text += tr("The texture has %1 mips, the view covers mips %2-%3.")
text += tr("The texture has %1 mips, the view covers mips %2-%3.\n")
.arg(tex->mips)
.arg(firstMip)
.arg(firstMip + numMips - 1);
@@ -564,10 +564,11 @@ void GLPipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, TextureDescri
if((tex->arraysize > 1 && firstSlice > 0) || numSlices < tex->arraysize)
{
if(numSlices == 1)
text +=
tr("The texture has %1 slices, the view covers slice %2.").arg(tex->arraysize).arg(firstSlice);
text += tr("The texture has %1 slices, the view covers slice %2.\n")
.arg(tex->arraysize)
.arg(firstSlice);
else
text += tr("The texture has %1 slices, the view covers slices %2-%3.")
text += tr("The texture has %1 slices, the view covers slices %2-%3.\n")
.arg(tex->arraysize)
.arg(firstSlice)
.arg(firstSlice + numSlices - 1);
@@ -775,7 +775,7 @@ bool VulkanPipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const bin
if(view.byteOffset > 0 || view.byteSize < buf->length)
{
text += tr("The view covers bytes %1-%2.\nThe buffer is %3 bytes in length.")
text += tr("The view covers bytes %1-%2.\nThe buffer is %3 bytes in length.\n")
.arg(view.byteOffset)
.arg(view.byteOffset + view.byteSize)
.arg(buf->length);