Add color tools inside the capture editor

This commit is contained in:
lupoDharkael
2018-05-16 23:02:30 +02:00
parent 4b8d9ba6b2
commit 6adcfef413
15 changed files with 313 additions and 6 deletions

View File

@@ -23,6 +23,7 @@
#include "capturewidget.h"
#include "src/widgets/capture/hovereventfilter.h"
#include "src/widgets/panel/colorpickerwidget.h"
#include "src/utils/colorutils.h"
#include "src/utils/globalvalues.h"
#include "src/widgets/capture/notifierbox.h"
@@ -526,6 +527,13 @@ void CaptureWidget::initPanel() {
panelRect.setWidth(m_colorPicker->width() * 3);
m_panel->setGeometry(panelRect);
ColorPickerWidget *colorPicker = new ColorPickerWidget(&m_context.screenshot);
connect(colorPicker, &ColorPickerWidget::colorChanged,
this, &CaptureWidget::setDrawColor);
connect(this, &CaptureWidget::colorChanged,
colorPicker, &ColorPickerWidget::updateColor);
colorPicker->colorChanged(m_context.color);
m_panel->pushWidget(colorPicker);
m_panel->pushWidget(new QUndoView(&m_undoStack, this));
}