mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 09:30:44 +00:00
Change shader edit controls from Ctrl-S / save to F5 / Refresh
* This is a bit less ambiguous and less confusing in the case where someone is expecting a "compile" type button instead of "save changes" type button.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
RESOURCE_DEF(arrow_in, "arrow_in.png") \
|
||||
RESOURCE_DEF(arrow_join, "arrow_join.png") \
|
||||
RESOURCE_DEF(arrow_left, "arrow_left.png") \
|
||||
RESOURCE_DEF(arrow_refresh, "arrow_refresh.png") \
|
||||
RESOURCE_DEF(arrow_right, "arrow_right.png") \
|
||||
RESOURCE_DEF(arrow_undo, "arrow_undo.png") \
|
||||
RESOURCE_DEF(asterisk_orange, "asterisk_orange.png") \
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 674 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
@@ -25,6 +25,8 @@
|
||||
<file>arrow_join@2x.png</file>
|
||||
<file>arrow_left.png</file>
|
||||
<file>arrow_left@2x.png</file>
|
||||
<file>arrow_refresh.png</file>
|
||||
<file>arrow_refresh@2x.png</file>
|
||||
<file>arrow_out.png</file>
|
||||
<file>arrow_out@2x.png</file>
|
||||
<file>arrow_right.png</file>
|
||||
|
||||
@@ -210,6 +210,9 @@ void ShaderViewer::editShader(bool customShader, const QString &entryPoint, cons
|
||||
ui->snippets->setVisible(customShader);
|
||||
|
||||
// hide debugging toolbar buttons
|
||||
ui->debugSep->hide();
|
||||
ui->runBack->hide();
|
||||
ui->run->hide();
|
||||
ui->stepBack->hide();
|
||||
ui->stepNext->hide();
|
||||
ui->runToCursor->hide();
|
||||
@@ -242,8 +245,10 @@ void ShaderViewer::editShader(bool customShader, const QString &entryPoint, cons
|
||||
m_FindState = FindState();
|
||||
});
|
||||
|
||||
m_Ctx.GetMainWindow()->RegisterShortcut(QKeySequence(QKeySequence::Save).toString(), this,
|
||||
[this]() { on_save_clicked(); });
|
||||
m_Ctx.GetMainWindow()->RegisterShortcut(QKeySequence(QKeySequence::Refresh).toString(), this,
|
||||
[this]() { on_refresh_clicked(); });
|
||||
ui->refresh->setToolTip(ui->refresh->toolTip() +
|
||||
lit(" (%1)").arg(QKeySequence(QKeySequence::Refresh).toString()));
|
||||
|
||||
QWidget *w = (QWidget *)scintilla;
|
||||
w->setProperty("filename", kv.first);
|
||||
@@ -408,6 +413,9 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
|
||||
ToolWindowManager::raiseToolWindow(sel);
|
||||
}
|
||||
|
||||
// hide edit buttons
|
||||
ui->editSep->hide();
|
||||
ui->refresh->hide();
|
||||
ui->snippets->hide();
|
||||
|
||||
if(trace)
|
||||
@@ -506,6 +514,9 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
|
||||
ui->constants->hide();
|
||||
|
||||
// hide debugging toolbar buttons
|
||||
ui->debugSep->hide();
|
||||
ui->runBack->hide();
|
||||
ui->run->hide();
|
||||
ui->stepBack->hide();
|
||||
ui->stepNext->hide();
|
||||
ui->runToCursor->hide();
|
||||
@@ -2106,7 +2117,7 @@ void ShaderViewer::on_findReplace_clicked()
|
||||
m_FindReplace->takeFocus();
|
||||
}
|
||||
|
||||
void ShaderViewer::on_save_clicked()
|
||||
void ShaderViewer::on_refresh_clicked()
|
||||
{
|
||||
if(m_Trace)
|
||||
{
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
private slots:
|
||||
// automatic slots
|
||||
void on_findReplace_clicked();
|
||||
void on_save_clicked();
|
||||
void on_refresh_clicked();
|
||||
void on_intView_clicked();
|
||||
void on_floatView_clicked();
|
||||
|
||||
|
||||
@@ -153,9 +153,9 @@
|
||||
<widget class="QFrame" name="toolbar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<x>20</x>
|
||||
<y>10</y>
|
||||
<width>388</width>
|
||||
<width>1132</width>
|
||||
<height>28</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -199,12 +199,15 @@
|
||||
<string>Find & Replace</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>Find</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/find.png</normaloff>:/find.png</iconset>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -218,16 +221,19 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="save">
|
||||
<widget class="QToolButton" name="refresh">
|
||||
<property name="toolTip">
|
||||
<string>Compile & Save changes</string>
|
||||
<string>Compile Shader & Refresh changes</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>Refresh</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/save.png</normaloff>:/save.png</iconset>
|
||||
<normaloff>:/arrow_refresh.png</normaloff>:/arrow_refresh.png</iconset>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
@@ -240,7 +246,7 @@
|
||||
<string>Insert built-in snippets</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>Insert...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
@@ -249,6 +255,9 @@
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -267,12 +276,15 @@
|
||||
<string>Run backwards (Shift-F5)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>Run backwards</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/control_start_blue.png</normaloff>:/control_start_blue.png</iconset>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -284,12 +296,15 @@
|
||||
<string>Step Back (Shift-F10)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>Step Back</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/control_reverse_blue.png</normaloff>:/control_reverse_blue.png</iconset>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -301,12 +316,15 @@
|
||||
<string>Step Next (F10)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>Step Next</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/control_play_blue.png</normaloff>:/control_play_blue.png</iconset>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -318,12 +336,15 @@
|
||||
<string>Run forwards (F5)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>Run forwards</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/control_end_blue.png</normaloff>:/control_end_blue.png</iconset>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -347,10 +368,16 @@
|
||||
<property name="toolTip">
|
||||
<string>Run to Cursor (Ctrl-F10)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Run to Cursor</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/control_cursor_blue.png</normaloff>:/control_cursor_blue.png</iconset>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -367,10 +394,16 @@
|
||||
<property name="toolTip">
|
||||
<string>Run to Sample/Load/Gather</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Run to Sample</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/control_sample_blue.png</normaloff>:/control_sample_blue.png</iconset>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -387,10 +420,16 @@
|
||||
<property name="toolTip">
|
||||
<string>Run to NaN or Inf</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Run to NaN/Inf</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/control_nan_blue.png</normaloff>:/control_nan_blue.png</iconset>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -453,8 +492,8 @@
|
||||
<widget class="RDTableWidget" name="watch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>710</x>
|
||||
<y>20</y>
|
||||
<x>390</x>
|
||||
<y>90</y>
|
||||
<width>151</width>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
|
||||
@@ -1756,6 +1756,8 @@ IF %ERRORLEVEL% NEQ 0 (echo ====================================================
|
||||
<Image Include="Resources\arrow_join.png" />
|
||||
<Image Include="Resources\arrow_left%402x.png" />
|
||||
<Image Include="Resources\arrow_left.png" />
|
||||
<Image Include="Resources\arrow_refresh%402x.png" />
|
||||
<Image Include="Resources\arrow_refresh.png" />
|
||||
<Image Include="Resources\arrow_out%402x.png" />
|
||||
<Image Include="Resources\arrow_out.png" />
|
||||
<Image Include="Resources\arrow_right%402x.png" />
|
||||
|
||||
Reference in New Issue
Block a user