Bug 89760 - (Ambiance theme) Buttons like "Close Preview" in Print Preview are active, but greyed out
Summary: (Ambiance theme) Buttons like "Close Preview" in Print Preview are active, bu...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.4.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: high normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.3.0 target:5.2.4
Keywords: bibisected, bisected, regression
: 85990 86774 91233 95101 95571 104471 (view as bug list)
Depends on:
Blocks: GTK3 UI-Theming
  Show dependency treegraph
 
Reported: 2015-03-01 17:38 UTC by bordfeldt
Modified: 2016-12-07 17:23 UTC (History)
14 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot with "Close Preview"-button (13.55 KB, image/png)
2015-03-01 17:38 UTC, bordfeldt
Details
srceen print from daily 2016 10 18 (46.26 KB, image/png)
2016-10-18 09:42 UTC, Cor Nouws
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bordfeldt 2015-03-01 17:38:38 UTC
Created attachment 113799 [details]
Screenshot with "Close Preview"-button

LO 4.4.1.2 on Xubuntu 14.04 64bit

In Print-Preview-Mode in Writer or Calc the "Close Preview"-Button is active, but greyed out.
Comment 1 Joel Madero 2015-03-01 17:59:51 UTC
Cannot confirm:

Ubuntu 14.10 x64
LibreOffice 4.4.1.2 rc
Comment 2 Cor Nouws 2015-03-01 20:00:50 UTC
same issue as the other bugs?
Comment 3 raal 2015-03-01 20:25:57 UTC
I can confirm with Version: 4.4.2.0.0+
Build ID: 3e3f0f5c3051ea982f8f753e0f3e51441e8f9496
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:libreoffice-4-4, Time: 2015-02-22_10:24:01
Probably same root cause as in bug 85990
Comment 4 Luke 2015-03-28 20:07:35 UTC
I CAN confirm:

Ubuntu 14.10 x86
LibreOffice: 4.5.0.0.alpha0+
Build ID: 4ee55eed6a34f6f061a0cd369a30afb464f9fa27
Comment 5 raal 2015-03-29 19:44:54 UTC
This appears to have begun at the below commit.

Adding Cc: to meta_dev@yahoo.com ; Could you possibly take a look at this? Thanks
 ed815944b5123c83f574bc814c266d1a346af05c is the first bad commit
commit ed815944b5123c83f574bc814c266d1a346af05c
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sun Mar 15 03:14:10 2015 +0800

    source-hash-0ed0974298992ae871a8fbe79f856cf2588aeec6
    
    (Bibisect: Skipped preceding irrelevant commit(s) e5bbc721d6bd5536bdd34f33fc79933a379f2919)
    
    commit 0ed0974298992ae871a8fbe79f856cf2588aeec6
    Author:     Michael Jaumann <meta_dev@yahoo.com>
    AuthorDate: Tue Sep 23 12:34:54 2014 +0000
    Commit:     Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
    CommitDate: Mon Sep 29 17:44:07 2014 +0000
    
        fdo#59299 Personas for bottom toolbars
    
        Change-Id: If823964bf3bb67563504db61b6c5d557cab89243
        Reviewed-on: https://gerrit.libreoffice.org/11609
        Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
        Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>

:040000 040000 cbef77b3f28fa181e5bf377bc21d72684b7d8266 4fe9067c423579069e3ca6dafc6a9bf08b3690f5 M	opt

