Fix widths

This commit is contained in:
Jeremy Bullock 2020-05-12 00:54:11 -06:00
parent 22d9f96232
commit 195eae456d

View file

@ -2402,8 +2402,7 @@ protected:
p.setPen(Qt::black);
p.setBrush(Qt::NoBrush);
p.drawText(rect(), Qt::AlignCenter,
QString("R:%1 G:%2 B:%3")
p.drawText(rect(), Qt::AlignCenter, QString("R:%1 G:%2 B:%3")
.arg(m_color.red())
.arg(m_color.green())
.arg(m_color.blue()));
@ -2425,6 +2424,8 @@ RGBPickerToolOptionsBox::RGBPickerToolOptionsBox(
CommandManager::instance()->getAction("A_ToolOption_PickScreen");
QPushButton *button = new QPushButton(tr("Pick Screen"));
int buttonWidth = fontMetrics().width(button->text()) + 10;
button->setFixedWidth(buttonWidth);
button->setFixedHeight(20);
button->addAction(pickScreenAction);
connect(button, SIGNAL(clicked()), pickScreenAction, SLOT(trigger()));
@ -2440,7 +2441,8 @@ RGBPickerToolOptionsBox::RGBPickerToolOptionsBox(
m_layout->addWidget(m_currentRGBLabel, 0);
m_layout->addStretch(1);
m_layout->addWidget(button, 0); // new in 6.4
m_layout->addWidget(button, 0);
m_layout->addSpacing(5);
if (m_realTimePickMode) {
connect(m_realTimePickMode, SIGNAL(toggled(bool)), m_currentRGBLabel,
@ -2503,8 +2505,9 @@ StylePickerToolOptionsBox::StylePickerToolOptionsBox(
ToolOptionCheckbox *organizePaletteCB =
dynamic_cast<ToolOptionCheckbox *>(m_controls.value("Organize Palette"));
m_layout->removeWidget(organizePaletteCB);
m_layout->addWidget(new ToolOptionsBarSeparator(this), 0);
// m_layout->addWidget(new ToolOptionsBarSeparator(this), 0);
m_layout->addWidget(organizePaletteCB);
m_layout->addSpacing(5);
organizePaletteCB->setToolTip(
tr("With this option being activated, the picked style will be\nmoved to "
"the end of the first page of the palette."));
@ -2685,15 +2688,20 @@ ZoomToolOptionsBox::ZoomToolOptionsBox(QWidget *parent, TTool *tool,
setFrameStyle(QFrame::StyledPanel);
setFixedHeight(26);
QAction *resetZoomAction = CommandManager::instance()->getAction(VB_ZoomReset);
QAction *resetZoomAction =
CommandManager::instance()->getAction(VB_ZoomReset);
QPushButton *button = new QPushButton(tr("Reset Zoom"));
int buttonWidth = fontMetrics().width(button->text()) + 10;
button->setFixedWidth(buttonWidth);
button->setFixedHeight(20);
button->addAction(resetZoomAction);
connect(button, SIGNAL(clicked()), resetZoomAction, SLOT(trigger()));
m_layout->addStretch(1);
m_layout->addWidget(button, 0);
m_layout->addSpacing(5);
}
//=============================================================================
@ -2711,12 +2719,16 @@ RotateToolOptionsBox::RotateToolOptionsBox(QWidget *parent, TTool *tool,
CommandManager::instance()->getAction(VB_RotateReset);
QPushButton *button = new QPushButton(tr("Reset Rotation"));
int buttonWidth = fontMetrics().width(button->text()) + 10;
button->setFixedWidth(buttonWidth);
button->setFixedHeight(20);
button->addAction(resetRotationAction);
connect(button, SIGNAL(clicked()), resetRotationAction, SLOT(trigger()));
m_layout->addStretch(1);
m_layout->addWidget(button, 0);
m_layout->addSpacing(5);
}
//=============================================================================
@ -2734,12 +2746,16 @@ HandToolOptionsBox::HandToolOptionsBox(QWidget *parent, TTool *tool,
CommandManager::instance()->getAction(VB_PositionReset);
QPushButton *button = new QPushButton(tr("Reset Position"));
int buttonWidth = fontMetrics().width(button->text()) + 10;
button->setFixedWidth(buttonWidth);
button->setFixedHeight(20);
button->addAction(resetPositionAction);
connect(button, SIGNAL(clicked()), resetPositionAction, SLOT(trigger()));
m_layout->addStretch(1);
m_layout->addWidget(button, 0);
m_layout->addSpacing(5);
}
//=============================================================================