GSoC: Libreoffice Theme (application crashes when I modify ColorConfig on startup)

Michael Weghorn m.weghorn at posteo.de
Sat Jun 29 07:06:39 UTC 2024


On 2024-06-28 19:37, Sahil Gautam wrote:
> I spent quite some time with QStyle trying to get it to paint the UI 
> elements, which complicated stuff, and took a lot of time, where it was 
> just palette manipulation (mostly). Also I found that we handle the 
> menubar separately, and it's not drawn via drawNativeControl(...). What 
> is left for QT: - color customization for menus 
> (menubar/window/button/etc done) - adding a listener for instant redraw 

The menubar (and most context menus, and those message dialogs that have 
been welded, see tdf#130857) are native Qt menus, while 
QtGraphics_Controls::drawNativeControl is custom drawing of controls to 
make them look like native Qt ones.

As an idea: I'd expect that setting a corresponding application style 
should make the menu use the custom colors as well.

Using e.g. `QApplication::setStyle(QStyleFactory::create("Adwaita"));` 
causes the application (including the menu bar) to use that style, and 
it could potentially also make additional changes in 
QtGraphics_Controls::drawNativeControl unnecessary. (Maybe 
QApplication::setStyleSheet could also work instead if using a style 
sheet instead of a custom style.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20240629/42afeb3c/attachment.sig>


More information about the LibreOffice mailing list