How to load icons in a table in SLES 15
Hello Team, I was searching for a way to load icons in table. And got the yast example for this in git https://raw.githubusercontent.com/yast/yast-ycp-ui-bindings/master/examples/... I tried executing this example on SLES 15 SP4 there icon Name are loading but icons are not loading in table. Same example I executed on SLES 12 SP5, there I can see the icon Name and icons in the table are loading without any issue. Is there any change in SLES 15 for loading the icons in table ? Regards, Gaurav
On 2023-04-18 12:00, Gaurav Kumar wrote:
I was searching for a way to load icons in table. And got the yast example for this in git https://raw.githubusercontent.com/yast/yast-ycp-ui-bindings/master/examples/...
I tried executing this example on SLES 15 SP4 there icon Name are loading but icons are not loading in table.
The way icons are loaded changed; it now tries several locations: - A theme icon provided by the desktop, if there is one by that name - A compiled-in icon (using Qt's resource system) - A full path. See also https://github.com/libyui/libyui/blob/master/libyui-qt/src/YQUI.cc#L673-L700 It does work in tables; for example, the partitioner has a "Type" column that displays an icon for the device type. Let me see if I can come up with a simple example, or if I can fix that Table-icons.rb example that you tried. Unfortunately, this is one of many examples that was not manually updated / beautified after the big YCP -> Ruby conversion. Kind regards -- Stefan Hundhammer <shundhammer@suse.de> YaST Developer SUSE Software Solutions Germany GmbH GF: Ivo Totev; HRB 36809, AG Nürnberg
On 2023-04-18 13:38, Stefan Hundhammer wrote:
On 2023-04-18 12:00, Gaurav Kumar wrote:
I was searching for a way to load icons in table. And got the yast example for this in git https://raw.githubusercontent.com/yast/yast-ycp-ui-bindings/master/examples/...
I tried executing this example on SLES 15 SP4 there icon Name are loading but icons are not loading in table.
The way icons are loaded changed; it now tries several locations:
- A theme icon provided by the desktop, if there is one by that name
- A compiled-in icon (using Qt's resource system)
- A full path.
It turned out that the last fallback (full path) stopped working about 5 years ago after the last major change; the one that introduced loading theme icons and then trying compiled-in icons. https://github.com/libyui/libyui/pull/94 (WIP) Kind regards -- Stefan Hundhammer <shundhammer@suse.de> YaST Developer SUSE Software Solutions Germany GmbH GF: Ivo Totev; HRB 36809, AG Nürnberg
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1210591 Fixes are on the way: - SLE-15-SP4: https://github.com/libyui/libyui/pull/94 - SLE-15-SP5: https://github.com/libyui/libyui/pull/95 - Factory/TW: https://github.com/libyui/libyui/pull/96 For more details, see the pull requests and Bugzilla. Kind regards -- Stefan Hundhammer <shundhammer@suse.de> YaST Developer SUSE Software Solutions Germany GmbH GF: Ivo Totev; HRB 36809, AG Nürnberg
participants (2)
-
Gaurav Kumar
-
Stefan Hundhammer