Re: Breeze and ECM are incompatible for installing icons

2023-11-05 Thread David Jarvie



On 4 November 2023 14:53:42 GMT, Sune Vuorela  wrote:
> On 2023-11-03, David Jarvie  wrote:
> > I wanted to provide an icon that is visually compatible with the Breeze 
> > theme, and Breeze doesn't supply it.
> 
> Did you consider submitting it to breeze ?
> 
> I have heard they don't bite that much ...

Thanks, Sune, I'll try that. It is one solution to my specific issue, but the 
general issue still remains.
--
David Jarvie
KAlarm author, KDE developer


Re: Breeze and ECM are incompatible for installing icons

2023-11-04 Thread Sune Vuorela
On 2023-11-03, David Jarvie  wrote:
> I wanted to provide an icon that is visually compatible with the Breeze 
> theme, and Breeze doesn't supply it.

Did you consider submitting it to breeze ?

I have heard they don't bite that much ...

/Sune



Re: Breeze and ECM are incompatible for installing icons

2023-11-03 Thread David Jarvie


On 3 November 2023 22:47:55 GMT, Albert Astals Cid  wrote:
> El divendres, 3 de novembre de 2023, a les 13:15:37 (CET), David Jarvie va 
> escriure:
> > On 3 November 2023 09:13:15 GMT, Carl Schwan  wrote:
> > > On Friday, November 3, 2023 12:46:20 AM CET Albert Astals Cid wrote:
> > > > El dijous, 2 de novembre de 2023, a les 14:36:16 (CET), David Jarvie va
> > > > 
> > > > escriure:
> > > > > Breeze installs its icons in a different directory structure from
> > > > > other
> > > > > icon themes, with the result that the ECM cmake command
> > > > > ecm_install_icons
> > > > > doesn't work for Breeze icons. The only way to install an application
> > > > > specific Breeze icon is to hard code its location, for example
> > > > > "${KDE_INSTALL_ICONDIR}/breeze/actions/22/".
> > > > 
> > > > Why are you installing icons in breeze icon theme if you're not the
> > > > breeze
> > > > icon theme?
> > 
> > I wanted to provide an icon that is visually compatible with the Breeze
> > theme, and Breeze doesn't supply it.
> 
> What if another application wants to supply an icon with the same name that 
> is 
> also visually compatible with the Breeze theme?
> 
> Should it overwrite the one that your application provides?

Perhaps I should rename the icon to include the application name to avoid 
possible conflicts.

There is always the potential for name conflicts, but that doesn't change the 
issue, which is that applications (KDE or third party) should be able to 
correctly install icons for any icon theme which is known to KDE, at least, 
using ecm_install_icons.

> > > > Seems wrong to me.
> > > 
> > > Yes, it's wrong. We made the same mistake in Tokodon and the correct way
> > > to do it is to install in the hicolor theme. This allow the theme to
> > > overwrite the icon if they want and don't force you to hardcode the
> > > breeze icon theme.
> > Third party applications are quite entitled to install their own icons in
> > the Breeze theme, and currently this won't work using the ECM function.
> > This issue doesn't just apply to applications which are part of KDE.

--
David Jarvie
KAlarm author, KDE developer


Re: Breeze and ECM are incompatible for installing icons

2023-11-03 Thread Albert Astals Cid
El divendres, 3 de novembre de 2023, a les 13:15:37 (CET), David Jarvie va 
escriure:
> On 3 November 2023 09:13:15 GMT, Carl Schwan  wrote:
> > On Friday, November 3, 2023 12:46:20 AM CET Albert Astals Cid wrote:
> > > El dijous, 2 de novembre de 2023, a les 14:36:16 (CET), David Jarvie va
> > > 
> > > escriure:
> > > > Breeze installs its icons in a different directory structure from
> > > > other
> > > > icon themes, with the result that the ECM cmake command
> > > > ecm_install_icons
> > > > doesn't work for Breeze icons. The only way to install an application
> > > > specific Breeze icon is to hard code its location, for example
> > > > "${KDE_INSTALL_ICONDIR}/breeze/actions/22/".
> > > 
> > > Why are you installing icons in breeze icon theme if you're not the
> > > breeze
> > > icon theme?
> 
> I wanted to provide an icon that is visually compatible with the Breeze
> theme, and Breeze doesn't supply it.

What if another application wants to supply an icon with the same name that is 
also visually compatible with the Breeze theme?

Should it overwrite the one that your application provides?

Cheers,
  Albert

> > > Seems wrong to me.
> > 
> > Yes, it's wrong. We made the same mistake in Tokodon and the correct way
> > to do it is to install in the hicolor theme. This allow the theme to
> > overwrite the icon if they want and don't force you to hardcode the
> > breeze icon theme.
> Third party applications are quite entitled to install their own icons in
> the Breeze theme, and currently this won't work using the ECM function.
> This issue doesn't just apply to applications which are part of KDE.
> 
> --
> David Jarvie
> KAlarm author, KDE developer






Re: Breeze and ECM are incompatible for installing icons

2023-11-03 Thread David Jarvie



On 3 November 2023 09:13:15 GMT, Carl Schwan  wrote:
> On Friday, November 3, 2023 12:46:20 AM CET Albert Astals Cid wrote:
> > El dijous, 2 de novembre de 2023, a les 14:36:16 (CET), David Jarvie va
> > 
> > escriure:
> > > Breeze installs its icons in a different directory structure from other
> > > icon themes, with the result that the ECM cmake command ecm_install_icons
> > > doesn't work for Breeze icons. The only way to install an application
> > > specific Breeze icon is to hard code its location, for example
> > > "${KDE_INSTALL_ICONDIR}/breeze/actions/22/".
> > 
> > Why are you installing icons in breeze icon theme if you're not the breeze
> > icon theme?

