FreeCAD document icon

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: FreeCAD document icon

Post by jmaustpc »

NormandC wrote: Mon Apr 29, 2019 3:49 am I tested both

Code: Select all

sudo cp freecad-doc.png /usr/share/icons/hicolor/64x64/mimetypes/application-x-extension-fcstd.png

and
Hi Norm, I was just thinking that if that was to work, it would only work if your application (file browser) had the icon display setting size set to 64pix, wouldn't it?

I think most of us in this discussion have been around long enough to know that all, or most, of our icons were at one time bitmaps but we changed them all (or at least the majority) over to svg. Not sure if that is relevant here or not. :)

Anyway I tried Norm's suggestion with the svg
NormandC wrote: Mon Apr 29, 2019 3:49 am Code: Select all

sudo cp freecad-doc.svg /usr/share/icons/hicolor/scalable/mimetypes/application-x-extension-fcstd.svg
and it instantly worked. All I did was close Dolphin and start Dolphin again. No restarting "Windows" :lol: I was expecting I might have to restart X, but no, I just restarted Dolphin (KDE file browser). Linux rules! :)

Before screen shot
Screenshot_20190429_142621.png
Screenshot_20190429_142621.png (8.58 KiB) Viewed 2353 times

after screen shot
Screenshot_20190429_170608.png
Screenshot_20190429_170608.png (15.8 KiB) Viewed 2353 times

the icon I used was the one Norm attached to his post.

I have been a bit slow posting this as I am trying to cook a marinated roast beef with assorted roast veggies...yum....and no its definitely not one of mine...


Kubuntu 18.04 64bit

Jim
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FreeCAD document icon

Post by NormandC »

jmaustpc wrote: Mon Apr 29, 2019 7:43 am the icon I used was the one Norm attached to his post.
I didn't attach any icon here, at least not recently. I copied the one from FreeCAD's source code, located in /src/GUI/icons.

jmaustpc wrote: Mon Apr 29, 2019 7:43 am All I did was close Dolphin and start Dolphin again.
Right, should have thought of relaunching Nautilus!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: FreeCAD document icon

Post by jmaustpc »

NormandC wrote: Mon Apr 29, 2019 11:24 am jmaustpc wrote: ↑
29 Apr 2019, 17:43
the icon I used was the one Norm attached to his post.

I didn't attach any icon here, at least not recently. I copied the one from FreeCAD's source code, located in /src/GUI/icons.
obviously you were not wearing a helmet when you ran into that moose while riding your push bike! Since you didn't remember that either! :lol:

The icon I used was in fact posted on the previous page a few post back in this topic.

Unless of course its because yet again relying on my memory has proved to be problematic! :cry:

OK I'll admit it, you are right I was wrong, it was in fact posted by easyw-fc ! :D
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FreeCAD document icon

Post by NormandC »

jmaustpc wrote: Mon Apr 29, 2019 11:42 am obviously you were not wearing a helmet when you ran into that moose while riding your push bike!
How many times will I have to say it: I did not run into a moose riding my bicycle! I was in a canoe and a safe distance away! :D

I did run into a cow one time, so I guess you can relate to that ;)
User avatar
sket
Posts: 61
Joined: Sun May 11, 2014 4:50 pm

Re: FreeCAD document icon

Post by sket »

what could be done to get the thumbnail as icon?
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: FreeCAD document icon

Post by jmaustpc »

sket wrote: Tue Apr 30, 2019 10:13 am what could be done to get the thumbnail as icon?
Edit menu ...preferences...General..document ....

then tick the box for "save thumbnail into project file when saving document"

Doing so will increase your file sizes a small amount, if you are close to the upload limit it may tip you over but i doubt it would make much difference for most things.

Also it will not insert a thumbnail for existing files unless you open them and save them again.


Screenshot_20190501_015958.png
Screenshot_20190501_015958.png (72.81 KiB) Viewed 2255 times
User avatar
sket
Posts: 61
Joined: Sun May 11, 2014 4:50 pm

Re: FreeCAD document icon

Post by sket »

yes, I already done. Don't work anymore after the upgrade to 0.18.1.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: FreeCAD document icon

Post by jmaustpc »

sket wrote: Tue Apr 30, 2019 8:09 pm yes, I already done. Don't work anymore after the upgrade to 0.18.1.
i just did some experiments, it is sort of working,

with thumbnails off no thumbnails directory or image is embedded in the FCstd file.

with thumbnails on a thumbnails directory with a default FreeCAD icon image is embedded in the FCstd file. the FreeCAD icon png "thumbnail.png" image is this one...
Thumbnail.png
Thumbnail.png (3.67 KiB) Viewed 2213 times
You can unpack a FCstd file by using the utility in FreeCAD under tools menu...project utility. Create a new empty directory, select a FCstd file, select that new empty directory, click extract, then look at it with your file browser.

OS: Kubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)

I am also getting the same thing with the only other FreeCAD on my system, an old FreeCAD daily PPA.

OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16093 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 690774c0effe4fd7b8d2b5e2fb2b8c8d145e21ce
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)


Both have QT5, so makes me wonder if this is a bug brought about partly due to QT5.
mario52
Veteran
Posts: 4690
Joined: Wed May 16, 2012 2:13 pm

Re: FreeCAD document icon

Post by mario52 »

Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
sket
Posts: 61
Joined: Sun May 11, 2014 4:50 pm

Re: FreeCAD document icon

Post by sket »

hi jmaustpc, sorry... but I didn't understood exactly what you say, I'm not speak english well.

I would like to have the thumbnail as icon of the file. In the previous releases it worked so.
I extracted the .FCStd file, there is the thumbnails folder, and inside the right thumbnail. But... the thumbnail is not showed as icon.
Image

OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
Post Reply