Bug 502275 - TRI-COLOUR CARTRIDGE INK LEVEL NOT RENDERED
Summary: TRI-COLOUR CARTRIDGE INK LEVEL NOT RENDERED
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_printer_manager (show other bugs)
Version: 5.27.12
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-01 12:48 UTC by JT
Modified: 2025-04-01 19:38 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JT 2025-04-01 12:48:44 UTC
SUMMARY

When using a printer with a tri-colour cartridge, e.g. Canon Pixma TS3355, the colour ink level progress bar is not rendered.

STEPS TO REPRODUCE

1.  Open System Settings > Printers
2.  Select printer with a tri-colour cartridge.

OBSERVED RESULT

The colour cartridge ink level progress bar is not rendered.

EXPECTED RESULT

The progress bar should be rendered with a rainbow effect.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Kubuntu 24.04 LTS
KDE Plasma Version: 5.27.12
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION

/etc/cups/printers.conf
-------------
...
Attribute marker-colors \#00CFFF#F200FF#FFDA00,#000000
Attribute marker-levels 90,70
Attribute marker-low-levels 15,15
Attribute marker-high-levels 100,100
Attribute marker-names Color,Black
Attribute marker-types ink-cartridge,ink-cartridge
Attribute marker-change-time 1743508388
...

Attribute marker-colors \#000000,#000000 renders the progress bar, albeit in black, but this is only temporary. When the printer comes back online it is overwritten.

Would it be possible to add logic to infer that a tri-colour cartridge is installed and render it with a rainbow effect?

It seems safe to infer that a tri-colour cartridge is installed when marker-levels, marker-low-levels, marker-high-levels, marker-names and marker-types are all duos.
Comment 1 JT 2025-04-01 12:52:13 UTC
SUMMARY

When using a printer with a tri-colour cartridge, e.g. Canon Pixma TS3355, the colour ink level progress bar is not rendered.

STEPS TO REPRODUCE

1.  Open System Settings > Printers
2.  Select printer with a tri-colour cartridge.

OBSERVED RESULT

The colour cartridge ink level progress bar is not rendered.

EXPECTED RESULT

The progress bar should be rendered with a rainbow effect.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Kubuntu 24.04 LTS
KDE Plasma Version: 5.27.12
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION

/etc/cups/printers.conf
-------------
...
Attribute marker-colors \#00CFFF#F200FF#FFDA00,#000000
Attribute marker-levels 90,70
Attribute marker-low-levels 15,15
Attribute marker-high-levels 100,100
Attribute marker-names Color,Black
Attribute marker-types ink-cartridge,ink-cartridge
Attribute marker-change-time 1743508388
...

Attribute marker-colors \#000000,#000000 renders the progress bar, albeit in black, but this is only temporary. When the printer comes back online it is overwritten.

Would it be possible to add logic to infer that a tri-colour cartridge is installed and render it with a rainbow effect?

It seems safe to infer that a tri-colour cartridge is installed when marker-levels, marker-low-levels, marker-high-levels, marker-names and marker-types are all duos.
Comment 2 Mike 2025-04-01 12:59:01 UTC
There was some work done in the move to Plasma6 to make sure the multi-cartridge levels are fully shown and that the colors would also show.  CUPS is not always consistent in providing complete marker info, but Plasma6 should do a much better job than earlier versions.
Comment 3 JT 2025-04-01 13:18:05 UTC
(In reply to Mike from comment #2)
> There was some work done in the move to Plasma6 to make sure the
> multi-cartridge levels are fully shown and that the colors would also show. 
> CUPS is not always consistent in providing complete marker info, but Plasma6
> should do a much better job than earlier versions.

Thanks for quick response. Will look at 6 kcm_printer_manager source with interest and wait for next Kubuntu with 6.
Comment 4 JT 2025-04-01 15:03:53 UTC
Well, judging from 6.3.3 PrinterSettings.qml line 467, progress bars are still limited to rendering with CUPS marker-colors. grep -R -n -i progressbarstyle src/* returned nothing (was looking for evidence of a rainbow effect linear-gradient). So I guess this is still an issue. As to what goes on after KCupsRequest.cpp getPrinterAttributes, when there is a discrepancy between markers-colors count and other marker-* counts, is a bit beyond me at the moment.

Perhaps this could be examined a bit further, there must be many users with tri-colour cartridge printers.
Comment 5 TraceyC 2025-04-01 18:46:18 UTC
(In reply to JT from comment #4)
> Well, judging from 6.3.3 PrinterSettings.qml line 467, progress bars are
> still limited to rendering with CUPS marker-colors. grep -R -n -i
> progressbarstyle src/* returned nothing (was looking for evidence of a
> rainbow effect linear-gradient). So I guess this is still an issue.

Thanks for checking into this on your system. This sounds like a feature request that's different than the original report of not seeing the ink levels at all. Please open a new request for the feature request of changing how ink levels are displayed. Thanks.
Comment 6 JT 2025-04-01 19:38:19 UTC
Thanks TraceyC. Please excuse my inexperience in when to file a bug report and when to file a feature request.

For the record, I swapped things around in printers.conf out of curiousity:

Attribute marker-colors \#000000,#00CFFF#F200FF#FFDA00

Sure enough, colour progress bar showed correct level, albeit in black, whilst black PB was empty.

Conclusion, QML ProgressBar is quite naturally confused when fed with a colour string in the format #<RGB>#<RGB>#<RGB> .

Seems to me that only a little code would be required to parse format of colour string and add a ProgressBarStyle with a rainbow effect linear-gradient in the case of an #<RGB>#<RGB>#<RGB> format.

OK, I'll file a feature request when time permits.