From 31331e33dcc86e70bf490157dd87042c8b869d18 Mon Sep 17 00:00:00 2001 From: Dan Hawson Date: Tue, 14 Nov 2023 17:37:33 +0000 Subject: [PATCH] Formatting --- qrenderdoc/Styles/RDStyle/RDStyle.cpp | 9 +++++---- qrenderdoc/Windows/BufferViewer.cpp | 5 +++-- renderdoc/data/glsl/mesh.vert | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/qrenderdoc/Styles/RDStyle/RDStyle.cpp b/qrenderdoc/Styles/RDStyle/RDStyle.cpp index bed5ecf182..f896946cb0 100644 --- a/qrenderdoc/Styles/RDStyle/RDStyle.cpp +++ b/qrenderdoc/Styles/RDStyle/RDStyle.cpp @@ -473,7 +473,7 @@ QRect RDStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, else if(cc == QStyle::CC_Slider) { QRect ret = opt->rect; - ret.adjust(4,1,-4,-1); + ret.adjust(4, 1, -4, -1); if(sc == QStyle::SC_SliderGroove) { int halfHeightLessMargin = ret.height() / 2 - 2; @@ -483,7 +483,8 @@ QRect RDStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, { ret.adjust(0, 2, 0, -2); const QAbstractSlider *slider = qobject_cast(widget); - qreal posUNorm = (qreal)(slider->sliderPosition() - slider->minimum()) / (qreal)(slider->maximum() - slider->minimum()); + qreal posUNorm = (qreal)(slider->sliderPosition() - slider->minimum()) / + (qreal)(slider->maximum() - slider->minimum()); int sliderX = ret.left() + posUNorm * ret.width(); ret.setLeft(sliderX - 3); ret.setRight(sliderX + 3); @@ -1141,8 +1142,8 @@ void RDStyle::drawComplexControl(ComplexControl control, const QStyleOptionCompl else if(control == QStyle::CC_Slider) { QRect grooveRect = subControlRect(control, opt, QStyle::SC_SliderGroove, widget); - p->drawLine(QLine(grooveRect.x(), grooveRect.y() + grooveRect.height() / 2, - grooveRect.right(), grooveRect.y() + grooveRect.height() / 2)); + p->drawLine(QLine(grooveRect.x(), grooveRect.y() + grooveRect.height() / 2, grooveRect.right(), + grooveRect.y() + grooveRect.height() / 2)); QRect handleRect = subControlRect(control, opt, QStyle::SC_SliderHandle, widget); QBrush sliderBrush = opt->palette.brush(QPalette::Dark); diff --git a/qrenderdoc/Windows/BufferViewer.cpp b/qrenderdoc/Windows/BufferViewer.cpp index 7217a04f48..2c048254b4 100644 --- a/qrenderdoc/Windows/BufferViewer.cpp +++ b/qrenderdoc/Windows/BufferViewer.cpp @@ -5798,8 +5798,9 @@ void BufferViewer::on_vtxExploderSlider_valueChanged(int value) void BufferViewer::on_vtxExploderSlider_sliderReleased() { - //Always snaps back to zero - QAbstractSlider *slider = ui->controlsToolbar->findChild(QStringLiteral("vtxExploderSlider")); + // Always snaps back to zero + QAbstractSlider *slider = + ui->controlsToolbar->findChild(QStringLiteral("vtxExploderSlider")); slider->setSliderPosition(0); } diff --git a/renderdoc/data/glsl/mesh.vert b/renderdoc/data/glsl/mesh.vert index 80b3c52033..a64c74236e 100644 --- a/renderdoc/data/glsl/mesh.vert +++ b/renderdoc/data/glsl/mesh.vert @@ -38,7 +38,8 @@ vec3 vtxExploder(vec3 pos, int vid) { - float nonLinearVtxExplodeScale = 8.0f * Mesh.vtxExploderSNorm * Mesh.vtxExploderSNorm * Mesh.vtxExploderSNorm; + float nonLinearVtxExplodeScale = + 8.0f * Mesh.vtxExploderSNorm * Mesh.vtxExploderSNorm * Mesh.vtxExploderSNorm; vec3 explodeDir = normalize(pos); float displacement = nonLinearVtxExplodeScale * ((float((vid >> 1) & 0xf) / 15.0f) * 1.5f - 0.5f);