Toggle panel with Space while grabbing a color

This commit is contained in:
lupoDharkael
2018-05-19 00:55:11 +02:00
parent a8bb555c12
commit 33377d50d5
3 changed files with 8 additions and 2 deletions

View File

@@ -540,11 +540,14 @@ void CaptureWidget::initPanel() {
panelRect.setWidth(m_colorPicker->width() * 3);
m_panel->setGeometry(panelRect);
ColorPickerWidget *colorPicker = new ColorPickerWidget(&m_context.screenshot);
ColorPickerWidget *colorPicker =
new ColorPickerWidget(&m_context.screenshot);
connect(colorPicker, &ColorPickerWidget::colorChanged,
this, &CaptureWidget::setDrawColor);
connect(this, &CaptureWidget::colorChanged,
colorPicker, &ColorPickerWidget::updateColor);
connect(colorPicker, &ColorPickerWidget::togglePanel,
m_panel, &UtilityPanel::toggle);
colorPicker->colorChanged(m_context.color);
m_panel->pushWidget(colorPicker);
m_panel->pushWidget(new QUndoView(&m_undoStack, this));