Summary: | Exporting form controls to PDF gives different results depending on system dark mode | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Mike Kaganski <mikekaganski> |
Component: | filters and storage | Assignee: | Caolán McNamara <caolan.mcnamara> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arnaud.versini, caolan.mcnamara, ksc3.14159 |
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=150875 https://bugs.documentfoundation.org/show_bug.cgi?id=150886 https://bugs.documentfoundation.org/show_bug.cgi?id=151610 https://bugs.documentfoundation.org/show_bug.cgi?id=144863 https://bugs.documentfoundation.org/show_bug.cgi?id=152973 |
||
Whiteboard: | target:7.5.0 target:7.4.3 | ||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 103378 |
Description
Mike Kaganski
2022-09-05 07:54:58 UTC
This happens for me without even enabling experimental features, using dark theme from the system seems to be the default. In toolkit/source/awt/vclxwindow.cxx we set EnableNativeWidget(false) when drawing things like this, so possibly either that code path isn't used in this case or something similar should do the same, or it doesn't work fully. Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9f682acf75d56c82b40114bb9fceb29d837de2dd Related: tdf#150786 workaround unit test failure It will be available in 7.5.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. Can this be changed to All OS or is implementation different for Win and Lin? Also repro on Ubuntu. Indeed, All. turns out this is PDFWriterImpl::createDefaultEditAppearance and similar in vcl/source/gdi/pdfwriter_impl.cxx where we have stuff like setFillColor( rWidget.Background ? replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ) : COL_TRANSPARENT ); which sets the background to the current theme background. I'm not sure why we replaceColor at all, but at the least I guess we should not use the current theme here, but some "preset for pdf" colors which we can base on the current gen (light) theme for consistency regardless of the current UI theme Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a0bc0cc81b597aa81189355a8125753d6b873cce tdf#150786 use the same colors for pdf widgets regardless of theme It will be available in 7.5.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. lets try that then, backport to 7-4 in gerrit Version: 7.5.0.0.alpha0+ / LibreOffice Community Build ID: a0bc0cc81b597aa81189355a8125753d6b873cce CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3 1. With dark theme, I still see black form, and I think it should not be black. 2. Export to PDF with "Create form" checked is OK. 3. Export to PDF without "Create form" checked is NOK, bug 150886. Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/da42c917c49940b3507b72fcd8f603331d922244 tdf#150786 use the same colors for pdf widgets regardless of theme It will be available in 7.4.3. 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. proposed solution for bug 150886 addresses point 1 as a side effect: https://gerrit.libreoffice.org/c/core/+/140942/2 Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ea36e0502c0bc381577cfa1b1a7fedf0f05d1d72 tdf#150786 use a 'standard' theme for form controls It will be available in 7.5.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. *** Bug 144863 has been marked as a duplicate of this bug. *** (In reply to Commit Notification from comment #12) > Caolán McNamara committed a patch related to this issue. > It has been pushed to "master": > > Affected users are encouraged to test the fix and report feedback. Works great in Daily 7.4.4 and 7.5 Tested with Win10 and exporting a fillable pdf from Writer. *** Bug 144863 has been marked as a duplicate of this bug. *** |