Miscellaneous small fixes (#1972)

* m_captureWindow->activateWindow(), raise()

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Revert "m_captureWindow->activateWindow(), raise()"

This reverts commit 36320aa38a9584864a5fab32a2ce4872ff5ad072.

* screen --number: indicate 0-indexation

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Fix color update bug

Also refactored SidePanelWidget sigslots related to color change.

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Stop creating empty flameshot.conf file

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
This commit is contained in:
Haris Gušić
2021-10-17 17:38:16 +02:00
committed by GitHub
parent f88c98b286
commit b05b028861
5 changed files with 29 additions and 24 deletions

View File

@@ -184,7 +184,10 @@ CaptureWidget::CaptureWidget(uint id,
connect(m_colorPicker,
&ColorPicker::colorSelected,
this,
&CaptureWidget::setDrawColor);
[this](const QColor& c) {
m_context.mousePos = mapFromGlobal(QCursor::pos());
setDrawColor(c);
});
m_colorPicker->hide();
// Init notification widget
@@ -950,7 +953,7 @@ void CaptureWidget::initPanel()
connect(this,
&CaptureWidget::colorChanged,
m_sidePanel,
&SidePanelWidget::updateColor);
&SidePanelWidget::onColorChanged);
connect(this,
&CaptureWidget::thicknessChanged,
m_sidePanel,
@@ -1150,6 +1153,8 @@ void CaptureWidget::setDrawColor(const QColor& c)
if (m_context.color.isValid()) {
ConfigHandler().setDrawColor(m_context.color);
emit colorChanged(c);
// Update mouse preview
updateTool(activeButtonTool());
// change color for the active tool
auto toolItem = activeToolObject();