forked from qt-creator/qt-creator
ScreenRecorder: Make dialog less cluttered and non-resizable
The "Trim and Crop..." button now jas a static text and shows crop and trim details via tooltip. The confusing resizability of the dialog is prevented. Change-Id: If967d8014a0751f7d2360bf7b239bf22f070024c Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -688,6 +688,7 @@ CropAndTrimWidget::CropAndTrimWidget(QWidget *parent)
|
|||||||
: StyledBar(parent)
|
: StyledBar(parent)
|
||||||
{
|
{
|
||||||
m_button = new QToolButton;
|
m_button = new QToolButton;
|
||||||
|
m_button->setText(Tr::tr("Crop and Trim..."));
|
||||||
|
|
||||||
m_cropSizeWarningIcon = new CropSizeWarningIcon(CropSizeWarningIcon::ToolBarVariant);
|
m_cropSizeWarningIcon = new CropSizeWarningIcon(CropSizeWarningIcon::ToolBarVariant);
|
||||||
|
|
||||||
@@ -727,6 +728,7 @@ void CropAndTrimWidget::setClip(const ClipInfo &clip)
|
|||||||
|
|
||||||
void CropAndTrimWidget::updateWidgets()
|
void CropAndTrimWidget::updateWidgets()
|
||||||
{
|
{
|
||||||
|
if (!m_clipInfo.isNull()) {
|
||||||
const QString cropText =
|
const QString cropText =
|
||||||
!m_clipInfo.isCompleteArea(m_cropRect)
|
!m_clipInfo.isCompleteArea(m_cropRect)
|
||||||
? Tr::tr("Crop to %1x%2px.").arg(m_cropRect.width()).arg(m_cropRect.height())
|
? Tr::tr("Crop to %1x%2px.").arg(m_cropRect.width()).arg(m_cropRect.height())
|
||||||
@@ -737,7 +739,9 @@ void CropAndTrimWidget::updateWidgets()
|
|||||||
? Tr::tr("Frames %1 to %2.").arg(m_trimRange.first).arg(m_trimRange.second)
|
? Tr::tr("Frames %1 to %2.").arg(m_trimRange.first).arg(m_trimRange.second)
|
||||||
: Tr::tr("Complete clip.");
|
: Tr::tr("Complete clip.");
|
||||||
|
|
||||||
m_button->setText(cropText + " " + trimText + "..");
|
m_button->setToolTip(cropText + " " + trimText);
|
||||||
|
}
|
||||||
|
|
||||||
m_cropSizeWarningIcon->setCropSize(m_cropRect.size());
|
m_cropSizeWarningIcon->setCropSize(m_cropRect.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -174,6 +174,8 @@ RecordWidget::RecordWidget(const FilePath &recordFile, QWidget *parent)
|
|||||||
: StyledBar(parent)
|
: StyledBar(parent)
|
||||||
, m_recordFile(recordFile)
|
, m_recordFile(recordFile)
|
||||||
{
|
{
|
||||||
|
setMinimumWidth(220);
|
||||||
|
|
||||||
m_process = new Process(this);
|
m_process = new Process(this);
|
||||||
m_process->setUseCtrlCStub(true);
|
m_process->setUseCtrlCStub(true);
|
||||||
m_process->setProcessMode(ProcessMode::Writer);
|
m_process->setProcessMode(ProcessMode::Writer);
|
||||||
|
@@ -44,7 +44,6 @@ public:
|
|||||||
, m_recordFile("XXXXXX" + RecordWidget::recordFileExtension())
|
, m_recordFile("XXXXXX" + RecordWidget::recordFileExtension())
|
||||||
{
|
{
|
||||||
setWindowTitle(Tr::tr("Record Screen"));
|
setWindowTitle(Tr::tr("Record Screen"));
|
||||||
setMinimumWidth(320);
|
|
||||||
StyleHelper::setPanelWidget(this);
|
StyleHelper::setPanelWidget(this);
|
||||||
|
|
||||||
m_recordFile.open();
|
m_recordFile.open();
|
||||||
@@ -89,6 +88,8 @@ public:
|
|||||||
|
|
||||||
m_spinner = new SpinnerSolution::Spinner(SpinnerSolution::SpinnerSize::Medium, this);
|
m_spinner = new SpinnerSolution::Spinner(SpinnerSolution::SpinnerSize::Medium, this);
|
||||||
m_spinner->hide();
|
m_spinner->hide();
|
||||||
|
|
||||||
|
layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user