Bug 106878 - Improve the LibreOffice "fallback theme"
Summary: Improve the LibreOffice "fallback theme"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-30 16:58 UTC by Jan Holesovsky
Modified: 2018-10-22 10:51 UTC (History)
5 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 Jan Holesovsky 2017-03-30 16:58:10 UTC
The bug 106756 pointed out that there are projects that prefer own theme over using the system one.  This is currently not the direction that LibreOffice wants to follow, so the bug has been closed.

Nevertheless - the "fallback theme" that we have in LibreOffice is incredibly ugly, and could be improved.  Also the code for the actual drawing is spread all over the place; would be great to unify that to one place instead of all the "if (native) {something();} else {fallback();}"-like implementation.

There would be 2 things to improve:

1) move the drawing of the widgets out of their paint method to a theme painting class

2) actually improve the drawing of the "fallback" widgets

The 1) would lead to using a theme class that would be either instantiated by the system integration (Gtk+ / KDE / Windows / macOS / ...), or the fallback instance is used.

In 2) the actual drawing would be improved.

Both 1) and 2) can be done incrementally, there is no need for a big bang where everything would be broken :-)
Comment 1 Jan Holesovsky 2017-03-30 17:07:57 UTC
Thibaut: As to the actual code pointers:

  vcl/unx/kde/salnativewidgets-kde.cxx
  vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
  vcl/unx/gtk/salnativewidgets-gtk.cxx
  vcl/source/gdi/salnativewidgets-none.cxx
  vcl/win/gdi/salnativewidgets-luna.cxx
  vcl/osx/salnativewidgets.cxx

are the current implementations of the native themes.  To see where the drawing happens, do 'git grep DrawNativeControl'.

Eg. a radio button drawing happens in 
vcl/source/control/button.cxx in:

  void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)

You can see that the "native" part happens in the

  if (!maImage && rRenderContext.IsNativeControlSupported(...

part, and the fallback happens in:

  if (!bNativeOK)

part.
Comment 2 V Stuart Foote 2017-03-30 17:52:01 UTC
+1
Comment 3 QA Administrators 2018-10-21 02:50:31 UTC Comment hidden (obsolete)
Comment 4 Heiko Tietze 2018-10-22 10:51:27 UTC
We updated the themes for 6.1. Fallback is now the newly designed Colibre theme.