git bisect log
# bad: [cf6ea17155fabb2a120ba07c150735591ac861d7] source-hash-3f94c9e9ddfd807b449f3bb9b232cf2041fa12d2
# good: [fc71ac001f16209654d15ef8c1c4018aa55769f5] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
git bisect start 'latest' 'oldest'
# good: [8cf60cc706948588e2f33a6d98b7c55d454e362a] source-hash-f340f0454627939f1830826fb5cc53a90e6c62a4
git bisect good 8cf60cc706948588e2f33a6d98b7c55d454e362a
# bad: [7beddf3808dadd525d7e55c00a5a90a2b44c23d3] source-hash-2f10386ce577f52e139aa23d41bc787d8e0b4d59
git bisect bad 7beddf3808dadd525d7e55c00a5a90a2b44c23d3
# good: [7d319609d8266af06aa3256fd3773d052b9150dc] source-hash-1fec67aab152e0c0ad6dd85082c50f1beff7d520
git bisect good 7d319609d8266af06aa3256fd3773d052b9150dc
# bad: [136c4fdf380a2d05111e313540e4be01a74c4eb6] source-hash-7bacb89bb955f4985e435c33dde629099dab744b
git bisect bad 136c4fdf380a2d05111e313540e4be01a74c4eb6
# good: [f3c053a278b473b5029baf72c02bdc3d78289b51] source-hash-a37a8733609a59eccabf89b2ff67d5ee6bf194bb
git bisect good f3c053a278b473b5029baf72c02bdc3d78289b51
# good: [30a34b701cf5b78868db5cc5ec7df738a54a5efb] source-hash-63ec219eca557c562433c4e9965a6f154e5966b5
git bisect good 30a34b701cf5b78868db5cc5ec7df738a54a5efb
# bad: [9ebfb6380d0d06e5465527738e402cd58bb7c467] source-hash-a67e6ae04086f2f60bb9747fbfc09a5a3d303d84
git bisect bad 9ebfb6380d0d06e5465527738e402cd58bb7c467
# good: [b629fd5ebfe6113a8db53ac648ab8b7a936f72da] source-hash-c353caee1c86476d98cd483f963f63c4195975f4
git bisect good b629fd5ebfe6113a8db53ac648ab8b7a936f72da
# good: [ca930c01a86e13c009262cc284749154e49721a4] source-hash-0b23ac2c9d36c89137feeb82d0aed7a8628a53b7
git bisect good ca930c01a86e13c009262cc284749154e49721a4
# good: [4eb8ac0bf78ea68f9fc0e5bdf0a7e7544aa2a222] source-hash-1424a8174eb37d26a2ec41a981a74f34661c0044
git bisect good 4eb8ac0bf78ea68f9fc0e5bdf0a7e7544aa2a222
# bad: [7287f3141a4844c3fc7ca6b474580bea64f1393a] source-hash-2b2246bb164ae58a39843218dcbcc425e4c38803
git bisect bad 7287f3141a4844c3fc7ca6b474580bea64f1393a
# good: [0fc28e9644906185ee02553a0365b207cc4f2a2e] source-hash-b3bee2b8f8603700751941477504c47286355c3a
git bisect good 0fc28e9644906185ee02553a0365b207cc4f2a2e
# bad: [ed815944b5123c83f574bc814c266d1a346af05c] source-hash-0ed0974298992ae871a8fbe79f856cf2588aeec6
git bisect bad ed815944b5123c83f574bc814c266d1a346af05c
# good: [70158c08befaf6d6289133733b7961b3ec953499] source-hash-16dba68cf1eff65b81fbc75d1138604acc8abd08
git bisect good 70158c08befaf6d6289133733b7961b3ec953499
# first bad commit: [ed815944b5123c83f574bc814c266d1a346af05c] source-hash-0ed0974298992ae871a8fbe79f856cf2588aeec6
Comment 6 Matthew Francis 2015-03-30 01:52:47 UTC
@raal: Thanks for bisecting this one. If you have another minute at some point, could you possibly check if the two linked bugs (bug 86774 and bug 85990) come from the same commit (i.e. are duplicates) ?

No need to go through the whole bisection again, just checkout source-hash-0ed0974298992ae871a8fbe79f856cf2588aeec6 and check the behaviour, then checkout HEAD~1 (the commit before the current commit) and compare.
Comment 7 raal 2015-03-31 06:01:34 UTC
*** Bug 85990 has been marked as a duplicate of this bug. ***
Comment 8 Michael Jaumann 2015-03-31 10:06:20 UTC
@raal: Thanks vor bibisecting!

