Refactor tool size handling (#1969)
* Add ConfigHandler::toolSize and setToolSize * Refactor thickness (now toolSize) in CaptureWidget Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Fix update of tool size while object is drawn Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Rename thickness to tool size across the board Tool size is the generic term. Depending on the selected tool, different specialized names are used. This has always been the case in the config. Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * Reorder circle count tool Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> * clang-format Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
This commit is contained in:
@@ -248,7 +248,7 @@ void TextTool::drawMove(const QPoint& p)
|
||||
void TextTool::drawStart(const CaptureContext& context)
|
||||
{
|
||||
m_color = context.color;
|
||||
m_size = context.thickness;
|
||||
m_size = context.toolSize;
|
||||
emit requestAction(REQ_ADD_CHILD_WIDGET);
|
||||
}
|
||||
|
||||
@@ -265,9 +265,9 @@ void TextTool::onColorChanged(const QColor& c)
|
||||
}
|
||||
}
|
||||
|
||||
void TextTool::onThicknessChanged(int th)
|
||||
void TextTool::onSizeChanged(int size)
|
||||
{
|
||||
m_size = th;
|
||||
m_size = size;
|
||||
m_font.setPointSize(m_size + BASE_POINT_SIZE);
|
||||
if (m_widget) {
|
||||
m_widget->setFont(m_font);
|
||||
|
||||
Reference in New Issue
Block a user