Bug 567672 - [GTK] Toolbar icons don't render as disabled
Summary: [GTK] Toolbar icons don't render as disabled
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.17   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.18 M1   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-10-07 08:49 EDT by Alexander Levsha CLA
Modified: 2020-10-08 06:55 EDT (History)
1 user (show)

See Also:


Attachments
properly auto-generated disabled icons in the menu vs toolbar (32.01 KB, image/png)
2020-10-07 08:49 EDT, Alexander Levsha CLA
no flags Details
repro project (5.78 KB, application/zip)
2020-10-07 10:05 EDT, Alexander Levsha CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Levsha CLA 2020-10-07 08:49:23 EDT
Created attachment 284385 [details]
properly auto-generated disabled icons in the menu vs toolbar

My plugin has a toolbar with a bunch of commands. Before updating to 4.17 their icons became disabled (low-contrast) when the command is disabled (has no handler/whatever).
I relied on this and never provided separate disabled icons for my commands.

In 4.17 toolbar buttons render the base icons regardless of the command state.
But in a menu, the icons correctly render their Eclipse-generated disabled version as expected.

See attached screenshot for menu (old behaviour)/toolbar comparison.
Comment 1 Andrey Loskutov CLA 2020-10-07 09:00:31 EDT
What is the last working Eclipse version for you?
Can you provide a minimal working snippet to reproduce?
This reminds me somehow on bug 563407.

Please also attach your GTK version if this is a Linux only issue.
Comment 2 Alexander Levsha CLA 2020-10-07 10:05:47 EDT
Created attachment 284386 [details]
repro project

I made a quick repro with 2 commands and handlers, one disabled by the lack of handler impl class, another disabled explicitly by an enabledWhen rule.

Both are added into a menu and a toolbar, and both reproduce the issue.

I checked on Windows and this is indeed a Linux only issue.
GTK version is 3.24.20.
Comment 3 Alexander Levsha CLA 2020-10-07 10:17:16 EDT
Forgot to mention, this only broke in the last release (4.17), was working fine until the update.
Comment 4 Andrey Loskutov CLA 2020-10-07 10:24:11 EDT
(In reply to Alexander Levsha from comment #3)
> Forgot to mention, this only broke in the last release (4.17), was working
> fine until the update.

Both icons in the toolbar & menu look disabled for me on 4.18 head (GTK 3.22). Can you please try with latest I build?
Comment 5 Alexander Levsha CLA 2020-10-07 11:18:12 EDT
Yep, in I20201007-0600 it works for me as well, both in the repro case and with my main plugin. So i guess it's only broken in 4.17.
Comment 6 Andrey Loskutov CLA 2020-10-07 15:52:48 EDT
Alexander, it would be great if you could bisect this to the right commit that broke 4.17 and for bonus points to the commit that fixed this in 4.18.
Comment 7 Alexander Levsha CLA 2020-10-08 06:55:17 EDT
I'm afraid that would be outside my area of expertise. I never managed to make my eclipse source workspace error-free, let alone run it from source.