Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Improve Knife Tool options widget with temp icons
Agata Cackoab2f195e948d
diff --git a/krita/pics/tools/SVG/16/dark_tool_comic_panel_move_point.svg b/krita/pics/tools/SVG/16/dark_tool_comic_panel_move_point.svgnew file mode 100644index 0000000000..635165933c--- /dev/null+++ b/krita/pics/tools/SVG/16/dark_tool_comic_panel_move_point.svg@@ -0,0 +1,13 @@+<?xml version="1.0" standalone="no"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">+<!-- Created using Krita: https://krita.org -->+<svg xmlns="http://www.w3.org/2000/svg"+ xmlns:xlink="http://www.w3.org/1999/xlink"+ xmlns:krita="http://krita.org/namespaces/svg/krita"+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"+ width="3.84pt"+ height="3.84pt"+ viewBox="0 0 3.84 3.84">+<defs/>+<path id="shape0" transform="translate(0.704999995239988, 2.66249998202336)" fill="none" stroke="#373737" stroke-width="0.48" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 1.1775L1.215 0" sodipodi:nodetypes="cc"/><path id="shape1" transform="translate(1.92, 2.66249998202336)" fill="none" stroke="#373737" stroke-width="0.48" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 0L1.5525 1.425" sodipodi:nodetypes="cc"/><path id="shape2" transform="translate(2.54249998283357, 1.92)" fill="none" stroke="#373737" stroke-width="0.48" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 0L1.7925 1.62" sodipodi:nodetypes="cc"/><path id="shape3" transform="translate(2.48999998318804, 0.329999997771909)" fill="none" stroke="#373737" stroke-width="0.48" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 1.59L1.7775 0" sodipodi:nodetypes="cc"/><path id="shape4" transform="translate(0.472499982728184, 0.552149700420371)" fill="none" stroke="#373737" stroke-width="0.24" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 1.57035L1.57035 0" sodipodi:nodetypes="cc"/><path id="shape5" transform="translate(1.25249995421598, 0.524999980809093)" fill="none" stroke="#373737" stroke-width="0.24" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 0L0.7875 0.0825" sodipodi:nodetypes="cc"/><path id="shape6" transform="translate(2.08499992378468, 0.607499977793379)" fill="none" stroke="#373737" stroke-width="0.24" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0.015 0L0 0.5925" sodipodi:nodetypes="cc"/><path id="shape7" transform="translate(0.314999997873188, 1.42874999035339)" fill="none" stroke="#373737" stroke-width="0.24" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0.0675 0L0 0.855" sodipodi:nodetypes="cc"/><path id="shape8" transform="translate(0.314999997873188, 2.28374998458061)" fill="none" stroke="#373737" stroke-width="0.24" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 0L0.7875 0.01125" sodipodi:nodetypes="cc"/>+</svg>diff --git a/krita/pics/tools/SVG/16/dark_tool_comic_panel_scissors.svg b/krita/pics/tools/SVG/16/dark_tool_comic_panel_scissors.svgnew file mode 100644index 0000000000..295e9d65f5--- /dev/null+++ b/krita/pics/tools/SVG/16/dark_tool_comic_panel_scissors.svg@@ -0,0 +1,13 @@+<?xml version="1.0" standalone="no"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">+<!-- Created using Krita: https://krita.org -->+<svg xmlns="http://www.w3.org/2000/svg"+ xmlns:xlink="http://www.w3.org/1999/xlink"+ xmlns:krita="http://krita.org/namespaces/svg/krita"+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"+ width="3.84pt"+ height="3.84pt"+ viewBox="0 0 3.84 3.84">+<defs/>+<path id="shape0" transform="translate(-0.0239999999911826, -0.0239999999876019)" fill="#373737" fill-rule="evenodd" stroke="none" stroke-width="0.24" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M2.106 0.324L2.106 0.486L1.944 0.486L1.944 0.81L2.106 0.81L2.106 0.972L2.268 0.972L2.268 1.134L2.106 1.134L2.106 1.458L1.944 1.458L1.944 1.62L1.782 1.62L1.782 1.782L1.62 1.782L1.62 1.944L1.296 1.944L1.296 2.106L1.134 2.106L1.134 2.268L0.81 2.268L0.81 2.43L0.486 2.43L0.486 2.592L0.324 2.592L0.324 2.916L0.648 2.916L0.648 2.754L0.972 2.754L0.972 2.592L1.134 2.592L1.134 2.43L1.296 2.43L1.296 2.268L1.62 2.268L1.62 2.592L1.458 2.592L1.458 2.754L1.296 2.754L1.296 2.916L1.134 2.916L1.134 3.24L0.972 3.24L0.972 3.564L1.296 3.564L1.296 3.402L1.458 3.402L1.458 3.078L1.62 3.078L1.62 2.754L1.782 2.754L1.782 2.592L1.944 2.592L1.944 2.268L2.106 2.268L2.106 2.106L2.268 2.106L2.268 1.944L2.43 1.944L2.43 1.782L2.754 1.782L2.754 1.62L2.916 1.62L2.916 1.782L3.078 1.782L3.078 1.944L3.402 1.944L3.402 1.782L3.564 1.782L3.564 1.458L3.402 1.458L3.402 1.296L3.078 1.296L3.078 1.458L2.754 1.458L2.754 1.62L2.43 1.62L2.43 1.782L2.106 1.782L2.106 1.458L2.268 1.458L2.268 1.134L2.43 1.134L2.43 0.81L2.592 0.81L2.592 0.486L2.43 0.486L2.43 0.324L2.106 0.324M2.268 0.486L2.43 0.486L2.43 0.81L2.106 0.81L2.106 0.486L2.268 0.486M3.078 1.458L3.402 1.458L3.402 1.782L3.078 1.782L3.078 1.458" sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"/>+</svg>diff --git a/krita/pics/tools/SVG/16/dark_tool_comic_panel_zipper.svg b/krita/pics/tools/SVG/16/dark_tool_comic_panel_zipper.svgnew file mode 100644index 0000000000..83f7b02ffa--- /dev/null+++ b/krita/pics/tools/SVG/16/dark_tool_comic_panel_zipper.svg@@ -0,0 +1,13 @@+<?xml version="1.0" standalone="no"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">+<!-- Created using Krita: https://krita.org -->+<svg xmlns="http://www.w3.org/2000/svg"+ xmlns:xlink="http://www.w3.org/1999/xlink"+ xmlns:krita="http://krita.org/namespaces/svg/krita"+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"+ width="3.84pt"+ height="3.84pt"+ viewBox="0 0 3.84 3.84">+<defs/>+<path id="shape0" fill="#373737" fill-rule="evenodd" stroke="none" stroke-width="1" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0.24 0L0.24 0.24L0 0.24L0 0.72L0.24 0.72L0.24 0.96L0.72 0.96L0.72 1.44L0.96 1.44L0.96 1.92L1.2 1.92L1.2 3.84L1.68 3.84L1.68 3.6L1.92 3.6L1.92 3.36L2.4 3.36L2.4 3.6L2.16 3.6L2.16 3.84L2.4 3.84L2.64 3.84L2.64 1.92L2.88 1.92L2.88 1.44L3.12 1.44L3.12 0.96L3.6 0.96L3.6 0.72L3.84 0.72L3.84 0.48L3.84 0.24L3.6 0.24L3.6 0L3.36 0L3.36 0.48L3.6 0.48L3.6 0.72L2.88 0.72L2.88 0.48L2.64 0.48L2.64 0.96L2.88 0.96L2.88 1.44L2.64 1.44L2.64 1.2L2.16 1.2L2.16 1.44L2.4 1.44L2.4 1.68L2.64 1.68L2.64 1.92L2.4 1.92L2.4 2.16L2.16 2.16L2.16 2.4L1.92 2.4L1.92 2.16L1.68 2.16L1.68 1.92L1.2 1.92L1.2 1.68L1.44 1.68L1.44 1.44L1.68 1.44L1.68 1.2L1.2 1.2L1.2 1.44L0.96 1.44L0.96 0.96L1.2 0.96L1.2 0.48L0.96 0.48L0.96 0.72L0.24 0.72L0.24 0.48L0.48 0.48L0.48 0L0.24 0M1.44 2.4L1.92 2.4L1.92 2.64L2.4 2.64L2.4 2.88L2.16 2.88L2.16 3.12L1.92 3.12L1.92 2.88L1.68 2.88L1.68 2.64L1.44 2.64L1.44 2.4M1.44 3.12L1.92 3.12L1.92 3.36L1.44 3.36L1.44 3.12" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"/>+</svg>diff --git a/krita/pics/tools/SVG/16/light_tool_comic_panel_move_point.svg b/krita/pics/tools/SVG/16/light_tool_comic_panel_move_point.svgnew file mode 100644index 0000000000..d7289b7e04--- /dev/null+++ b/krita/pics/tools/SVG/16/light_tool_comic_panel_move_point.svg@@ -0,0 +1,13 @@+<?xml version="1.0" standalone="no"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">+<!-- Created using Krita: https://krita.org -->+<svg xmlns="http://www.w3.org/2000/svg"+ xmlns:xlink="http://www.w3.org/1999/xlink"+ xmlns:krita="http://krita.org/namespaces/svg/krita"+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"+ width="3.84pt"+ height="3.84pt"+ viewBox="0 0 3.84 3.84">+<defs/>+<path id="shape0" transform="translate(0.704999995239988, 2.66249998202336)" fill="none" stroke="#d2d2d2" stroke-width="0.48" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 1.1775L1.215 0" sodipodi:nodetypes="cc"/><path id="shape1" transform="translate(1.92, 2.66249998202336)" fill="none" stroke="#d2d2d2" stroke-width="0.48" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 0L1.5525 1.425" sodipodi:nodetypes="cc"/><path id="shape2" transform="translate(2.54249998283357, 1.92)" fill="none" stroke="#d2d2d2" stroke-width="0.48" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 0L1.7925 1.62" sodipodi:nodetypes="cc"/><path id="shape3" transform="translate(2.48999998318804, 0.329999997771909)" fill="none" stroke="#d2d2d2" stroke-width="0.48" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 1.59L1.7775 0" sodipodi:nodetypes="cc"/><path id="shape4" transform="translate(0.472499982728184, 0.552149700420371)" fill="none" stroke="#d2d2d2" stroke-width="0.24" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 1.57035L1.57035 0" sodipodi:nodetypes="cc"/><path id="shape5" transform="translate(1.25249995421598, 0.524999980809093)" fill="none" stroke="#d2d2d2" stroke-width="0.24" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 0L0.7875 0.0825" sodipodi:nodetypes="cc"/><path id="shape6" transform="translate(2.08499992378468, 0.607499977793379)" fill="none" stroke="#d2d2d2" stroke-width="0.24" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0.015 0L0 0.5925" sodipodi:nodetypes="cc"/><path id="shape7" transform="translate(0.314999997873188, 1.42874999035339)" fill="none" stroke="#d2d2d2" stroke-width="0.24" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0.0675 0L0 0.855" sodipodi:nodetypes="cc"/><path id="shape8" transform="translate(0.314999997873188, 2.28374998458061)" fill="none" stroke="#d2d2d2" stroke-width="0.24" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0 0L0.7875 0.01125" sodipodi:nodetypes="cc"/>+</svg>diff --git a/krita/pics/tools/SVG/16/light_tool_comic_panel_scissors.svg b/krita/pics/tools/SVG/16/light_tool_comic_panel_scissors.svgnew file mode 100644index 0000000000..cfa12249e2--- /dev/null+++ b/krita/pics/tools/SVG/16/light_tool_comic_panel_scissors.svg@@ -0,0 +1,13 @@+<?xml version="1.0" standalone="no"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">+<!-- Created using Krita: https://krita.org -->+<svg xmlns="http://www.w3.org/2000/svg"+ xmlns:xlink="http://www.w3.org/1999/xlink"+ xmlns:krita="http://krita.org/namespaces/svg/krita"+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"+ width="3.84pt"+ height="3.84pt"+ viewBox="0 0 3.84 3.84">+<defs/>+<path id="shape0" transform="translate(-0.0239999999999971, -0.0240000000000014)" fill="#d2d2d2" fill-rule="evenodd" stroke="none" stroke-width="0.24" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M2.106 0.324L2.106 0.486L1.944 0.486L1.944 0.81L2.106 0.81L2.106 0.972L2.268 0.972L2.268 1.134L2.106 1.134L2.106 1.458L1.944 1.458L1.944 1.62L1.782 1.62L1.782 1.782L1.62 1.782L1.62 1.944L1.296 1.944L1.296 2.106L1.134 2.106L1.134 2.268L0.81 2.268L0.81 2.43L0.486 2.43L0.486 2.592L0.324 2.592L0.324 2.916L0.648 2.916L0.648 2.754L0.972 2.754L0.972 2.592L1.134 2.592L1.134 2.43L1.296 2.43L1.296 2.268L1.62 2.268L1.62 2.592L1.458 2.592L1.458 2.754L1.296 2.754L1.296 2.916L1.134 2.916L1.134 3.24L0.972 3.24L0.972 3.564L1.296 3.564L1.296 3.402L1.458 3.402L1.458 3.078L1.62 3.078L1.62 2.754L1.782 2.754L1.782 2.592L1.944 2.592L1.944 2.268L2.106 2.268L2.106 2.106L2.268 2.106L2.268 1.944L2.43 1.944L2.43 1.782L2.754 1.782L2.754 1.62L2.916 1.62L2.916 1.782L3.078 1.782L3.078 1.944L3.402 1.944L3.402 1.782L3.564 1.782L3.564 1.458L3.402 1.458L3.402 1.296L3.078 1.296L3.078 1.458L2.754 1.458L2.754 1.62L2.43 1.62L2.43 1.782L2.106 1.782L2.106 1.458L2.268 1.458L2.268 1.134L2.43 1.134L2.43 0.81L2.592 0.81L2.592 0.486L2.43 0.486L2.43 0.324L2.106 0.324M2.268 0.486L2.43 0.486L2.43 0.81L2.106 0.81L2.106 0.486L2.268 0.486M3.078 1.458L3.402 1.458L3.402 1.782L3.078 1.782L3.078 1.458" sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"/>+</svg>diff --git a/krita/pics/tools/SVG/16/light_tool_comic_panel_zipper.svg b/krita/pics/tools/SVG/16/light_tool_comic_panel_zipper.svgnew file mode 100644index 0000000000..0f36a1fe13--- /dev/null+++ b/krita/pics/tools/SVG/16/light_tool_comic_panel_zipper.svg@@ -0,0 +1,13 @@+<?xml version="1.0" standalone="no"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">+<!-- Created using Krita: https://krita.org -->+<svg xmlns="http://www.w3.org/2000/svg"+ xmlns:xlink="http://www.w3.org/1999/xlink"+ xmlns:krita="http://krita.org/namespaces/svg/krita"+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"+ width="3.84pt"+ height="3.84pt"+ viewBox="0 0 3.84 3.84">+<defs/>+<path id="shape0" fill="#d2d2d2" fill-rule="evenodd" stroke="none" stroke-width="1" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2" d="M0.24 0L0.24 0.24L0 0.24L0 0.72L0.24 0.72L0.24 0.96L0.72 0.96L0.72 1.44L0.96 1.44L0.96 1.92L1.2 1.92L1.2 3.84L1.68 3.84L1.68 3.6L1.92 3.6L1.92 3.36L2.4 3.36L2.4 3.6L2.16 3.6L2.16 3.84L2.4 3.84L2.64 3.84L2.64 1.92L2.88 1.92L2.88 1.44L3.12 1.44L3.12 0.96L3.6 0.96L3.6 0.72L3.84 0.72L3.84 0.48L3.84 0.24L3.6 0.24L3.6 0L3.36 0L3.36 0.48L3.6 0.48L3.6 0.72L2.88 0.72L2.88 0.48L2.64 0.48L2.64 0.96L2.88 0.96L2.88 1.44L2.64 1.44L2.64 1.2L2.16 1.2L2.16 1.44L2.4 1.44L2.4 1.68L2.64 1.68L2.64 1.92L2.4 1.92L2.4 2.16L2.16 2.16L2.16 2.4L1.92 2.4L1.92 2.16L1.68 2.16L1.68 1.92L1.2 1.92L1.2 1.68L1.44 1.68L1.44 1.44L1.68 1.44L1.68 1.2L1.2 1.2L1.2 1.44L0.96 1.44L0.96 0.96L1.2 0.96L1.2 0.48L0.96 0.48L0.96 0.72L0.24 0.72L0.24 0.48L0.48 0.48L0.48 0L0.24 0M1.44 2.4L1.92 2.4L1.92 2.64L2.4 2.64L2.4 2.88L2.16 2.88L2.16 3.12L1.92 3.12L1.92 2.88L1.68 2.88L1.68 2.64L1.44 2.64L1.44 2.4M1.44 3.12L1.92 3.12L1.92 3.36L1.44 3.36L1.44 3.12" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"/>+</svg>diff --git a/krita/pics/tools/SVG/16/tools-svg-16-icons.qrc b/krita/pics/tools/SVG/16/tools-svg-16-icons.qrcindex 1e3825fc82..9b617674ed 100644--- a/krita/pics/tools/SVG/16/tools-svg-16-icons.qrc+++ b/krita/pics/tools/SVG/16/tools-svg-16-icons.qrc@@ -38,6 +38,9 @@<file>dark_tool_rect_selection.svg</file><file>dark_tool_similar_selection.svg</file><file>dark_tool_zoom.svg</file>+ <file>dark_tool_comic_panel_scissors.svg</file>+ <file>dark_tool_comic_panel_zipper.svg</file>+ <file>dark_tool_comic_panel_move_point.svg</file><file>light_calligraphy.svg</file><file>light_draw-text.svg</file><file>light_format-fill-color.svg</file>@@ -72,6 +75,9 @@<file>light_tool_rect_selection.svg</file><file>light_tool_similar_selection.svg</file><file>light_tool_zoom.svg</file>+ <file>light_tool_comic_panel_scissors.svg</file>+ <file>light_tool_comic_panel_zipper.svg</file>+ <file>light_tool_comic_panel_move_point.svg</file><file>dark_shape_handling.svg</file><file>dark_artistic_text.svg</file><file>light_artistic_text.svg</file>diff --git a/plugins/tools/tool_knife/KisToolKnifeOptionsWidget.cpp b/plugins/tools/tool_knife/KisToolKnifeOptionsWidget.cppindex 95ae66e85a..b917c92511 100644--- a/plugins/tools/tool_knife/KisToolKnifeOptionsWidget.cpp+++ b/plugins/tools/tool_knife/KisToolKnifeOptionsWidget.cpp@@ -14,6 +14,9 @@#include "kis_config.h"#include <resources/KoColorSet.h>#include "kis_canvas_resource_provider.h"+#include <KisOptionButtonStrip.h>+#include <kis_icon_utils.h>+#include <KoGroupButton.h>struct KisToolKnifeOptionsWidget::Private {@@ -22,6 +25,12 @@ struct KisToolKnifeOptionsWidget::Private {}Ui_KisToolKnifeOptionsWidget *ui {nullptr};+ KoGroupButton* buttonModeAddGutter {nullptr};+ KoGroupButton* buttonModeRemoveGutter {nullptr};+ KoGroupButton* buttonModeMoveGutterEndPoint {nullptr};+ //KoGroupButton* m_buttonModeAddGutter {nullptr};++int getThickGapWidth(void){@@ -35,7 +44,7 @@ struct KisToolKnifeOptionsWidget::Private {int getSpecialGapWidth(void){- return ui->specialGapWidth->value();+ return ui->customGapWidth->value();}KisToolKnifeOptionsWidget::GapWidthType getWidthType()@@ -49,7 +58,7 @@ struct KisToolKnifeOptionsWidget::Private {}}- int getWidthForType(GapWidthType type) {+ int getWidthForType(KisToolKnifeOptionsWidget::GapWidthType type) {switch(type) {case KisToolKnifeOptionsWidget::Thick:return getThickGapWidth();@@ -63,12 +72,15 @@ struct KisToolKnifeOptionsWidget::Private {}KisToolKnifeOptionsWidget::ToolMode getToolMode() {- // TODO: obviously gonna be removed later,- // replaced with buttons with icons like the Transform Tool has- if (ui->comboBox->currentText() == "Add a gutter") {+ if (buttonModeAddGutter && buttonModeAddGutter->isChecked()) {return KisToolKnifeOptionsWidget::AddGutter;- } else {+ } else if (buttonModeRemoveGutter && buttonModeRemoveGutter->isChecked()) {return KisToolKnifeOptionsWidget::RemoveGutter;+ } else if (buttonModeMoveGutterEndPoint && buttonModeMoveGutterEndPoint->isChecked()) {+ return KisToolKnifeOptionsWidget::MoveGutterEndPoint;+ } else {+ // default+ return KisToolKnifeOptionsWidget::AddGutter;}}@@ -80,6 +92,27 @@ KisToolKnifeOptionsWidget::KisToolKnifeOptionsWidget(KisCanvasResourceProvider *{m_d->ui = new Ui_KisToolKnifeOptionsWidget();m_d->ui->setupUi(this);+ //m_d->ui->optionButtonStripToolMode->addButton(KisIconUtils::loadIcon("tool_comic_panel_scissors"));+ //KisOptionButtonStrip *optionButtonStripToolMode =+ // new KisOptionButtonStrip;+ m_d->buttonModeAddGutter = m_d->ui->optionButtonStripToolMode->addButton(+ KisIconUtils::loadIcon("tool_comic_panel_scissors"));+ m_d->buttonModeRemoveGutter = m_d->ui->optionButtonStripToolMode->addButton(+ KisIconUtils::loadIcon("tool_comic_panel_zipper"));+ m_d->buttonModeMoveGutterEndPoint = m_d->ui->optionButtonStripToolMode->addButton(+ KisIconUtils::loadIcon("tool_comic_panel_move_point"));++ m_d->buttonModeAddGutter->setChecked(true);+ m_d->buttonModeAddGutter->setMinimumSize(QSize(36, 36));+ m_d->buttonModeRemoveGutter->setMinimumSize(QSize(36, 36));+ m_d->buttonModeAddGutter->setIconSize(QSize(28, 28));+ m_d->buttonModeRemoveGutter->setIconSize(QSize(28, 28));+ m_d->buttonModeMoveGutterEndPoint->setMinimumSize(QSize(36, 36));+ m_d->buttonModeMoveGutterEndPoint->setIconSize(QSize(28, 28));++++ //m_d->ui->mainLayout->addWidget(optionButtonStripToolMode);}KisToolKnifeOptionsWidget::~KisToolKnifeOptionsWidget()diff --git a/plugins/tools/tool_knife/KisToolKnifeOptionsWidget.h b/plugins/tools/tool_knife/KisToolKnifeOptionsWidget.hindex 98f2dab0e1..827f06e393 100644--- a/plugins/tools/tool_knife/KisToolKnifeOptionsWidget.h+++ b/plugins/tools/tool_knife/KisToolKnifeOptionsWidget.h@@ -32,7 +32,8 @@ public:enum ToolMode {AddGutter,- RemoveGutter+ RemoveGutter,+ MoveGutterEndPoint,};int getThickGapWidth(void);diff --git a/plugins/tools/tool_knife/KisToolKnifeOptionsWidget.ui b/plugins/tools/tool_knife/KisToolKnifeOptionsWidget.uiindex b1a4efd1c1..2ebcf136e4 100644--- a/plugins/tools/tool_knife/KisToolKnifeOptionsWidget.ui+++ b/plugins/tools/tool_knife/KisToolKnifeOptionsWidget.ui@@ -14,53 +14,23 @@<height>230</height></rect></property>- <layout class="QVBoxLayout" name="verticalLayout_2">+ <layout class="QVBoxLayout" name="mainLayout"><item>- <widget class="QComboBox" name="comboBox">- <property name="modelColumn">- <number>0</number>- </property>- <item>- <property name="text">- <string>Add a gutter</string>- </property>- </item>- <item>- <property name="text">- <string>Remove a gutter</string>- </property>- </item>- </widget>- </item>- <item>- <widget class="QRadioButton" name="thickGapWidthRadioButton">- <property name="text">- <string>Thick gap:</string>- </property>- <property name="checked">- <bool>true</bool>- </property>- </widget>+ <widget class="KisOptionButtonStrip" name="optionButtonStripToolMode" native="true"/></item><item>- <layout class="QHBoxLayout" name="horizontalLayout_2">- <item>- <widget class="QLabel" name="gapWidthLabel1">- <property name="sizePolicy">- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">- <horstretch>0</horstretch>- <verstretch>0</verstretch>- </sizepolicy>- </property>+ <layout class="QFormLayout" name="formLayout">+ <item row="1" column="0">+ <widget class="QRadioButton" name="thickGapWidthRadioButton"><property name="text">- <string>Width:</string>+ <string>Thick gap:</string></property>- <property name="buddy">- <cstring>gapWidthLabel1</cstring>+ <property name="checked">+ <bool>true</bool></property></widget></item>- <item>+ <item row="1" column="1"><widget class="QSpinBox" name="thickGapWidth"><property name="sizePolicy"><sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">@@ -88,34 +58,14 @@</property></widget></item>- </layout>- </item>- <item>- <widget class="QRadioButton" name="thinGapWidthRadioButton">- <property name="text">- <string>Thin gap:</string>- </property>- </widget>- </item>- <item>- <layout class="QHBoxLayout" name="horizontalLayout_2">- <item>- <widget class="QLabel" name="gapWidthLabel2">- <property name="sizePolicy">- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">- <horstretch>0</horstretch>- <verstretch>0</verstretch>- </sizepolicy>- </property>+ <item row="2" column="0">+ <widget class="QRadioButton" name="thinGapWidthRadioButton"><property name="text">- <string>Width:</string>- </property>- <property name="buddy">- <cstring>gapWidthLabel2</cstring>+ <string>Thin gap:</string></property></widget></item>- <item>+ <item row="2" column="1"><widget class="QSpinBox" name="thinGapWidth"><property name="sizePolicy"><sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">@@ -143,35 +93,15 @@</property></widget></item>- </layout>- </item>- <item>- <widget class="QRadioButton" name="customWidthRadioButton">- <property name="text">- <string>Special gap:</string>- </property>- </widget>- </item>- <item>- <layout class="QHBoxLayout" name="horizontalLayout_2">- <item>- <widget class="QLabel" name="gapWidthLabel3">- <property name="sizePolicy">- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">- <horstretch>0</horstretch>- <verstretch>0</verstretch>- </sizepolicy>- </property>+ <item row="3" column="0">+ <widget class="QRadioButton" name="customWidthRadioButton"><property name="text">- <string>Width:</string>- </property>- <property name="buddy">- <cstring>gapWidthLabel3</cstring>+ <string>Special gap:</string></property></widget></item>- <item>- <widget class="QSpinBox" name="specialGapWidth">+ <item row="3" column="1">+ <widget class="QSpinBox" name="customGapWidth"><property name="sizePolicy"><sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"><horstretch>0</horstretch>@@ -198,6 +128,67 @@</property></widget></item>+ <item row="4" column="0">+ <widget class="QRadioButton" name="radioButton">+ <property name="text">+ <string>Automatic</string>+ </property>+ </widget>+ </item>+ <item row="5" column="0">+ <widget class="QLabel" name="label">+ <property name="text">+ <string>Horizontal:</string>+ </property>+ </widget>+ </item>+ <item row="6" column="0">+ <widget class="QLabel" name="label_2">+ <property name="text">+ <string>Vertical:</string>+ </property>+ </widget>+ </item>+ <item row="7" column="0">+ <widget class="QLabel" name="label_3">+ <property name="text">+ <string>Diagonal:</string>+ </property>+ </widget>+ </item>+ <item row="5" column="1">+ <widget class="QComboBox" name="comboBox">+ <property name="currentText">+ <string>Thick</string>+ </property>+ <item>+ <property name="text">+ <string>Thick</string>+ </property>+ </item>+ </widget>+ </item>+ <item row="6" column="1">+ <widget class="QComboBox" name="comboBox_2">+ <property name="currentText">+ <string>Thin</string>+ </property>+ <item>+ <property name="text">+ <string>Thin</string>+ </property>+ </item>+ </widget>+ </item>+ <item row="7" column="1">+ <widget class="QComboBox" name="comboBox_3">+ <item>+ <property name="text">+ <string>Thin</string>+ </property>+ </item>+ </widget>+ </item></layout></item><item>@@ -215,6 +206,13 @@</item></layout></widget>+ <customwidgets>+ <customwidget>+ <class>KisOptionButtonStrip</class>+ <extends>QWidget</extends>+ <header>KisOptionButtonStrip.h</header>+ </customwidget>+ </customwidgets><resources/><connections/></ui>