Bug 98253 - SIDEBAR: Style preview not visible if text is set to automatic color
Summary: SIDEBAR: Style preview not visible if text is set to automatic color
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0 target:6.2.0.2
Keywords: difficultyInteresting, easyHack, skillCpp
: 97905 120779 (view as bug list)
Depends on:
Blocks: KDE, KF5 Sidebar-Styles Styles-Preview
  Show dependency treegraph
 
Reported: 2016-02-28 15:46 UTC by Robert Großkopf
Modified: 2018-12-30 23:56 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Open the attachement - shows disappered formatdescription on sidebar (327.16 KB, application/pdf)
2016-02-28 15:46 UTC, Robert Großkopf
Details
Open the document and click in the different rows. (8.20 KB, application/vnd.oasis.opendocument.text)
2016-10-17 09:09 UTC, Robert Großkopf
Details
Styles not shown with automatic fontcolor an Linux/KDE Plasma 5.5.5 (135.26 KB, application/vnd.oasis.opendocument.text)
2016-10-17 15:02 UTC, Robert Großkopf
Details
Active element in Styles and Formatting invisible (91.51 KB, image/png)
2016-11-07 14:28 UTC, Daniel T.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2016-02-28 15:46:15 UTC
Created attachment 123055 [details]
Open the attachement - shows disappered formatdescription on sidebar

Open the attached *.pdf-file.
There are 4 screenshots.
On the sidebar the paragraphs or the defined characters are shown.
If I set the cursor in text, which is defined as black(default), the name of the paragraph disappears on the sidebar. Only a grey rectangle shows where I could find the paragraph.
If I set the cursor in text, which is defined in any special color (not black) it will be shown on the sidebar.
Its the same behavior for paragraphs and characters,

My system: OpenSUSE 42.1 64bit rpm Linux, tested all with LO 5.1.1.1
Comment 1 Buovjaga 2016-03-21 18:35:22 UTC
I get this: Default style name is not visible in sidebar when it is pre-selected. Then I click on it to select it proper and the name appears. Then I can click elsewhere and the name stays visible.

But I don't get your problem.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.2.0.0.alpha0+
Build ID: 4bf2b6b2e6641c82e2b714e394482f1a1620b436
CPU Threads: 8; OS Version: Linux 4.4; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on March 21st 2016
Comment 2 Yousuf Philips (jay) (retired) 2016-10-17 08:17:18 UTC
Hi Robert,

Thank you for reporting the bug. Unfortunately i'm unable to reproduce the issue, so please test the latest version of libreoffice 5.2 and let us know if the issue still persists. If it does, please attach a document that shows the problem for us to test with.

Version: 5.3.0.0.alpha0+
Build ID: 45a7137c6796f33fbf5b8f7cb64e293260d991cb
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-10-13_23:38:06
Locale: en-US (en_US.UTF-8); Calc: group
Comment 3 Robert Großkopf 2016-10-17 09:01:39 UTC
The behavior never changed. Here the version I have tested with:
Version: 5.3.0.0.alpha0+
Build ID: e2f6c7f0d0cc14f851d7028ff846c5dc658a81c6
CPU Threads: 4; OS Version: Linux 4.1; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-10-11_00:37:49
Locale: de-DE (de_DE.UTF-8); Calc: group

My system: OpenSUSE 42.1 64bit rpm Linux with KDE Plasma 5.5.5

Will add an attachment, but it's the same behavior when opening an empty Writer-document:
1. Create Writer document
2. Click on sidebar "Styles and Formatting"
3. Click in the document
Bug appears: DefaultStyle wouldn't be shown, only a gray background.

4. Now modify DefaultStyle.
5. Modify font-color from automatic to red and save this.
6. Click in the document and the DefaultSytle appears in the sidebar.

It seems to be a problem with font-color "automatic". If I set this to "black" the DefaultStyle appears also at the sidebar.
Comment 4 Robert Großkopf 2016-10-17 09:09:30 UTC
Created attachment 128041 [details]
Open the document and click in the different rows.

