Bug 316896 - Tool options widget broken
Summary: Tool options widget broken
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2013-03-17 10:30 UTC by Halla Rempt
Modified: 2014-01-29 11:02 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
broken tool option pane (46.98 KB, image/png)
2013-03-17 10:30 UTC, Halla Rempt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Halla Rempt 2013-03-17 10:30:40 UTC
Created attachment 78127 [details]
broken tool option pane

Since the shape options have migrated to the tool option widget, the layout of the widget has been broken. There are spacers in between the panes, and in Krita, the bottom pane doesn't work at all. This happened after a calligra-wide change, so reporting against calligra-common. Please see the attachment for the L&F of the tool option widget.
Comment 1 Camilla Boemann 2013-03-17 10:37:57 UTC
It's a tool specific bug none the less - but brought about by those additions for sure. 

the fix is to make sure your tool's own option widget als has a ubwidget of typea QWidget named SpecialSpacer (it does nothing except signal that this shouldn't happen
Comment 2 Camilla Boemann 2013-03-17 10:44:52 UTC
additional note - there is actually not spacers in between, but unless all option widgets have such a SpecialSpacer QWidget the tooloption docker will not force them to be top aligned as some of those option widgets might iike to use additional space.

the way for an option widget to signal it can't make use of more space is by adding the SpecialSpacer (make sure it's fixed size 0x0 so it doesn't take up any space)

it's a qt limitation that is worked around like this, and has actually been there for  a year. The difference here is that the tool in question now has more than one option widget, and so it shows.
Comment 3 Camilla Boemann 2013-03-17 10:48:44 UTC
that the bottom "line" widget doesn't work is another bug btw. and that is definitely calligra common
Comment 4 Bollebib 2014-01-16 15:10:02 UTC
Can't reproduce ,is this still an issue?
Comment 5 Dmitry Kazakov 2014-01-28 10:54:36 UTC
Present in three tools only:

Path Tool
Freehand Path Tool
Path Selection Tool

http://wstaw.org/m/2014/01/28/plasma-desktopCG2551.jpg
Comment 6 Halla Rempt 2014-01-28 19:59:44 UTC
I see that the PathTool does append a "specialspacer" widget... and it's still broken.
Comment 7 Halla Rempt 2014-01-28 20:02:43 UTC
Git commit 72912e6aaa693df4f1e5aaabc9805c3723156518 by Boudewijn Rempt.
Committed on 28/01/2014 at 20:00.
Pushed by rempt into branch 'calligra/2.8'.

Add a "SpecialSpacer" widget to all Krita tool option widgets

This _should_ fix bug 316896, but doesn't. Which other, non-krita
tool option widgets do we need to add the widget to?

M  +6    -0    krita/plugins/assistants/RulerAssistant/kis_ruler_assistant_tool.cc
M  +5    -0    krita/plugins/tools/defaulttools/kis_tool_brush.cc
M  +5    -0    krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc
M  +13   -6    krita/plugins/tools/defaulttools/kis_tool_measure.cc
M  +1    -1    krita/plugins/tools/defaulttools/kis_tool_measure.h
M  +5    -0    krita/plugins/tools/defaulttools/kis_tool_move.cc
M  +4    -0    krita/plugins/tools/tool_crop/kis_tool_crop.cc
M  +10   -5    krita/plugins/tools/tool_text/kis_tool_text.cc
M  +1    -1    krita/plugins/tools/tool_text/kis_tool_text.h
M  +39   -33   krita/plugins/tools/tool_transform2/kis_tool_transform.cc
M  +1    -1    krita/plugins/tools/tool_transform2/kis_tool_transform.h
M  +18   -12   krita/ui/tool/kis_selection_tool_config_widget_helper.cpp
M  +1    -1    krita/ui/tool/kis_selection_tool_config_widget_helper.h
M  +18   -14   krita/ui/tool/kis_tool_paint.cc
M  +1    -1    krita/ui/tool/kis_tool_paint.h

http://commits.kde.org/calligra/72912e6aaa693df4f1e5aaabc9805c3723156518
Comment 8 Halla Rempt 2014-01-28 20:32:40 UTC
Git commit f84dd70c82211dac624762d30a3dc90541bb97be by Boudewijn Rempt.
Committed on 28/01/2014 at 20:31.
Pushed by rempt into branch 'calligra/2.8'.

Add the spacerwidget to the layout; it's not enough to be simply
an invisible child widget.

I wonder though whether it wouldn't have been easier to just
use QObject::setProperty on the tool option widget instead of
using invisible sub widgets.

M  +1    -0    krita/plugins/assistants/RulerAssistant/kis_ruler_assistant_tool.cc
M  +11   -10   krita/plugins/tools/defaulttools/kis_tool_brush.cc
M  +1    -0    krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc
M  +1    -1    krita/plugins/tools/defaulttools/kis_tool_measure.cc
M  +1    -0    krita/plugins/tools/defaulttools/kis_tool_move.cc
M  +20   -19   krita/plugins/tools/tool_crop/kis_tool_crop.cc
M  +10   -12   krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp
M  +1    -0    krita/plugins/tools/tool_text/kis_tool_text.cc
M  +1    -0    krita/plugins/tools/tool_transform2/kis_tool_transform.cc
M  +1    -0    krita/ui/tool/kis_selection_tool_config_widget_helper.cpp
M  +7    -10   krita/ui/tool/kis_tool_paint.cc
M  +1    -1    libs/basicflakes/tools/KoCreatePathTool.cpp
M  +5    -4    libs/main/KoToolDocker_p.cpp

