Bug 154687 - Add a way to reset toolbar button colors to default (see comment 4, comment 11)
Summary: Add a way to reset toolbar button colors to default (see comment 4, comment 11)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
7.4.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: HelpGaps-NewFeatures
  Show dependency treegraph
 
Reported: 2023-04-06 16:06 UTC by Don Matschull
Modified: 2023-05-25 13:21 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Don Matschull 2023-04-06 16:06:38 UTC
If I change the Line Color in the Line and Filling toolbar when no object is selected in the workspace to yellow, any new line I draw will use this Line Color setting of yellow rather than the default attribute setting in the Object without fill style that may be set to red.

Now, if I select a line in the workspace and change the Line Color in the Line and Filling toolbar to green, that line will be green.

If I now draw a new line, the line will be yellow even though the Line and Filling toolbar displays a Line Color of green and the Object without fill style shows a Line Color of red.

I can find no place that shows this setting of yellow and no way to reset this setting to the default setting of the Object without fill style. 

While I can change this overriding setting to match the default setting in the Object without fill style, this is still an overriding setting. If I change the default setting in the Object without fill style, the overriding setting will no longer match.

If the Line and Filling toolbar can be used to override default style settings, there should be some what to know what those overriding settings are and to change them back to the default settings.
Comment 1 Buovjaga 2023-04-12 13:23:31 UTC
(In reply to Don Matschull from comment #0)
> If I change the Line Color in the Line and Filling toolbar when no object is
> selected in the workspace to yellow, any new line I draw will use this Line
> Color setting of yellow rather than the default attribute setting in the
> Object without fill style that may be set to red.
> 
> Now, if I select a line in the workspace and change the Line Color in the
> Line and Filling toolbar to green, that line will be green.
> 
> If I now draw a new line, the line will be yellow even though the Line and
> Filling toolbar displays a Line Color of green and the Object without fill
> style shows a Line Color of red.

I don't reproduce what you describe in the last bit. Otherwise it is just the usual behaviour of direct formatting overriding a style.

Arch Linux 64-bit, X11
Version: 7.5.2.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
7.5.2-1
Calc: CL threaded
Comment 2 Don Matschull 2023-04-12 18:54:13 UTC
(In reply to Buovjaga from comment #1)
> (In reply to Don Matschull from comment #0)
> > If I change the Line Color in the Line and Filling toolbar when no object is
> > selected in the workspace to yellow, any new line I draw will use this Line
> > Color setting of yellow rather than the default attribute setting in the
> > Object without fill style that may be set to red.
> > 
> > Now, if I select a line in the workspace and change the Line Color in the
> > Line and Filling toolbar to green, that line will be green.
> > 
> > If I now draw a new line, the line will be yellow even though the Line and
> > Filling toolbar displays a Line Color of green and the Object without fill
> > style shows a Line Color of red.
> 
> I don't reproduce what you describe in the last bit. Otherwise it is just
> the usual behaviour of direct formatting overriding a style.
> 
> Arch Linux 64-bit, X11
> Version: 7.5.2.2 (X86_64) / LibreOffice Community
> Build ID: 50(Build:2)
> CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
> Locale: fi-FI (fi_FI.UTF-8); UI: en-US
> 7.5.2-1
> Calc: CL threaded

I understand that the Line Color setting is direct formatting that is taking precedence over the default style. I'd like a way to remove this direct formatting after it has once been set in order to return to the default style setting.
Comment 3 Buovjaga 2023-04-12 19:10:45 UTC
(In reply to Don Matschull from comment #2)
> I understand that the Line Color setting is direct formatting that is taking
> precedence over the default style. I'd like a way to remove this direct
> formatting after it has once been set in order to return to the default
> style setting.

Hit Ctrl-M or Format - Clear Direct Formatting
Comment 4 Don Matschull 2023-04-12 21:03:19 UTC
(In reply to Buovjaga from comment #3)
> (In reply to Don Matschull from comment #2)
> > I understand that the Line Color setting is direct formatting that is taking
> > precedence over the default style. I'd like a way to remove this direct
> > formatting after it has once been set in order to return to the default
> > style setting.
> 
> Hit Ctrl-M or Format - Clear Direct Formatting

Using (In reply to Buovjaga from comment #3)
> (In reply to Don Matschull from comment #2)
> > I understand that the Line Color setting is direct formatting that is taking
> > precedence over the default style. I'd like a way to remove this direct
> > formatting after it has once been set in order to return to the default
> > style setting.
> 
> Hit Ctrl-M or Format - Clear Direct Formatting

Format>Clear Direct Formatting clears direct formatting applied to an object at the time.

However, it does not clear any "globalized" direct formatting in the Line and Filling toolbar. 

I'm trying to find a way to change the Line Color setting in the Line and Filling toolbar so that any new object using the setting in the Default Style.(In reply to Buovjaga from comment #3)
> (In reply to Don Matschull from comment #2)
> > I understand that the Line Color setting is direct formatting that is taking
> > precedence over the default style. I'd like a way to remove this direct
> > formatting after it has once been set in order to return to the default
> > style setting.
> 
> Hit Ctrl-M or Format - Clear Direct Formatting

If an object is selected, Format>Clear Direct Formatting clears any direct formatting set for that object. However, it does not reset the Line Color setting in the Line and Toolbar back to the default setting. Any new object draw will still not use the default setting.
Comment 5 Buovjaga 2023-04-13 09:07:11 UTC
(In reply to Don Matschull from comment #4)
> If an object is selected, Format>Clear Direct Formatting clears any direct
> formatting set for that object. However, it does not reset the Line Color
> setting in the Line and Toolbar back to the default setting. Any new object
> draw will still not use the default setting.

Ok, let's ask UX
Comment 6 Heiko Tietze 2023-04-13 11:26:42 UTC
Reset to default is easy to achieve by picking the right color. I understand this as convenience feature. Is there any workflow that breaks due to this behavior?
Comment 7 Don Matschull 2023-04-13 15:10:23 UTC
(In reply to Heiko Tietze from comment #6)
> Reset to default is easy to achieve by picking the right color. I understand
> this as convenience feature. Is there any workflow that breaks due to this
> behavior?

Setting the color to match the default color appears to work at first. But it does not actually reset the default. If you subsequently change the color in the default style. You get the same problem as before. New lines will use the setting in the Line and Filling toolbar rather than the default settings.

Other settings in the Line and Filling toolbar also present problems if they are set when nothing is selected in the Workspace.

Maybe the easiest solution would be to prevent setting attributes in the Line and Filling toolbar unless an object is selected in the Workspace.
Comment 8 Buovjaga 2023-04-13 15:13:06 UTC
(In reply to Heiko Tietze from comment #6)
> Reset to default is easy to achieve by picking the right color. I understand
> this as convenience feature. Is there any workflow that breaks due to this
> behavior?

Don is right: this just makes (Dark Blue 1) direct formatting and will defeat the style.
Comment 9 Heiko Tietze 2023-04-24 09:09:16 UTC
Resetting the line and filling attributes to the default drawing style on click at the document canvas has the disadvantage loosing a potential yet undocumented convenience function but the advantage of a straight-forward functionality.

Regina, Maxim, Mike: Is the current behavior intentionally implemented? Does changing affect other modules too, like the font color in Writer that can be set and continues if nothing has been selected until the next clear formatting.
Comment 10 Mike Kaganski 2023-04-24 10:55:05 UTC
As far as I understand this reasonable request, it is for a way to remove the explicitly selected direct-formatting property of the newly created objects, defined by the toolbar buttons. And it would be rather straightforward to have some "By style" or "None" item in the respective drop-down panel.
Comment 11 Maxim Monastirsky 2023-04-25 09:20:30 UTC
(In reply to Heiko Tietze from comment #9)
> Is the current behavior intentionally implemented?
Yes it is, see SdrPaintView::SetDefaultAttr, and also the related SetDefaultStyleSheet method, which sets the default style if a style is double-clicked with no shape selected.

This is in-line with MS Office and any other drawing app, that let you choose the default color for new shapes in advance. Our problem here is that we added styles as a separate formatting layer to the mix, which is why there might be a need to clear the direct formatting layer, for the underlying style to be effective.

I believe that a better alternative to using DF for shape defaults, is to allow setting arbitrary style as the default for new shapes instead of the "Default Drawing Style" (just modifying the default style isn't always appropriate, as it might affect other shapes as well). As said above, it is already possible by double-clicking on a style when no shape is selected. The problem is that this currently works only for shapes that otherwise would use "Default Drawing Style", but e.g. lines default to "Object without fill", and not affected by this choice. So a better UI is needed for this (might be as simple as a context menu item of "use this style by default for the current shape kind").
Comment 12 Don Matschull 2023-04-25 15:45:19 UTC
Knowing that double clicking the default style setting when nothing is selected in the Workspace starts reapplying these settings to new objects is very helpful for overcoming settings made in the Line and Filling toolbar when nothing is selected.

I can't find that documented, however, in the Draw Guide or Help files.
Comment 13 QA Administrators 2023-04-26 03:23:44 UTC Comment hidden (obsolete)
Comment 14 Heiko Tietze 2023-04-26 06:07:30 UTC
So let's forward this topic to documentation.
Comment 15 Olivier Hallot 2023-05-08 15:55:44 UTC
I'm planning to add these remarks to the page
https://help.libreoffice.org/master/en-US/text/simpress/01/05100000.html?DbPAR=IMPRESS

--------8<-----------
With no object selected in the workspace, if you set the shape attributes like line width, line color, line style, area fill type and area fill style with the Line and Filling bar, then the line and filling settings are applied to new shapes, as direct formatting, overriding the shape Default Drawing Style attributes. To reset the attributes of the Line and Filling bar to those of the Default Drawing Style, unselect any object in the workspace and double-click on the Default Drawing Style entry in the Styles pane of the Sidebar. The next object you draw shows the Default Drawing Style.
--------8<-----------

https://gerrit.libreoffice.org/c/help/+/151543
Comment 16 Olivier Hallot 2023-05-08 15:57:02 UTC
(help link above is bad... see patch)
Comment 17 Commit Notification 2023-05-09 11:32:45 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/429400018469d9925c4645fe7b2266bb275f407d

tdf#154687 Line & Filling toolbar hidden feature