I wanted to provide an icon that is visually compatible with the Breeze theme, 
and Breeze doesn't supply it.

> > Seems wrong to me.
> 
> Yes, it's wrong. We made the same mistake in Tokodon and the correct way to 
> do 
> it is to install in the hicolor theme. This allow the theme to overwrite the 
> icon if they want and don't force you to hardcode the breeze icon theme.

Third party applications are quite entitled to install their own icons in the 
Breeze theme, and currently this won't work using the ECM function. This issue 
doesn't just apply to applications which are part of KDE.

--
David Jarvie
KAlarm author, KDE developer


Re: Breeze and ECM are incompatible for installing icons

2023-11-03 Thread Carl Schwan
On Friday, November 3, 2023 12:46:20 AM CET Albert Astals Cid wrote:
> El dijous, 2 de novembre de 2023, a les 14:36:16 (CET), David Jarvie va
> 
> escriure:
> > Breeze installs its icons in a different directory structure from other
> > icon themes, with the result that the ECM cmake command ecm_install_icons
> > doesn't work for Breeze icons. The only way to install an application
> > specific Breeze icon is to hard code its location, for example
> > "${KDE_INSTALL_ICONDIR}/breeze/actions/22/".
> 
> Why are you installing icons in breeze icon theme if you're not the breeze
> icon theme?
> 
> Seems wrong to me.

Yes, it's wrong. We made the same mistake in Tokodon and the correct way to do 
it is to install in the hicolor theme. This allow the theme to overwrite the 
icon if they want and don't force you to hardcode the breeze icon theme.




Re: Breeze and ECM are incompatible for installing icons

2023-11-02 Thread Albert Astals Cid
El dijous, 2 de novembre de 2023, a les 14:36:16 (CET), David Jarvie va 
escriure:
> Breeze installs its icons in a different directory structure from other icon
> themes, with the result that the ECM cmake command ecm_install_icons
> doesn't work for Breeze icons. The only way to install an application
> specific Breeze icon is to hard code its location, for example
> "${KDE_INSTALL_ICONDIR}/breeze/actions/22/". 

Why are you installing icons in breeze icon theme if you're not the breeze 
icon theme?

Seems wrong to me.

Cheers,
  Albert

> I raised a bug against ECM
> about this, but not unexpectedly it has been rejected as a Breeze issue
> (see https://bugs.kde.org/show_bug.cgi?id=476208).
> 
> Fixing this in Breeze would obviously be a significant change for Breeze,
> but having a non-working ecm_install_icons function isn't really
> acceptable. This should ideally be fixed one way or the other in time for
> the KF6 release. --
> David Jarvie
> KAlarm author, KDE developer






Re: Breeze and ECM are incompatible for installing icons

2023-11-02 Thread Friedrich W. H. Kossebau
Am Donnerstag, 2. November 2023, 14:51:48 CET schrieb Harald Sitter:
> https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-lates
> t.html
> > Each directory contains icons designed for a certain nominal icon size and
> > scale, as described by the index.theme file
> ...
> 
> > list of subdirectories for this theme. For every subdirectory there must
> > be a section in the index.theme file describing that directory.
> Just my 2 cents, but since the specification specifically allows theme
> authors to do whatever, if ECM doesn't support that then ECM appears
> not spec compliant.

ECM though can only know about the actual layout at a given time, and create 
install rules for the build system based on that, which then result in the 
path as used by the package created at the time.

If an icon theme at some point in time decides to change its internal dir 
layout, any 3rd-party icons will suddenly be installed at the wrong place.

ECM needs to know about the internal dir layout -> needs to be able to access 
the actual theme desktop file and extract the info.

Packages need to have dependencies on the internal dir layout. So if an icon 
theme changes in an incompatible way, packages need to be rebuild, to install 
theme icons to the new places.

Time for a public icon theme application-installing-interface version with 
each icon theme? :P

Alternatively icon themes might need to support looking up icons also in some 
specified standard way, next to their custom one... needs people who have fun 
working on specs and ensuring its support by stakeholders :)

Some more 2 cents, from my couch :)
Friedrich




Re: Breeze and ECM are incompatible for installing icons

2023-11-02 Thread Harald Sitter
https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html

> Each directory contains icons designed for a certain nominal icon size and 
> scale, as described by the index.theme file
...
> list of subdirectories for this theme. For every subdirectory there must be a 
> section in the index.theme file describing that directory.

Just my 2 cents, but since the specification specifically allows theme
authors to do whatever, if ECM doesn't support that then ECM appears
not spec compliant.

On Thu, Nov 2, 2023 at 2:36 PM David Jarvie  wrote:
>
> Breeze installs its icons in a different directory structure from other icon 
> themes, with the result that the ECM cmake command ecm_install_icons doesn't 
> work for Breeze icons. The only way to install an application specific Breeze 
> icon is to hard code its location, for example 
> "${KDE_INSTALL_ICONDIR}/breeze/actions/22/". I raised a bug against ECM about 
> this, but not unexpectedly it has been rejected as a Breeze issue (see 
> https://bugs.kde.org/show_bug.cgi?id=476208).
>
> Fixing this in Breeze would obviously be a significant change for Breeze, but 
> having a non-working ecm_install_icons function isn't really acceptable. This 
> should ideally be fixed one way or the other in time for the KF6 release.
> --
> David Jarvie
> KAlarm author, KDE developer