https://bugs.kde.org/show_bug.cgi?id=358798

--- Comment #8 from Igor Kushnir <igor...@gmail.com> ---
Git commit 2d8cafaae7ee82ab89507b384f5385f9a21d3f97 by Igor Kushnir.
Committed on 15/09/2023 at 11:57.
Pushed by igorkushnir into branch 'master'.

SourceFormatterSelectionEdit: add usage help and info

Configure Source Formatter user interface is unusual. The fact that the
Language combobox defines what is being configured and the Formatter
combobox actually configures something is not obvious (Bug 358798). The
first paragraph of the added usage help should clear this up for new
users.

The second paragraph of the usage help explains what functionality
depends on configured Formatting Styles and why correctly configuring
them is very important. The third paragraph of the usage help points out
the unobvious fact that all *.h are formatted with formatter and style
configured for C language. Piotr Mierzwinski has reported many source
formatter bugs, some of which were caused by incompletely or incorrectly
configured formatting. Hopefully the added usage help will avoid such
user misunderstanding and trouble in the future.

Both AStylePlugin and CustomScriptPlugin implement
ISourceFormatter::description(). The descriptions must have been
translated into many languages long ago, but are not used anywhere. Show
these informative descriptions in Configure Source Formatter UI.

Show the usage help and formatter descriptions as whatsThis of two added
tool buttons. This way, the information is easily discoverable by new
users and practically does not take up useful UI space. The whatsThis
popup can be displayed in two intuitive ways:
1) common: hover over the button, read the tooltip and press Shift;
2) custom: click the button.

Set formatter description whatsThis to an empty string when there are no
enabled formatter plugins. QWhatsThis never shows up when the text is
empty.

Set the tool buttons' iconSize to 22x22. Optimized icons of this size
are present in most icon themes. A button with this icon size is a pixel
or two higher than a combobox in the same row, so only a few pixels of
vertical UI space are lost.

The usage help button is positioned as close as possible to the top left
corner of the SourceFormatterSelectionEdit widget because it explains
the entire interface. The formatter description button is placed to the
right of the Formatter combobox because it describes a selected
formatter. Unfortunately, the resulting misalignment of the buttons and
comboboxes looks weird. On the other hand, the asymmetry might help the
user understand that the two comboboxes have vastly different roles.
Related: bug 335549

M  +11   -0    kdevplatform/shell/sourceformatterselectionedit.cpp
M  +43   -0    kdevplatform/shell/sourceformatterselectionedit.ui

https://invent.kde.org/kdevelop/kdevelop/-/commit/2d8cafaae7ee82ab89507b384f5385f9a21d3f97

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to