Created attachment 165645 [details] Screenshot showing missing background color for multiline edit with kf5 VCL plugin This is a follow-up for tdf#136094. Steps to reproduce: 0. Use the kf5 VCL plugin (used by default in KDE Plasma session), e.g. by setting environment variable SAL_USE_VCLPLUGIN=kf5 1. Open attachment 164654 [details] from bug 136094 2. go to "Tools" -> "Macros" -> "Organize Dialogs" 3. open the test dialog contained in the document: "formcontrol_colors.odt" -> "Standard" -> "testdialog", click "Edit" -> a dialog with various controls shows up, some of which have a background color set 4. start the preview dialog (third icon in the toolbar at the bottom) 5. compare the colors shown in the preview dialog to those in the editable dialog shown before Actual Result: background color missing for the multiline edit at the top (s. attached screenshot) Expected Result: Background colors in the preview dialog should be the same as those shown/set in previously, i.e. the multiline edit should have red background. More info: After the 2 commits mentioned in tdf#136094, background colors basically work for gtk3 and kf5. However, for some reason, the multiline edit does not yet work for kf5, s.a. commit message in https://git.libreoffice.org/core/+/391f17a5fbcf9cd918efa10321219f87409d2412%5E%21 The two commits might be a good place to start to find the relevant place. Version: 7.1.0.0.alpha0+ Build ID: 007e6063931bd87d6ce15deb65b9adc823f74ce0 CPU threads: 12; OS: Linux 5.8; UI render: default; VCL: kf5 Locale: en-GB (en_GB.UTF-8); UI: en-US Calc: threaded
Created attachment 165646 [details] Patch that adds test ouptut showing that color is not passed for qt5 The attached patch demonstrates that the background color is not passed correctly into Qt5Graphics_Controls::drawNativeControl, while GtkSalGraphics::drawNativeControl does get the correct one. Output when using kf5 VCL plugin with that patch in place: > warn:vcl.test:17103:17103:vcl/qt5/Qt5Graphics_Controls.cxx:254: multilineedit, rBackgroundColor: c[ffffffff] > warn:vcl.test:17103:17103:vcl/qt5/Qt5Graphics_Controls.cxx:254: multilineedit, rBackgroundColor: c[ffffffff] -> COL_AUTO, is passed here, i.e. not the correct color Output when using gtk3 VCL plugin: > warn:vcl.test:17264:17264:vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx:2322: multilineedit, rBackgroundColor: c[ff383800] > warn:vcl.test:17264:17264:vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx:2322: multilineedit, rBackgroundColor: c[ff383800] > warn:vcl.test:17264:17264:vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx:2322: multilineedit, rBackgroundColor: c[ff383800] > warn:vcl.test:17264:17264:vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx:2322: multilineedit, rBackgroundColor: c[ff383800] -> proper color is passed What would probably have to be done here is to find out why the color is not passed as expected for the qt5/kf5 case.
Jan-Marek Glogowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/2859febef0dd59e6714032887f1f4ababf0b1044 tdf#136866 VCL don't drop the control background It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.