http://commits.kde.org/calligra/f84dd70c82211dac624762d30a3dc90541bb97be
Comment 9 Halla Rempt 2014-01-28 20:39:56 UTC
Git commit 7615f46104172cc177ed92095ae87e74d4133dee by Boudewijn Rempt.
Committed on 28/01/2014 at 20:38.
Pushed by rempt into branch 'calligra/2.8'.

Back out the unwanted change in default to tabbed

That was just an experiment. But the special-casing for Krita still is
necessary, otherwise on startup the freehand brush tool option widget
is shown wrong.

M  +3    -3    libs/main/KoToolDocker_p.cpp

http://commits.kde.org/calligra/7615f46104172cc177ed92095ae87e74d4133dee
Comment 10 Dmitry Kazakov 2014-01-29 04:32:27 UTC
KisToolPath and Path Selection Tools are still broken:

http://wstaw.org/m/2014/01/29/plasma-desktopQN1296.png
http://wstaw.org/m/2014/01/29/plasma-desktopfV1296.png
Comment 11 Halla Rempt 2014-01-29 09:08:11 UTC
Zut. 

On windows, everything looked okay, and I didn't test on Linux :-(
Comment 12 Halla Rempt 2014-01-29 10:27:29 UTC
Git commit 59666b2cd8f37a2c5328e1c1f81475b88d4f0cd1 by Boudewijn Rempt.
Committed on 28/01/2014 at 20:00.
Pushed by rempt into branch 'master'.

Add a "SpecialSpacer" widget to all Krita tool option widgets

This _should_ fix bug 316896, but doesn't. Which other, non-krita
tool option widgets do we need to add the widget to?

M  +6    -0    krita/plugins/assistants/RulerAssistant/kis_ruler_assistant_tool.cc
M  +5    -0    krita/plugins/tools/defaulttools/kis_tool_brush.cc
M  +5    -0    krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc
M  +13   -6    krita/plugins/tools/defaulttools/kis_tool_measure.cc
M  +1    -1    krita/plugins/tools/defaulttools/kis_tool_measure.h
M  +5    -0    krita/plugins/tools/defaulttools/kis_tool_move.cc
M  +4    -0    krita/plugins/tools/tool_crop/kis_tool_crop.cc
M  +10   -5    krita/plugins/tools/tool_text/kis_tool_text.cc
M  +1    -1    krita/plugins/tools/tool_text/kis_tool_text.h
M  +39   -33   krita/plugins/tools/tool_transform2/kis_tool_transform.cc
M  +1    -1    krita/plugins/tools/tool_transform2/kis_tool_transform.h
M  +18   -12   krita/ui/tool/kis_selection_tool_config_widget_helper.cpp
M  +1    -1    krita/ui/tool/kis_selection_tool_config_widget_helper.h
M  +18   -14   krita/ui/tool/kis_tool_paint.cc
M  +1    -1    krita/ui/tool/kis_tool_paint.h

http://commits.kde.org/calligra/59666b2cd8f37a2c5328e1c1f81475b88d4f0cd1
Comment 13 Halla Rempt 2014-01-29 10:27:29 UTC
Git commit 21a32ba8106dbc201104d3b125b66c858ddddc6c by Boudewijn Rempt.
Committed on 28/01/2014 at 20:31.
Pushed by rempt into branch 'master'.

Add the spacerwidget to the layout; it's not enough to be simply
an invisible child widget.

I wonder though whether it wouldn't have been easier to just
use QObject::setProperty on the tool option widget instead of
using invisible sub widgets.

M  +1    -0    krita/plugins/assistants/RulerAssistant/kis_ruler_assistant_tool.cc
M  +11   -10   krita/plugins/tools/defaulttools/kis_tool_brush.cc
M  +1    -0    krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc
M  +1    -1    krita/plugins/tools/defaulttools/kis_tool_measure.cc
M  +1    -0    krita/plugins/tools/defaulttools/kis_tool_move.cc
M  +20   -19   krita/plugins/tools/tool_crop/kis_tool_crop.cc
M  +10   -12   krita/plugins/tools/tool_dyna/kis_tool_dyna.cpp
M  +1    -0    krita/plugins/tools/tool_text/kis_tool_text.cc
M  +1    -0    krita/plugins/tools/tool_transform2/kis_tool_transform.cc
M  +1    -0    krita/ui/tool/kis_selection_tool_config_widget_helper.cpp
M  +7    -10   krita/ui/tool/kis_tool_paint.cc
M  +1    -1    libs/basicflakes/tools/KoCreatePathTool.cpp
M  +5    -4    libs/main/KoToolDocker_p.cpp

http://commits.kde.org/calligra/21a32ba8106dbc201104d3b125b66c858ddddc6c
Comment 14 Halla Rempt 2014-01-29 10:27:30 UTC
Git commit d59b506c01142b738b7ee1417d267269ec9017a7 by Boudewijn Rempt.
Committed on 28/01/2014 at 20:38.
Pushed by rempt into branch 'master'.

Back out the unwanted change in default to tabbed

That was just an experiment. But the special-casing for Krita still is
necessary, otherwise on startup the freehand brush tool option widget
is shown wrong.

M  +3    -3    libs/main/KoToolDocker_p.cpp

http://commits.kde.org/calligra/d59b506c01142b738b7ee1417d267269ec9017a7
Comment 15 Halla Rempt 2014-01-29 11:02:26 UTC
Git commit 3cdb577a79281fc62cd4e466d91827d79c66e39c by Boudewijn Rempt.
Committed on 29/01/2014 at 11:01.
Pushed by rempt into branch 'calligra/2.8'.

M  +1    -1    libs/main/KoApplication.cpp
M  +18   -3    libs/main/KoToolDocker_p.cpp

http://commits.kde.org/calligra/3cdb577a79281fc62cd4e466d91827d79c66e39c