mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Set cursors properly on render container, make status bar a flowlayout
This commit is contained in:
@@ -6,6 +6,7 @@ CustomPaintWidget::CustomPaintWidget(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
m_Output = NULL;
|
||||
setAttribute(Qt::WA_PaintOnScreen);
|
||||
setMouseTracking(true);
|
||||
}
|
||||
|
||||
CustomPaintWidget::~CustomPaintWidget()
|
||||
|
||||
@@ -136,6 +136,22 @@ TextureViewer::TextureViewer(Core *core, QWidget *parent)
|
||||
Ui_TextureViewer *u = ui;
|
||||
u->pixelcontextgrid->setAlignment(u->pushButton, Qt::AlignCenter);
|
||||
u->pixelcontextgrid->setAlignment(u->pushButton_2, Qt::AlignCenter);
|
||||
|
||||
QWidget *statusflowWidget = new QWidget(this);
|
||||
|
||||
FlowLayout *statusflow = new FlowLayout(statusflowWidget, 0, 3, 0);
|
||||
|
||||
statusflowWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
ui->statusbar->removeWidget(ui->texStatusDim);
|
||||
ui->statusbar->removeWidget(ui->pickSwatch);
|
||||
ui->statusbar->removeWidget(ui->statusText);
|
||||
|
||||
statusflow->addWidget(ui->texStatusDim);
|
||||
statusflow->addWidget(ui->pickSwatch);
|
||||
statusflow->addWidget(ui->statusText);
|
||||
|
||||
ui->statusbar->addWidget(statusflowWidget);
|
||||
}
|
||||
|
||||
TextureViewer::~TextureViewer()
|
||||
@@ -387,7 +403,7 @@ void TextureViewer::on_render_mousemove(QMouseEvent *e)
|
||||
{
|
||||
if(e->buttons() & Qt::RightButton)
|
||||
{
|
||||
// ui->render->setCursor(cross);
|
||||
ui->render->setCursor(QCursor(Qt::CrossCursor));
|
||||
|
||||
m_PickedPoint = m_CurHoverPixel;
|
||||
|
||||
@@ -423,12 +439,12 @@ void TextureViewer::on_render_mousemove(QMouseEvent *e)
|
||||
m_DragStartScroll.Y + (curpos.Y - m_DragStartPos.Y));
|
||||
}*/
|
||||
|
||||
// ui->render->setCursor(move2D);
|
||||
ui->render->setCursor(QCursor(Qt::SizeAllCursor));
|
||||
}
|
||||
|
||||
if(e->buttons() == Qt::NoButton)
|
||||
{
|
||||
// ui->render->setCursor(default);
|
||||
ui->render->setCursor(QCursor(Qt::ArrowCursor));
|
||||
}
|
||||
|
||||
UI_UpdateStatusText();
|
||||
@@ -534,7 +550,7 @@ void TextureViewer::OnEventSelected(uint32_t eventID)
|
||||
d.FlipY = false;
|
||||
d.rangemin = 0.0f;
|
||||
d.rangemax = 1.0f;
|
||||
d.scale = -1.0f;
|
||||
d.scale = 1.0f;
|
||||
d.offx = 0.0f;
|
||||
d.offy = 0.0f;
|
||||
d.sliceFace = 0;
|
||||
|
||||
@@ -768,6 +768,18 @@
|
||||
<height>241</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
@@ -797,9 +809,6 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>CrossCursor</cursorShape>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
@@ -881,19 +890,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user