From 9a782158fd39736f0a656eb2c9468c405f642ba3 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 19 Jul 2017 18:31:09 +0100 Subject: [PATCH] Fork RDStyle to RDTweakedNativeStyle * The idea is tha this style won't change the palette and will just do some minimal additions/changes to whatever the native style is, to work around some rough spots. --- qrenderdoc/Styles/RDStyle/RDStyle.cpp | 238 +------------- qrenderdoc/Styles/RDStyle/RDStyle.h | 3 +- .../RDTweakedNativeStyle.cpp | 301 ++++++++++++++++++ .../RDTweakedNativeStyle.h | 54 ++++ qrenderdoc/qrenderdoc.pro | 2 + qrenderdoc/qrenderdoc_local.vcxproj | 8 + qrenderdoc/qrenderdoc_local.vcxproj.filters | 12 + 7 files changed, 387 insertions(+), 231 deletions(-) create mode 100644 qrenderdoc/Styles/RDTweakedNativeStyle/RDTweakedNativeStyle.cpp create mode 100644 qrenderdoc/Styles/RDTweakedNativeStyle/RDTweakedNativeStyle.h diff --git a/qrenderdoc/Styles/RDStyle/RDStyle.cpp b/qrenderdoc/Styles/RDStyle/RDStyle.cpp index 2441afae5..5f6da9741 100644 --- a/qrenderdoc/Styles/RDStyle/RDStyle.cpp +++ b/qrenderdoc/Styles/RDStyle/RDStyle.cpp @@ -28,7 +28,7 @@ #include #include -RDStyle::RDStyle(ColorScheme scheme) : QProxyStyle() +RDStyle::RDStyle(ColorScheme scheme) : RDTweakedNativeStyle() { } @@ -38,262 +38,40 @@ RDStyle::~RDStyle() QRect RDStyle::subElementRect(SubElement element, const QStyleOption *opt, const QWidget *widget) const { - QRect ret = QProxyStyle::subElementRect(element, opt, widget); - - if(element == QStyle::SE_DockWidgetCloseButton || element == QStyle::SE_DockWidgetFloatButton) - { - int width = pixelMetric(QStyle::PM_TabCloseIndicatorWidth, opt, widget); - int height = pixelMetric(QStyle::PM_TabCloseIndicatorHeight, opt, widget); - - QPoint c = ret.center(); - ret.setSize(QSize(width, height)); - ret.moveCenter(c); - } - - return ret; + return RDTweakedNativeStyle::subElementRect(element, opt, widget); } QSize RDStyle::sizeFromContents(ContentsType type, const QStyleOption *opt, const QSize &size, const QWidget *widget) const { - QSize sz = size; - - // Toolbuttons are always at least icon sized, for consistency. - if(type == QStyle::CT_ToolButton) - { - const QStyleOptionToolButton *toolbutton = qstyleoption_cast(opt); - if(toolbutton) - sz = sz.expandedTo(toolbutton->iconSize); - } - - return QProxyStyle::sizeFromContents(type, opt, sz, widget); + return RDTweakedNativeStyle::sizeFromContents(type, opt, size, widget); } int RDStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QWidget *widget) const { - // toolbuttons don't shift their text when clicked. - if(metric == QStyle::PM_ButtonShiftHorizontal || metric == QStyle::PM_ButtonShiftVertical) - { - if(opt && (opt->state & State_AutoRaise)) - return 0; - } - - return QProxyStyle::pixelMetric(metric, opt, widget); + return RDTweakedNativeStyle::pixelMetric(metric, opt, widget); } QIcon RDStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *opt, const QWidget *widget) const { - if(standardIcon == QStyle::SP_TitleBarCloseButton) - { - int sz = pixelMetric(QStyle::PM_SmallIconSize); - - return QIcon(QPixmap(QSize(sz, sz))); - } - - return QProxyStyle::standardIcon(standardIcon, opt, widget); + return RDTweakedNativeStyle::standardIcon(standardIcon, opt, widget); } void RDStyle::drawComplexControl(ComplexControl control, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const { - // autoraise toolbuttons are rendered flat with a semi-transparent highlight to show their state. - if(control == QStyle::CC_ToolButton && (opt->state & State_AutoRaise)) - { - QRect dropdown = subControlRect(control, opt, SC_ToolButtonMenu, widget); - - QPen oldPen = p->pen(); - QColor backCol = opt->palette.color(QPalette::Normal, QPalette::Highlight); - - backCol.setAlphaF(0.2); - QStyle::State masked = opt->state & (State_On | State_MouseOver); - - // when the mouse is over, make it a little stronger - if(masked && (masked & State_MouseOver)) - backCol.setAlphaF(0.4); - - if(masked) - { - QRect rect = opt->rect.adjusted(0, 0, -1, -1); - p->setPen(opt->palette.color(QPalette::Shadow)); - p->drawRect(rect); - p->fillRect(rect, QBrush(backCol)); - } - - p->setPen(oldPen); - - const QStyleOptionToolButton *toolbutton = qstyleoption_cast(opt); - - QStyleOptionToolButton labelTextIcon = *toolbutton; - labelTextIcon.rect = subControlRect(control, opt, SC_ToolButton, widget); - - // draw the label text/icon - drawControl(CE_ToolButtonLabel, &labelTextIcon, p, widget); - - // draw the menu arrow, if there is one - if((toolbutton->subControls & SC_ToolButtonMenu) || - (toolbutton->features & QStyleOptionToolButton::HasMenu)) - { - QStyleOptionToolButton menu = *toolbutton; - menu.rect = subControlRect(control, opt, SC_ToolButtonMenu, widget); - drawPrimitive(PE_IndicatorArrowDown, &menu, p, widget); - } - - return; - } - - return QProxyStyle::drawComplexControl(control, opt, p, widget); + return RDTweakedNativeStyle::drawComplexControl(control, opt, p, widget); } void RDStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *opt, QPainter *p, const QWidget *widget) const { - if(element == QStyle::PE_IndicatorBranch) - { - QPen oldPen = p->pen(); - - if(opt->state & State_Children) - { - bool aa = p->testRenderHint(QPainter::Antialiasing); - p->setRenderHint(QPainter::Antialiasing); - - QColor col = opt->palette.color(QPalette::Dark); - - if(opt->state & State_MouseOver) - { - QColor highlightCol = opt->palette.color(QPalette::Highlight); - - col.setRedF(col.redF() * 0.6 + highlightCol.redF() * 0.4); - col.setGreenF(col.greenF() * 0.6 + highlightCol.greenF() * 0.4); - col.setBlueF(col.blueF() * 0.6 + highlightCol.blueF() * 0.4); - } - - p->setPen(QPen(col, 2.0)); - - QPainterPath path; - - QPolygonF poly; - - QRectF rect = opt->rect; - - { - qreal newdim = qMin(14.0, qMin(rect.height(), rect.width())); - QPointF c = rect.center(); - rect.setTop(c.y() - newdim / 2); - rect.setLeft(c.x() - newdim / 2); - rect.setWidth(newdim); - rect.setHeight(newdim); - } - - rect = rect.adjusted(2, 2, -2, -2); - - if(opt->state & State_Open) - { - QPointF pt = rect.center(); - pt.setX(rect.left()); - poly << pt; - - pt = rect.center(); - pt.setY(rect.bottom()); - poly << pt; - - pt = rect.center(); - pt.setX(rect.right()); - poly << pt; - - path.addPolygon(poly); - - p->drawPath(path); - } - else - { - QPointF pt = rect.center(); - pt.setY(rect.top()); - poly << pt; - - pt = rect.center(); - pt.setX(rect.right()); - poly << pt; - - pt = rect.center(); - pt.setY(rect.bottom()); - poly << pt; - - path.addPolygon(poly); - - p->drawPath(path); - } - - if(!aa) - p->setRenderHint(QPainter::Antialiasing, false); - } - else if(opt->state & (State_Sibling | State_Item)) - { - p->setPen(QPen(opt->palette.color(QPalette::Midlight), 1.0)); - - int bottomY = opt->rect.center().y(); - - if(opt->state & State_Sibling) - bottomY = opt->rect.bottom(); - - p->drawLine(QLine(opt->rect.center().x(), opt->rect.top(), opt->rect.center().x(), bottomY)); - - if(opt->state & State_Item) - p->drawLine(opt->rect.center(), QPoint(opt->rect.right(), opt->rect.center().y())); - } - p->setPen(oldPen); - return; - } - else if(element == PE_IndicatorTabClose) - { - QPen oldPen = p->pen(); - bool aa = p->testRenderHint(QPainter::Antialiasing); - p->setRenderHint(QPainter::Antialiasing); - - QColor col = opt->palette.color(QPalette::Text); - - QRectF rect = opt->rect.adjusted(1, 1, -1, -1); - - if(opt->state & (QStyle::State_Raised | QStyle::State_Sunken | QStyle::State_MouseOver)) - { - QPointF c = rect.center(); - qreal radius = rect.width() / 2.0; - - col = opt->palette.color(QPalette::Base); - - QPainterPath path; - - path.addEllipse(c, radius, radius); - - QColor fillCol = QColor(Qt::red).darker(120); - - if(opt->state & QStyle::State_Sunken) - fillCol = fillCol.darker(120); - - p->fillPath(path, fillCol); - } - - p->setPen(QPen(col, 1.5)); - - QPointF c = rect.center(); - - qreal crossrad = rect.width() / 4.0; - - p->drawLine(c + QPointF(-crossrad, -crossrad), c + QPointF(crossrad, crossrad)); - p->drawLine(c + QPointF(-crossrad, crossrad), c + QPointF(crossrad, -crossrad)); - - p->setPen(oldPen); - if(!aa) - p->setRenderHint(QPainter::Antialiasing, false); - - return; - } - - QProxyStyle::drawPrimitive(element, opt, p, widget); + RDTweakedNativeStyle::drawPrimitive(element, opt, p, widget); } void RDStyle::drawControl(ControlElement control, const QStyleOption *opt, QPainter *p, const QWidget *widget) const { - QProxyStyle::drawControl(control, opt, p, widget); + RDTweakedNativeStyle::drawControl(control, opt, p, widget); } diff --git a/qrenderdoc/Styles/RDStyle/RDStyle.h b/qrenderdoc/Styles/RDStyle/RDStyle.h index cdba30e2a..fb03b5367 100644 --- a/qrenderdoc/Styles/RDStyle/RDStyle.h +++ b/qrenderdoc/Styles/RDStyle/RDStyle.h @@ -26,8 +26,9 @@ #include #include +#include "Styles/RDTweakedNativeStyle/RDTweakedNativeStyle.h" -class RDStyle : public QProxyStyle +class RDStyle : public RDTweakedNativeStyle { private: Q_OBJECT diff --git a/qrenderdoc/Styles/RDTweakedNativeStyle/RDTweakedNativeStyle.cpp b/qrenderdoc/Styles/RDTweakedNativeStyle/RDTweakedNativeStyle.cpp new file mode 100644 index 000000000..c645ee926 --- /dev/null +++ b/qrenderdoc/Styles/RDTweakedNativeStyle/RDTweakedNativeStyle.cpp @@ -0,0 +1,301 @@ +/****************************************************************************** + * The MIT License (MIT) + * + * Copyright (c) 2016-2017 Baldur Karlsson + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#include "RDTweakedNativeStyle.h" +#include +#include +#include +#include + +RDTweakedNativeStyle::RDTweakedNativeStyle() : QProxyStyle() +{ +} + +RDTweakedNativeStyle::~RDTweakedNativeStyle() +{ +} + +QRect RDTweakedNativeStyle::subElementRect(SubElement element, const QStyleOption *opt, + const QWidget *widget) const +{ + QRect ret = QProxyStyle::subElementRect(element, opt, widget); + + if(element == QStyle::SE_DockWidgetCloseButton || element == QStyle::SE_DockWidgetFloatButton) + { + int width = pixelMetric(QStyle::PM_TabCloseIndicatorWidth, opt, widget); + int height = pixelMetric(QStyle::PM_TabCloseIndicatorHeight, opt, widget); + + QPoint c = ret.center(); + ret.setSize(QSize(width, height)); + ret.moveCenter(c); + } + + return ret; +} + +QSize RDTweakedNativeStyle::sizeFromContents(ContentsType type, const QStyleOption *opt, + const QSize &size, const QWidget *widget) const +{ + QSize sz = size; + + // Toolbuttons are always at least icon sized, for consistency. + if(type == QStyle::CT_ToolButton) + { + const QStyleOptionToolButton *toolbutton = qstyleoption_cast(opt); + if(toolbutton) + sz = sz.expandedTo(toolbutton->iconSize); + } + + return QProxyStyle::sizeFromContents(type, opt, sz, widget); +} + +int RDTweakedNativeStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, + const QWidget *widget) const +{ + // toolbuttons don't shift their text when clicked. + if(metric == QStyle::PM_ButtonShiftHorizontal || metric == QStyle::PM_ButtonShiftVertical) + { + if(opt && (opt->state & State_AutoRaise)) + return 0; + } + + return QProxyStyle::pixelMetric(metric, opt, widget); +} + +QIcon RDTweakedNativeStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *opt, + const QWidget *widget) const +{ + if(standardIcon == QStyle::SP_TitleBarCloseButton) + { + int sz = pixelMetric(QStyle::PM_SmallIconSize); + + return QIcon(QPixmap(QSize(sz, sz))); + } + + return QProxyStyle::standardIcon(standardIcon, opt, widget); +} + +void RDTweakedNativeStyle::drawComplexControl(ComplexControl control, const QStyleOptionComplex *opt, + QPainter *p, const QWidget *widget) const +{ + // autoraise toolbuttons are rendered flat with a semi-transparent highlight to show their state. + if(control == QStyle::CC_ToolButton && (opt->state & State_AutoRaise)) + { + QRect dropdown = subControlRect(control, opt, SC_ToolButtonMenu, widget); + + QPen oldPen = p->pen(); + QColor backCol = opt->palette.color(QPalette::Normal, QPalette::Highlight); + + backCol.setAlphaF(0.2); + QStyle::State masked = opt->state & (State_On | State_MouseOver); + + // when the mouse is over, make it a little stronger + if(masked && (masked & State_MouseOver)) + backCol.setAlphaF(0.4); + + if(masked) + { + QRect rect = opt->rect.adjusted(0, 0, -1, -1); + p->setPen(opt->palette.color(QPalette::Shadow)); + p->drawRect(rect); + p->fillRect(rect, QBrush(backCol)); + } + + p->setPen(oldPen); + + const QStyleOptionToolButton *toolbutton = qstyleoption_cast(opt); + + QStyleOptionToolButton labelTextIcon = *toolbutton; + labelTextIcon.rect = subControlRect(control, opt, SC_ToolButton, widget); + + // draw the label text/icon + drawControl(CE_ToolButtonLabel, &labelTextIcon, p, widget); + + // draw the menu arrow, if there is one + if((toolbutton->subControls & SC_ToolButtonMenu) || + (toolbutton->features & QStyleOptionToolButton::HasMenu)) + { + QStyleOptionToolButton menu = *toolbutton; + menu.rect = subControlRect(control, opt, SC_ToolButtonMenu, widget); + drawPrimitive(PE_IndicatorArrowDown, &menu, p, widget); + } + + return; + } + + return QProxyStyle::drawComplexControl(control, opt, p, widget); +} + +void RDTweakedNativeStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *opt, + QPainter *p, const QWidget *widget) const +{ + if(element == QStyle::PE_IndicatorBranch) + { + QPen oldPen = p->pen(); + + if(opt->state & State_Children) + { + bool aa = p->testRenderHint(QPainter::Antialiasing); + p->setRenderHint(QPainter::Antialiasing); + + QColor col = opt->palette.color(QPalette::Dark); + + if(opt->state & State_MouseOver) + { + QColor highlightCol = opt->palette.color(QPalette::Highlight); + + col.setRedF(col.redF() * 0.6 + highlightCol.redF() * 0.4); + col.setGreenF(col.greenF() * 0.6 + highlightCol.greenF() * 0.4); + col.setBlueF(col.blueF() * 0.6 + highlightCol.blueF() * 0.4); + } + + p->setPen(QPen(col, 2.0)); + + QPainterPath path; + + QPolygonF poly; + + QRectF rect = opt->rect; + + { + qreal newdim = qMin(14.0, qMin(rect.height(), rect.width())); + QPointF c = rect.center(); + rect.setTop(c.y() - newdim / 2); + rect.setLeft(c.x() - newdim / 2); + rect.setWidth(newdim); + rect.setHeight(newdim); + } + + rect = rect.adjusted(2, 2, -2, -2); + + if(opt->state & State_Open) + { + QPointF pt = rect.center(); + pt.setX(rect.left()); + poly << pt; + + pt = rect.center(); + pt.setY(rect.bottom()); + poly << pt; + + pt = rect.center(); + pt.setX(rect.right()); + poly << pt; + + path.addPolygon(poly); + + p->drawPath(path); + } + else + { + QPointF pt = rect.center(); + pt.setY(rect.top()); + poly << pt; + + pt = rect.center(); + pt.setX(rect.right()); + poly << pt; + + pt = rect.center(); + pt.setY(rect.bottom()); + poly << pt; + + path.addPolygon(poly); + + p->drawPath(path); + } + + if(!aa) + p->setRenderHint(QPainter::Antialiasing, false); + } + else if(opt->state & (State_Sibling | State_Item)) + { + p->setPen(QPen(opt->palette.color(QPalette::Midlight), 1.0)); + + int bottomY = opt->rect.center().y(); + + if(opt->state & State_Sibling) + bottomY = opt->rect.bottom(); + + p->drawLine(QLine(opt->rect.center().x(), opt->rect.top(), opt->rect.center().x(), bottomY)); + + if(opt->state & State_Item) + p->drawLine(opt->rect.center(), QPoint(opt->rect.right(), opt->rect.center().y())); + } + p->setPen(oldPen); + return; + } + else if(element == PE_IndicatorTabClose) + { + QPen oldPen = p->pen(); + bool aa = p->testRenderHint(QPainter::Antialiasing); + p->setRenderHint(QPainter::Antialiasing); + + QColor col = opt->palette.color(QPalette::Text); + + QRectF rect = opt->rect.adjusted(1, 1, -1, -1); + + if(opt->state & (QStyle::State_Raised | QStyle::State_Sunken | QStyle::State_MouseOver)) + { + QPointF c = rect.center(); + qreal radius = rect.width() / 2.0; + + col = opt->palette.color(QPalette::Base); + + QPainterPath path; + + path.addEllipse(c, radius, radius); + + QColor fillCol = QColor(Qt::red).darker(120); + + if(opt->state & QStyle::State_Sunken) + fillCol = fillCol.darker(120); + + p->fillPath(path, fillCol); + } + + p->setPen(QPen(col, 1.5)); + + QPointF c = rect.center(); + + qreal crossrad = rect.width() / 4.0; + + p->drawLine(c + QPointF(-crossrad, -crossrad), c + QPointF(crossrad, crossrad)); + p->drawLine(c + QPointF(-crossrad, crossrad), c + QPointF(crossrad, -crossrad)); + + p->setPen(oldPen); + if(!aa) + p->setRenderHint(QPainter::Antialiasing, false); + + return; + } + + QProxyStyle::drawPrimitive(element, opt, p, widget); +} + +void RDTweakedNativeStyle::drawControl(ControlElement control, const QStyleOption *opt, QPainter *p, + const QWidget *widget) const +{ + QProxyStyle::drawControl(control, opt, p, widget); +} diff --git a/qrenderdoc/Styles/RDTweakedNativeStyle/RDTweakedNativeStyle.h b/qrenderdoc/Styles/RDTweakedNativeStyle/RDTweakedNativeStyle.h new file mode 100644 index 000000000..f7ba6dbfa --- /dev/null +++ b/qrenderdoc/Styles/RDTweakedNativeStyle/RDTweakedNativeStyle.h @@ -0,0 +1,54 @@ +/****************************************************************************** + * The MIT License (MIT) + * + * Copyright (c) 2017 Baldur Karlsson + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#pragma once + +#include +#include + +class RDTweakedNativeStyle : public QProxyStyle +{ +private: + Q_OBJECT +public: + RDTweakedNativeStyle(); + ~RDTweakedNativeStyle(); + + virtual QRect subElementRect(SubElement element, const QStyleOption *option, + const QWidget *widget) const override; + virtual QSize sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &size, + const QWidget *widget) const override; + virtual int pixelMetric(PixelMetric metric, const QStyleOption *option = NULL, + const QWidget *widget = NULL) const override; + virtual QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = NULL, + const QWidget *widget = NULL) const override; + virtual void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, + QPainter *painter, const QWidget *widget = NULL) const override; + virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget = NULL) const override; + virtual void drawControl(ControlElement control, const QStyleOption *option, QPainter *painter, + const QWidget *widget = NULL) const override; + +protected: +}; diff --git a/qrenderdoc/qrenderdoc.pro b/qrenderdoc/qrenderdoc.pro index 3ff87bdfe..5a8123b6d 100644 --- a/qrenderdoc/qrenderdoc.pro +++ b/qrenderdoc/qrenderdoc.pro @@ -167,6 +167,7 @@ SOURCES += Code/qrenderdoc.cpp \ Code/Interface/PersistantConfig.cpp \ Code/Interface/RemoteHost.cpp \ Styles/RDStyle/RDStyle.cpp \ + Styles/RDTweakedNativeStyle/RDTweakedNativeStyle.cpp \ Windows/Dialogs/AboutDialog.cpp \ Windows/MainWindow.cpp \ Windows/EventBrowser.cpp \ @@ -229,6 +230,7 @@ HEADERS += Code/CaptureContext.h \ Code/Interface/PersistantConfig.h \ Code/Interface/RemoteHost.h \ Styles/RDStyle/RDStyle.h \ + Styles/RDTweakedNativeStyle/RDTweakedNativeStyle.h \ Windows/Dialogs/AboutDialog.h \ Windows/MainWindow.h \ Windows/EventBrowser.h \ diff --git a/qrenderdoc/qrenderdoc_local.vcxproj b/qrenderdoc/qrenderdoc_local.vcxproj index 2ec46246b..e349e624d 100644 --- a/qrenderdoc/qrenderdoc_local.vcxproj +++ b/qrenderdoc/qrenderdoc_local.vcxproj @@ -574,6 +574,7 @@ + @@ -670,6 +671,7 @@ + @@ -908,6 +910,12 @@ MOC %(Filename).h $(IntDir)generated\moc_%(Filename).cpp + + %(Fullpath);$(ProjectDir)3rdparty\qt\$(Platform)\bin\moc.exe;%(AdditionalInputs) + "$(ProjectDir)3rdparty\qt\$(Platform)\bin\moc.exe" -DUNICODE -DWIN32 -DWIN64 -D_WIN32 -D_WIN64 -DRENDERDOC_PLATFORM_WIN32 -DSCINTILLA_QT=1 -DSCI_LEXER=1 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -D_MSC_VER=1900 -I"$(ProjectDir)." -I"$(SolutionDir)\renderdoc\api\replay" -I"$(ProjectDir)3rdparty\qt\$(Platform)\mkspecs/win32-msvc2015" -I"$(ProjectDir)3rdparty\qt\$(Platform)\include" -I"$(ProjectDir)3rdparty\qt\$(Platform)\include\QtWidgets" -I"$(ProjectDir)3rdparty\qt\$(Platform)\include\QtGui" -I"$(ProjectDir)3rdparty\qt\$(Platform)\include\QtCore" "%(Fullpath)" -o "$(IntDir)generated\moc_%(Filename).cpp" + MOC %(Filename).h + $(IntDir)generated\moc_%(Filename).cpp + diff --git a/qrenderdoc/qrenderdoc_local.vcxproj.filters b/qrenderdoc/qrenderdoc_local.vcxproj.filters index 47b068318..6c476fad5 100644 --- a/qrenderdoc/qrenderdoc_local.vcxproj.filters +++ b/qrenderdoc/qrenderdoc_local.vcxproj.filters @@ -79,6 +79,9 @@ {1e176174-0c57-44df-82b1-638ced184b72} + + {c0be5204-4ee0-4948-87b4-cc957b6f8953} + @@ -639,6 +642,12 @@ Generated Files + + Generated Files + + + Styles\RDTweakedNativeStyle + @@ -1427,5 +1436,8 @@ Styles\RDStyle + + Styles\RDTweakedNativeStyle + \ No newline at end of file