this is most likely causted by http://opengrok.libreoffice.org/xref/core/vcl/source/window/toolbox.cxx#1469 SetTextColor(...

Unfortunatly i didn't have any LO build or time to investigate on this.
Comment 9 raal 2015-04-01 14:12:55 UTC
*** Bug 86774 has been marked as a duplicate of this bug. ***
Comment 10 steve 2015-04-30 09:03:33 UTC
Ubuntu 15.04 LO Version: 4.4.2.2
Build ID: 40m0(Build:2)
Locale: en_US

Still happening.
Comment 11 Adolfo Jayme Barrientos 2015-05-12 12:47:08 UTC
*** Bug 91233 has been marked as a duplicate of this bug. ***
Comment 12 Luke 2015-10-10 00:27:32 UTC
Michael or Samuel.
Could you please look into this issue? This regression is still affecting recent builds. 

Tested on Version: 5.1.0.0.alpha1+
Build ID: 2e6feddc53830406fa04b4a0aea49bb8438dc702
Comment 13 Joey Reid 2015-10-13 06:44:42 UTC Comment hidden (me-too)
Comment 14 Michael Jaumann 2015-10-13 09:12:25 UTC
Sry, for my absence.
I think i can try to fix it next week. Just have to resetup my development environment.
Comment 15 Joel Madero 2015-10-13 13:27:21 UTC
Just FYI - this isn't how the project works. Sometimes the fix has fixed something more serious than the regression so we don't have an "automatically revert" policy. Nor do we have a "demand volunteers do X" policy.
Comment 16 Adolfo Jayme Barrientos 2015-10-16 11:58:59 UTC
*** Bug 95101 has been marked as a duplicate of this bug. ***
Comment 17 Luke 2015-10-16 19:21:38 UTC
[Template Manager] "New Folder" button is also greyed out. The Ubuntu bug report also lists more examples outside of print preview. Review duplicates and see also, for further details. 

The common theme seems to be buttons that use text instead of icons suffer from this regression.
Comment 18 Luke 2015-10-16 19:41:37 UTC
Also these only affect dark desktop themes. If you change the theme from Ambiance to Radiance, the text buttons will not be greyed out.
Comment 19 Michael Jaumann 2015-10-22 10:36:20 UTC
can't reproduce it with Linux Mint 17.2 Rafaela 

LO: 5.1.0.0.alpha1+

tried dark and bright desktop themes, cinnamon and kde desktops
Comment 20 Maxim Monastirsky 2015-11-04 14:39:22 UTC
*** Bug 95571 has been marked as a duplicate of this bug. ***
Comment 21 Luke 2015-11-04 20:00:44 UTC
Michael Jaumann,
If your distro supports GTK3, you must:

$ SAL_USE_VCLPLUGIN=gtk ./soffice

I can still reproduce this bug with a recent build, 
Version: 5.1.0.0.alpha1+
Build ID: ce463679a5a362d5c3f7c146f70b6be838ddbb2d
Comment 22 Robinson Tryon (qubit) 2015-12-13 11:12:08 UTC Comment hidden (obsolete)
Comment 23 Luke 2016-07-31 03:36:07 UTC
File > Templates > Manage > "New Folder" and 
File > Print Preview > "Close Preview"  both appear greyed out in the LibreOffice that ships with Ubuntu 16.04, Version: 5.1.4.2
Build ID: 1:5.1.4-0ubuntu1

With recent Version: 5.3.0.0.alpha0+
Build ID: 4a6329badc9c8679945d1a1ec225e26e15d7bfd2
"Close Preview" is still greyed out
Comment 24 Cor Nouws 2016-09-01 19:57:46 UTC
setting priority to high
It makes not only bad visibility of the controls but more important a bad presentation on an important OS, lasting 1.5 year now, so as if a neat UI is not important.
Comment 25 Luke 2016-09-24 19:27:48 UTC
Still an issue with Version: 5.2.1.2
Build ID: 1:5.2.1~rc2-0ubuntu1 that ships with Ubuntu 16.10.
Comment 26 Commit Notification 2016-10-17 20:46:04 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b5f9fdff49e6955550cffa5318bee9d5c09f3479

