Fix sidebar slider not resizing (#2530)
This commit is contained in:
@@ -1225,6 +1225,7 @@ void CaptureWidget::handleToolSignal(CaptureTool::Request r)
|
||||
*/
|
||||
void CaptureWidget::onToolSizeChanged(int t)
|
||||
{
|
||||
m_context.toolSize = t;
|
||||
CaptureTool* tool = activeButtonTool();
|
||||
if (tool && tool->showMousePreview()) {
|
||||
setCursor(Qt::BlankCursor);
|
||||
@@ -1247,6 +1248,7 @@ void CaptureWidget::onToolSizeChanged(int t)
|
||||
drawToolsData();
|
||||
updateTool(toolItem);
|
||||
}
|
||||
|
||||
// Force a repaint to prevent artifacting
|
||||
this->repaint();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ SidePanelWidget::SidePanelWidget(QPixmap* p, QWidget* parent)
|
||||
, m_pixmap(p)
|
||||
{
|
||||
|
||||
if (parent) {
|
||||
if (parent != nullptr) {
|
||||
parent->installEventFilter(this);
|
||||
}
|
||||
|
||||
@@ -101,11 +101,11 @@ SidePanelWidget::SidePanelWidget(QPixmap* p, QWidget* parent)
|
||||
&SidePanelWidget::colorChanged);
|
||||
}
|
||||
|
||||
void SidePanelWidget::onColorChanged(const QColor& c)
|
||||
void SidePanelWidget::onColorChanged(const QColor& color)
|
||||
{
|
||||
m_color = c;
|
||||
updateColorNoWheel(c);
|
||||
m_colorWheel->setColor(c);
|
||||
m_color = color;
|
||||
updateColorNoWheel(color);
|
||||
m_colorWheel->setColor(color);
|
||||
}
|
||||
|
||||
void SidePanelWidget::onToolSizeChanged(int t)
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
|
||||
signals:
|
||||
void colorChanged(const QColor& color);
|
||||
void toolSizeChanged(int tootl);
|
||||
void toolSizeChanged(int size);
|
||||
void togglePanel();
|
||||
|
||||
public slots:
|
||||
|
||||
Reference in New Issue
Block a user