Add color tools inside the capture editor
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user