Bug 433838 - RFE: Fedora icon in desktop menu
RFE: Fedora icon in desktop menu
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: xfdesktop (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Kevin Fenzi
Fedora Extras Quality Assurance
: FutureFeature
Depends On: 445986
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-21 12:25 EST by Christoph Wickert
Modified: 2008-12-02 16:57 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-02 16:57:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
128x128px start-here.png (4.87 KB, image/png)
2008-02-22 02:40 EST, Nicu Buculei
no flags Details
48x48px with 4px spacing (1.77 KB, image/png)
2008-02-22 12:24 EST, Nicu Buculei
no flags Details
svg version of the 48x48 icon (6.34 KB, image/svg+xml)
2008-02-22 12:24 EST, Nicu Buculei
no flags Details
Patch to show fedora logo in desktop menu (1.07 KB, patch)
2008-03-08 09:14 EST, Christoph Wickert
no flags Details | Diff
Patch to detect and use the fedora icon if present (1016 bytes, patch)
2008-03-15 20:41 EDT, Kevin Fenzi
no flags Details | Diff
Patch to modifiy the path for the menu icon (558 bytes, patch)
2008-05-06 00:09 EDT, Christoph Wickert
no flags Details | Diff

  None (edit)
Description Christoph Wickert 2008-02-21 12:25:44 EST
Description of problem:
Replace the default Xfce desktop menu icon with the Fedora logo as shown on
http://cwickert.fedorapeople.org/screenshots/xfce4-panel-png.png
Normal Xfce icon on the left, Fedora icon on the right.

Version-Release number of selected component (if applicable):
xfdesktop-4.4.2-1.fc9

Additional info:
We cannot use fedora-logo-icon.png because the Xfce panel needs much more space
around the icon, so we need to include another icon in xfdesktop. I have created
a patch and two icons, but I'm not sure if I should do this with png or svg.

By default Xfce uses a 48x48 png here, but for panels larger then 64px this
looks bad and this especially effects the round Infinity icon. The png works
fine for panels from 24-64 px, the svg works for everything from 24-max, but
unfortunately I wasn't able to get an unbranded version of the svg logo from
logo@fpo. The small "TM" on the left looks like a pixel error on normal panels.

Everything below 24 px looks ugyl, because the icon is being cut of on the left
and right. This is a bug in xfce4-panel that affects all plugins and also
happens with the original icon.

Screenshots:
Panel with png at 64 px. The png looks bad compared to the launchers which are
in svg.
http://cwickert.fedorapeople.org/screenshots/xfce4-panel-png-64.png

Panel with SVG at the default size of 36p: The "TM" branding looks like a pixel
error.
http://cwickert.fedorapeople.org/screenshots/xfce4-panel-svg.png

A real large 128 px panel with SVG
http://cwickert.fedorapeople.org/screenshots/xfce4-panel-svg-large.png
Comment 1 Rahul Sundaram 2008-02-21 12:32:09 EST
Any usage of Fedora logo should be part of fedora-logos package so that users
can create a debranded spin based on Fedora by installing generic-logos package. 
Comment 2 Christoph Wickert 2008-02-21 13:20:00 EST
Of course you are right. I will file a bug against fedora-logos when we have the
icon.

I think it worth considering a special Xfce icon based on Infinity so I'd like
to ask Nicu for help.

Nico, could you do this for us? Or can you help me to create a _good_ looking
png? Basically we need fedora-logo-icon in 48x48 px but with a 4 px space
instead of 1 px. My poor attempts can be found at
http://cwickert.fedorapeople.org/pixmaps/
Comment 3 Kevin Fenzi 2008-02-21 21:38:13 EST
Well, would it be possible here to use the fedora logo if it's installed and use
a generic logo if generic-logos are installed or use the Xfce logo if none of
those are installed?

I dislike carrying a patch forever thats putting in a local copy of a fedora logo. 
Comment 4 Nicu Buculei 2008-02-22 02:40:18 EST
Created attachment 295596 [details]
128x128px start-here.png

I can provide a custom version but as  Rahul pointed, you can use the already
existing icons from fedora-logos, in my GNOME install I see
(/usr/share/icons/Fedora/**x**/places/start-here.png icons with the logo at
16x16, 24x24, 32x32, 36x36, 48x48, 96x96, basically everything you need.
I attached 128x128 (with consistent colors and no TM) in case you need that
too.
Comment 5 Christoph Wickert 2008-02-22 11:58:42 EST
(In reply to comment #3)
> Well, would it be possible here to use the fedora logo if it's installed and use
> a generic logo if generic-logos are installed or use the Xfce logo if none of
> those are installed?

Mot from what I know. There is no such thing like initial and fallback icon for
the desktop-menu.

> I dislike carrying a patch forever thats putting in a local copy of a fedora
logo. 

As Rahul already pointed out this file would be in fedora-logos, so we don't
really need to care for that. We only need to make xfdesktop require
fedora-logos (if it doesn't already).

(In reply to comment #4)
> I can provide a custom version but as  Rahul pointed, you can use the already
> existing icons from fedora-logos, in my GNOME install I see
> (/usr/share/icons/Fedora/**x**/places/start-here.png icons with the logo at
> 16x16, 24x24, 32x32, 36x36, 48x48, 96x96, basically everything you need.
> I attached 128x128 (with consistent colors and no TM) in case you need that
> too.

Thanks, but this won't help us. xfce4-panel uses only one icon but not different
sizes of it like gnome-panel. Also start-here.png or fedora-logo-icon.png cannot
be used because they don't have enough space around the icon. This is what
happens to the default 36 px panel when I use the icon you attached:
http://cwickert.fedorapeople.org/screenshots/xfce4-panel-icon-cut-of.png

For an 48x48 icon xfce4-panel needs 4 px of space (instead of only 1), so the
icon itself is only 40x40. If we make the icon 96x96 and scale it down we need 8
px space to each side and so on.
Comment 6 Nicu Buculei 2008-02-22 12:24:00 EST
Created attachment 295657 [details]
48x48px with 4px spacing

It this good for you?

What happen when the panel is resized, is this 48x48 resized and look
blurry/pixelated?
Comment 7 Nicu Buculei 2008-02-22 12:24:33 EST
Created attachment 295659 [details]
svg version of the 48x48 icon
Comment 8 Kevin Fenzi 2008-02-23 23:34:08 EST
Well, the problem with this entire exersize is that if we hard code in and ship
a fedora logo, and someone does a distro based on fedora, and removes the
'fedora-logos' package and replaces it with their own generic logos package,
they will think everything is great, but will be in fact be violating the Fedora
trademark. This is bad. 

I think the only way this will work is if we can require the 'system-logos'
package and use some content in the 'fedora-logos' package or the
'generic-logos' package.

Hard coding our own is not a good option, IMHO. 
Comment 9 Christoph Wickert 2008-02-24 06:24:46 EST
(In reply to comment #6)
> Created an attachment (id=295657) [edit]
> 48x48px with 4px spacing
> 
> It this good for you?

Yes, thanks a lot for your help.
 
> What happen when the panel is resized, is this 48x48 resized and look
> blurry/pixelated?

If it is scaled up it is looking pixelated, at least for anything > than 64 px.
This is why I'd like to do this with a svg On the other hand: Who uses a panel
of 64 px?

(In reply to comment #8)
> Well, the problem with this entire exersize is that if we hard code in and ship
> a fedora logo, and someone does a distro based on fedora, and removes the
> 'fedora-logos' package and replaces it with their own generic logos package,
> they will think everything is great, but will be in fact be violating the Fedora
> trademark.

How could they violate the Fedora Trademark if the fedora logo is not included?
They will break their package if they change the logos-package but not the patch
included in xfce4-panel. But this is the same for _all_ *-fedora.patches.

> I think the only way this will work is if we can require the 'system-logos'
> package and use some content in the 'fedora-logos' package or the
> 'generic-logos' package.

What "system-logos" are you talking about? Can't find this package in rawhide or
F8, nether in pkgdb nor in koji.

> Hard coding our own is not a good option, IMHO. 

I agree that hard coding a filename that is not provided by the package is not
good, but we are doing the same for other packages too and I don't see no
alternative.
Comment 10 Nicu Buculei 2008-02-25 02:40:12 EST
> If it is scaled up it is looking pixelated, at least for anything > than 64 px.
> This is why I'd like to do this with a svg On the other hand: Who uses a panel
> of 64 px?

Then I already provided you a SVG. 
What is (should be) happening with the 4px space when resizing the icon? If you
resize the 48x48 icon to 64x64 then it will be padded with 5.33px, is that OK?
is this what the other icons do?
Comment 11 Christoph Wickert 2008-02-25 06:27:44 EST
Nicu, no need to worry, your icons are perfect. Thanks a lot.
Comment 12 Kevin Fenzi 2008-02-25 14:52:12 EST
I think I am the one getting confused here. ;) 

To clarify: 

system-logos is not a package, it's a "Provides" in both fedora-logos and
generic-logos. So, if we can depend on that instead of fedora-logos, people who
rebrand fedora should be ok. 

So, ideally, we would get a fedora branded logo into fedora-logos that we can
use, and _also_ get a generic logo into generic-logos (possibly just a copy of
the existing xfce logo if we can redistribute it?)

Does that make sense? 
Comment 13 Christoph Wickert 2008-02-26 11:56:49 EST
(In reply to comment #12)
> I think I am the one getting confused here. ;) 

Me too ;)

> system-logos is not a package, it's a "Provides" in both fedora-logos and
> generic-logos. So, if we can depend on that instead of fedora-logos, people who
> rebrand fedora should be ok. 

Question: How do we make sure then that the Fedora logo is installed? If both
fedora-logos and generic-logos provide system-logos yum will think the
requirement is fulfilled even if only generic-logos is installed. Correct? This
would result in a broken icon.

> So, ideally, we would get a fedora branded logo into fedora-logos that we can
> use, and _also_ get a generic logo into generic-logos (possibly just a copy of
> the existing xfce logo if we can redistribute it?)
> 
> Does that make sense? 

Sorry, I still don't get it... As I said before, we can only define one icon but
not two. See xfdesktop-4.4.2/panel-plugin/desktop-menu-plugin.c line 61.
Comment 14 Kevin Fenzi 2008-02-26 15:38:50 EST
>Sorry, I still don't get it... As I said before, we can only define one icon but
>not two. See xfdesktop-4.4.2/panel-plugin/desktop-menu-plugin.c line 61.

Right, so that will always point to what xfdesktop uses. 

My suggestion is to have a fedora branded version of that icon in 'fedora-logos'
package, and (using the exact same filename) a non fedora branded version in
'generic-logos'. 

Xfce will work either way, but then when fedora-logos is installed they get the
fedora branded one. When generic logos is installed they get the generic one. 
This does mean that xfdesktop will need to depend on the 'system-logos' virtual
provide however. 


Comment 15 Kevin Fenzi 2008-02-26 16:05:25 EST
Talking with notting on irc, he suggested we look at adding a patch for a
fallback if the fedora-logos version was not installed. Ie, try and load the
fedora-logos version, if that fails (ie, file doesn't exist), just fallback to
the generic Xfce logo. 

I can look at trying to make such a patch if I can get a few mintues... :) 

Then we don't need to require anything. 
Comment 16 Christoph Wickert 2008-03-08 09:14:20 EST
Created attachment 297303 [details]
Patch to show fedora logo in desktop menu

For this patch the icon needs to be /usr/share/pixmaps/xfce4_fedora.svg.
Comment 17 Christoph Wickert 2008-03-08 09:17:41 EST
I think we need to make some progress here, so I attached my patch.

I still don't understand why we need to make so much trouble. I agree that the
icon must be part of the fedora-logos package, but I don't see reasons for
patching in something like a fallback icon, because
a) the fedora-logos package is nearly impossible to remove, at least there will
be no single Gnome package left.
b) nobody expects he can "unbrand" fedora just by replacing fedora-logos and
then rebuild the whole distro. I'm sure there are lots of vendor specific
patches that need to be updated.
c) If you look at my patch you'll see it's not easy to include a fallback icon
because one of the files that needs to be patched is a desktop file. AFAIK fdo
guidelines don't have such thing like a fallback icon, so the decision for the
icon needs to made during %build/%install anyway.
Comment 18 Christoph Wickert 2008-03-08 09:49:37 EST
(In reply to comment #16)
> For this patch the icon needs to be /usr/share/pixmaps/xfce4_fedora.svg.

As it is a scalable icon I guess it' better placed in
/usr/share/icons/Fedora/scalable, but this is something for the fedora-logos
package.
Comment 19 Rahul Sundaram 2008-03-08 10:57:15 EST
Since both fedora-logos and generic-logos provide fedora-logos, you can rebrand
by doing

# rpm -e --nodeps fedora-logos
# yum install generic-logos

The idea behind it is helping derivative distributions do the right things easily.
Comment 20 Rahul Sundaram 2008-03-08 10:57:51 EST
Ugh. I meant to say they both provide system-logos...
Comment 21 Christoph Wickert 2008-03-08 14:07:57 EST
Ok, _now_ I understand.

Although generic logs provides system-logos, it doesn't provide all the icons
and these icons are referenced in a lot of patches. In gnome-panel for example
"About Fedora" will loose the icon, similar to what would happen to the
desktop-menu in xfce4-panel/xfdesktop, so I don't see a big difference here.
Comment 22 Kevin Fenzi 2008-03-08 14:46:54 EST
I have been told (but haven't confirmed) that both gnome and kde will fallback
to the generic upstream logos of those projects if fedora-logos is gone. 

I have tested that if xfdesktop can't find the panel icon it simply displays a
blank space. :( 

So, what I would like is for it to try and open the default icon from
fedora-logos, if that fails, then fall back to opening the default (current)
icon it uses now. 

I hopefully will have some time later this weekend to poke at it unless one of
you guys wants to beat me to it. ;) 
Comment 23 Rahul Sundaram 2008-03-09 01:07:32 EST
If by removing fedora-logos and installing generic-logos you don't get the
upstream icons in any place, that is a bug that should be reported.
Comment 24 Kevin Fenzi 2008-03-15 20:40:30 EDT
Well, I finally had time to dig some more into this, but unfortunately, 
I can't get it working the way I want it to. 

Attached is a patch that will use: 
- The users specified icon
- The fedora icon (if it exists)
or finally
- The default Xfce icon. 

That part works fine. However, when I nuke the fedora icon, it still keeps using
it, even though the file is missing. It must be caching it somehow, but I can't
see off hand where it is. ;( 

Anyone have any ideas?

Comment 25 Kevin Fenzi 2008-03-15 20:41:41 EDT
Created attachment 298170 [details]
Patch to detect and use the fedora icon if present

Here's the patch I have so far...
Comment 26 Jon Stanley 2008-04-23 16:29:14 EDT
Adding FutureFeature keyword to RFE's.
Comment 27 Christoph Wickert 2008-05-06 00:04:26 EDT
(In reply to comment #24)
> It must be caching it somehow, but I can't
> see off hand where it is. ;( 
> 
i guess in ~/.config/xfce4/panel/xfce4-menu-*.rc. You are patching the mcs
plugin, so changes only get applied for new plugins or if there is o config.
After that the value is written to the config file.

> Anyone have any ideas?
> 
I found a solution that is so dead simple that we all must have been blind not
to see it. ;)
Because the config file basically is a desktop file we can define the icon in 3
ways:
1. filename with absolute path, this is what we have at the moment
2. filename
3. filename without extension. Now the icon becomes themable.

So all we need is a simple patch for xfdesktop (attached) and our logo called
xfce4_xicon1.svg. We just use the same name but as svg because of the panels
poor scaling capabilities. This file needs to be included in fedora-logos.

If we install this file in /usr/share/icons/Fedora/scalable/places/ everybody
using the Fedora icon theme will get the Fedora logo. If we install to
/usr/share/icons/hicolor/.. all users will get the logo, no matter what theme
they use. This is because of the icon lookup, see
http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#icon_lookup

If no fedora logos are installed the panel will fall back to the original png in
/usr/share/pixmaps. Same file name but different extension, remember? ;)

I you want try it don't forget to run gtk-update-icon-cache on the folder and
restart the panel.
Comment 28 Christoph Wickert 2008-05-06 00:09:19 EDT
Created attachment 304593 [details]
Patch to modifiy the path for the menu icon
Comment 29 Christoph Wickert 2008-05-06 00:11:40 EDT
Comment on attachment 304593 [details]
Patch to modifiy the path for the menu icon

>diff -dur xfdesktop-4.4.2.orig/panel-plugin/desktop-menu-plugin.c xfdesktop-4.4.2/panel-plugin/desktop-menu-plugin.c
>--- xfdesktop-4.4.2.orig/panel-plugin/desktop-menu-plugin.c	2007-11-17 20:31:41.000000000 +0100
>+++ xfdesktop-4.4.2/panel-plugin/desktop-menu-plugin.c	2008-02-21 01:25:34.000000000 +0100
>@@ -58,7 +58,7 @@
> #include "xfce4-popup-menu.h"
> 
> #define BORDER 8
>-#define DEFAULT_BUTTON_ICON  DATADIR "/pixmaps/xfce4_xicon1.png"
>+#define DEFAULT_BUTTON_ICON "xfce4_xicon1"
> #define DEFAULT_BUTTON_TITLE "Xfce Menu"
> 
> #ifndef CHECK_RUNNING_PLUGIN
Comment 30 Christoph Wickert 2008-05-06 00:13:38 EDT
Forget the above edit, I was confused by bugzilla.
Comment 31 Kevin Fenzi 2008-05-10 20:42:28 EDT
Per our conversation on irc, this looks good. ;) 

We need to file a bug against fedora-logos and get that svg included, then we
can add the patch from comment #28 and be in good shape. 
Comment 32 Kevin Fenzi 2008-12-02 16:57:30 EST
This is all done in f10/rawhide. Closing.

Note You need to log in before you can comment on or make changes to this bug.