Index ¦ Archives ¦ RSS

Document themes in Impress: shape fill

Estimated read time: 4 minutes

Impress now has the next step of document theme support: it is possible to refer to the theme colors from shape fill colors (including effects).

This work is primarily for Collabora Online, but the feature is fully available in desktop Impress as well.

Motivation

PowerPoint-style themed shape fill, user interface

PowerPoint users can attach a set of colors (and fonts, etc.) to master pages, and then refer to these in many areas, like shape text or shape fill. It was already possible to define theme colors and refer to them from shape text (see Start of document themes in Impress: shape text for details).

The next step in this journey is shape fill: if your shape is filled with some color, it can be a theme color, as visible on the above screenshot. One interesting aspect of this is that the default shape fill color can now depend on the master page, and it may not be the same for all slides (this is what would happen with styles, when not using theming).

Results so far

Here is a demo that shows how it works:

If one opens the svx/qa/unit/data/theme.pptx test file from core.git, it looks like this:

PowerPoint-style themed shape fill, after opening

The middle row has 3 rounded rectangles: the first is filled with the 'Accent 1' color, the second is the same, but 60% lighter and finally the last one is the same, but 25% darker.

Here is how you can change what the 'Accent 1' color is:

  • Click 'Master View' on the sidebar to go to the master of the current slide.
  • Right click -> 'Slide Properties' opens the 'Slide Properties' dialog.
  • The 'Theme' page has an 'Accent 1' row, with a blue color.
  • Change that to an orange color: click on the 'Accent 1' drop-down, then select 'Theme colors', finally the 6th choice is orange in the first row -- this comes from the document's theme.
  • Click 'OK' to close the dialog, followed by 'Close Master View' on the sidebar.

Here is how your shapes now look like:

PowerPoint-style themed shape fill, after changing the theme

What you can see here is that the color effect (darker, lighter, default) of the rounded rectangles' fill color was preserved, but all the blue colors are replaced with orange.

As a cherry on the cake, now if you insert a new shape, that will also have an orange fill color by default as well.

You can see how this is useful when designing templates: a designer can create something good-looking, and all you have to do is to set the theme to the colors of your organization, and you're done.

How is this implemented?

If you would like to know a bit more about how this works, continue reading... :-)

As usual, the high-level problem was addressed by a series of small changes:

Want to start using this?

You can get a snapshot / demo of Collabora Office 22.05 and try it out yourself right now: try unstable snapshot. Collabora intends to continue supporting and contributing to LibreOffice, the code is merged so we expect all of this work will be available in TDF's next release too (7.4).

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.