The styles on the sidebar should visible:
Click on the first row with automatic font-color. The style won't be shown. Only a gray background appears.
Click on the other rows. The style would be shown. There is defined a font-color.
Comment 5 Yousuf Philips (jay) (retired) 2016-10-17 13:39:43 UTC
(In reply to robert from comment #3)
> Bug appears: DefaultStyle wouldn't be shown, only a gray background.

If this is the behaviour with a blank document, then something else is wrong and this sounds like bug 100298, which is supposed to be a Mac only issue. Wasnt able to reproduce the issue with attachment 128041 [details] on Linux Mint Mate 17.3 or KDE Neon with master.

Please do a screencast showing the behaviour, so we can try to reproduce.
Comment 6 Robert Großkopf 2016-10-17 15:02:13 UTC
Created attachment 128047 [details]
Styles not shown with automatic fontcolor an Linux/KDE Plasma 5.5.5

Have had a look on this bug with KDE Plasma 5.5.5 and also Xfce 4.12. With Xfce the styles will be shown, also with automatic fontcolor. So it seem to be a special buggy behavior in the combination OpenSUSE/KDE/LO.
Comment 7 Robert Großkopf 2016-10-17 15:17:20 UTC
(In reply to Yousuf Philips (jay) from comment #5)

> If this is the behaviour with a blank document, then something else is wrong
> and this sounds like bug 100298, which is supposed to be a Mac only issue.
> Wasnt able to reproduce the issue with attachment 128041 [details] on Linux
> Mint Mate 17.3 or KDE Neon with master.

Have had a look at the screenshots of bug 100298. There will disappear the description for more than one style. The background wouldn't be shown, only something like ... (or very small characters?).

This isn't the same behavior as I could reproduce here with KDE 5.5.5 and OpenSUSE 42.1 and all versions of LO since LO 5.1.0.3. This bug doesn't appear with LO 5.0.5.2. (Have installed about 20 versions of LO here for testing.) There has been something changed in the whole style from 5.0 to 5.1. LO 5.0 under KDE 5.5.5 looks here like I have started LO with Xfce instead - and doesen't show the bug.
Comment 8 Robert Großkopf 2016-10-17 15:34:04 UTC
Another test:
If I install 

Version: 5.3.0.0.alpha0+
Build ID: f3d9249ca6be6e69362b3ae90842fd2211fd0829
CPU Threads: 4; OS Version: Linux 4.1; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-10-17_06:11:04
Locale: de-DE (de_DE.UTF-8); Calc: group

without the package "kde-integration" the bug won't appear. Then I installed all with this package and the bug appears.
Comment 9 Yousuf Philips (jay) (retired) 2016-10-17 17:18:12 UTC
So jmux and Buovjaga confirmed this on irc.

<jmux> ... The pre-selected style has the wrong text color. It works with gtk2 here (gtk3 crashes for me).
<buovjaga> yep, jmux is right
<jphilipz> so its broken on the kde4 backend?
<jphilipz> i tested the kde4 backend on kde neon and wasnt able to repo
<buovjaga> jphilipz: yes, on gtk3 I see the preselected Default style in sidebar
<jmux> Well - I'm not sure gtk2 is correct, as for me it uses white, which is not the automatic font color - should be black
<jmux> Just as the real black line is black and the red line is red
<jmux> Now KDE obviously doen't use any color for the default, or is completely transparent.
<jmux> The contrast and readability the white is "correct", but for the styles list it looks wrong
<jmux> for
<jmux> Now the highlighting for the red style (blue + red) almost hurts here.
Comment 10 Daniel T. 2016-11-07 14:28:39 UTC
Created attachment 128549 [details]
Active element in Styles and Formatting invisible

I am able to reproduce this bug on my 
Kubuntu 16.04.1
LibreOffice Version: 5.1.4.2 
Build ID: 1:5.1.4-0ubuntu1
See attached screenshot.
Comment 11 Daniel T. 2016-11-07 14:42:49 UTC
Can also reproduce the bug with Version: 5.2.3.2 Build ID: 1:5.2.3~rc2-0ubuntu1~xenial1
Comment 12 Daniel T. 2017-11-08 11:22:03 UTC
I can still reproduce this in the current stable version of LibreOffice (5.4.1.2).
Comment 13 Daniel T. 2018-08-10 07:43:38 UTC
I can still reproduce this in Version: 6.0.5.2 Build ID: 1:6.0.5~rc2-0ubuntu0.17.10.1~lo1

NOTE: I could also reproduce it with a newly created tester account (i.e. with default settings for both KDE and LibreOffice).
Comment 14 Katarina Behrens (Inactive) 2018-11-08 16:16:18 UTC
*** Bug 120779 has been marked as a duplicate of this bug. ***
Comment 15 Katarina Behrens (Inactive) 2018-11-08 16:32:10 UTC
Code pointers:

Formerly svtools, now vcl treelistbox.cxx, SvTreeListBox::PaintEntry1 func. This chunk of code messes it up:

// if the face color is bright then the deactive color is also bright
// -> so you can't see any deactive selection
if (bHideSelection && !rSettings.GetFaceColor().IsBright()
    && aWallpaper.GetColor().IsBright() != rSettings.GetDeactiveColor().IsBright())
{
    aNewWallColor = rSettings.GetDeactiveColor();
}
// set font color to highlight
if (!bCurFontIsSel)
{
     rRenderContext.SetTextColor(aHighlightTextColor);
     rRenderContext.SetFont(aHighlightFont);
     bCurFontIsSel = true;
}
        
aWallpaper.SetColor(aNewWallColor);

Since default text hilight colour is white/light grey in Qt and deactive colour (what?) is also light grey, things go down the drain from there.

Those colour are set in Qt5Frame::UpdateSettings, it's the StyleSettings thingy
Comment 16 Katarina Behrens (Inactive) 2018-12-02 09:32:19 UTC
*** Bug 97905 has been marked as a duplicate of this bug. ***
Comment 17 Commit Notification 2018-12-12 11:08:16 UTC
Sumit Chauhan committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/3911bf8364dae4c855ad37237c114f9007f70657%5E%21

tdf#98253 Qt5 rely on VCL for SetDeactiveColor

It will be available in 6.3.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.
Comment 18 Michael Weghorn 2018-12-18 17:47:44 UTC
This is now fixed with the commit from comment 17 and https://gerrit.libreoffice.org/plugins/gitiles/core/+/89c888b48eca24e25ffe8895542cf7ac9b731187%5E!

commit 89c888b48eca24e25ffe8895542cf7ac9b731187
Author: Jan-Marek Glogowski <glogow@fbihome.de>
Date:   Wed Dec 12 12:57:10 2018 +0100

    Qt5+kde4 don't override generic VCL style settings
Comment 19 Commit Notification 2018-12-30 23:56:47 UTC
Sumit Chauhan committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/66d3a5b78b7a7665a75047c87ac180eeb03b476f%5E%21

tdf#98253 Qt5 rely on VCL for SetDeactiveColor

It will be available in 6.2.0.2.

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.