Resolves: tdf#89760 get correct menubar text color for 'close preview'

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 27 Caolán McNamara 2016-10-17 20:46:36 UTC
seems to work for me with that in place
Comment 28 Cor Nouws 2016-10-18 09:42:35 UTC
Created attachment 128054 [details]
srceen print from daily 2016 10 18

(In reply to Caolán McNamara from comment #27)
> seems to work for me with that in place

I don't see any improvement - see attachment
Comment 29 Adolfo Jayme Barrientos 2016-10-18 10:54:53 UTC
@Cor: I think you should install the “libreoffice-gtk3” package… The Ambiance theme should be usable with GTK+3 LibreOffice since Ubuntu 16.10.
Comment 30 Caolán McNamara 2016-10-18 11:13:13 UTC
If you've still got a problem, then I need to know the details of the platform you are running on because there are significant differences in how themes work in gtk3 between < 3.20 and >= 3.20. I'm assuming Ubuntu, so...

lsb_release -a
and
dpkg -l libgtk-3-0
Comment 31 Cor Nouws 2016-10-18 12:06:13 UTC
(In reply to Caolán McNamara from comment #30)

$ lsb_release -a
LSB Version:	core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.1 LTS
Release:	16.04
Codename:	xenial

$ dpkg -l libgtk-3-0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                 Version         Architecture    Description
+++-====================-===============-===============-=============================================
ii  libgtk-3-0:amd64     3.18.9-1ubuntu3 amd64           GTK+ graphical user interface library
Comment 32 Luke 2016-10-18 16:47:08 UTC
Caolán,
This is NOT a gtk3 specific issue. As I said earlier, you must use:

$ SAL_USE_VCLPLUGIN=gtk ./soffice

It's still not fixed with Build ID: e64ea98801d20e5024da900a0ac8faaf565f4bf3 on 16.04.
Comment 33 Caolán McNamara 2016-10-18 19:57:17 UTC
ah right. gtk2 problem remains of course. I suppose the real problem then is using the menubar color inside a toolbox. We should add a ToolbarTextColor I guess and pull the font from a native toolbarbutton
Comment 34 Luke 2016-11-17 10:17:53 UTC
After 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=739c9780f003bf2628713f04d6e0d20451f14dfb

It looks like the gtk3 issue is back.
Comment 35 Caolán McNamara 2016-11-17 13:02:17 UTC
That suggests that the problem is simply that the menubar font color is used instead of the toolbar font color, so we need to add a ToolFontColor and use it instead of using the menufontcolor in the toolbar
Comment 38 Luke 2016-11-18 09:54:55 UTC
Verified FIXED for both the gtk and gtk3 backends under 16.04. 
Tested on Version: 5.3.0.0.alpha1+
Build ID: 395295a40c24a49c12415ec803860a888d734515

Thanks Caolán!
Comment 39 Cor Nouws 2016-11-18 10:33:34 UTC
lovely, thanks!
Comment 40 Commit Notification 2016-11-24 12:08:42 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1439b3499ced0f1131af8e0de107e96d8aac4039&h=libreoffice-5-2

Resolves: tdf#89760 add and use a ToolFontColor for toolbar item entries

It will be available in 5.2.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 41 Xisco Faulí 2016-11-30 15:20:33 UTC
*** Bug 90572 has been marked as a duplicate of this bug. ***
Comment 42 Xisco Faulí 2016-11-30 15:20:58 UTC
*** Bug 104284 has been marked as a duplicate of this bug. ***
Comment 43 Aron Budea 2016-12-07 17:23:31 UTC
*** Bug 104471 has been marked as a duplicate of this bug. ***