mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-29 09:56:39 +00:00
Hook up autofit right-click shortcut, to always autofit
This commit is contained in:
@@ -2682,8 +2682,8 @@ void TextureViewer::OnEventChanged(uint32_t eventId)
|
||||
|
||||
INVOKE_MEMFN(RT_UpdateAndDisplay);
|
||||
|
||||
// if(autoFit.Checked)
|
||||
// AutoFitRange();
|
||||
if(ui->autoFit->isChecked())
|
||||
AutoFitRange();
|
||||
}
|
||||
|
||||
QVariant TextureViewer::persistData()
|
||||
@@ -2993,6 +2993,12 @@ void TextureViewer::on_autoFit_clicked()
|
||||
AutoFitRange();
|
||||
}
|
||||
|
||||
void TextureViewer::on_autoFit_mouseClicked(QMouseEvent *e)
|
||||
{
|
||||
if(e->buttons() & Qt::RightButton)
|
||||
ui->autoFit->toggle();
|
||||
}
|
||||
|
||||
void TextureViewer::on_reset01_clicked()
|
||||
{
|
||||
UI_SetHistogramRange(GetCurrentTexture(), m_TexDisplay.typeHint);
|
||||
|
||||
@@ -155,6 +155,7 @@ private slots:
|
||||
|
||||
void on_zoomRange_clicked();
|
||||
void on_autoFit_clicked();
|
||||
void on_autoFit_mouseClicked(QMouseEvent *e);
|
||||
void on_reset01_clicked();
|
||||
void on_visualiseRange_clicked();
|
||||
void on_backcolorPick_clicked();
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="autoFit">
|
||||
<widget class="RDToolButton" name="autoFit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -165,6 +165,9 @@
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/wand.png</normaloff>:/wand.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -1274,11 +1277,6 @@ See FAQ on "Gamma display of linear data"</string>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>RDLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>Widgets/Extended/RDLineEdit.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ToolWindowManager</class>
|
||||
<extends>QWidget</extends>
|
||||
@@ -1289,6 +1287,11 @@ See FAQ on "Gamma display of linear data"</string>
|
||||
<extends>QWidget</extends>
|
||||
<header>Widgets/CustomPaintWidget.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>RDLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>Widgets/Extended/RDLineEdit.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ThumbnailStrip</class>
|
||||
<extends>QWidget</extends>
|
||||
|
||||
Reference in New Issue
Block a user