Comments (7)
You need to add the Boolean parameter Bitmaps/Theme/ThemeSearchPaths as per https://wiki.freecad.org/Fine-tuning
from freecad.
Thanks! This works around the issue for those two icons, but I'll leave it open, as I feel it's still a bug (either in packaging or on choosing the icon, or on the system icon theme). In general, I'm happy with the system theme.
It seems that at least on Linux, there are at least 3 themes that are applied depending on the FreeCAD package installed and the value of that property.
Icons | Package | Bitmaps/Theme/ThemeSearchPaths | Theme | Notes |
---|---|---|---|---|
freecad-daily | true | Yaru | Ubuntu's default theme | |
freecad-daily | false | FreeCAD/Tango | This is the FreeCAD icon set, which uses Tango icons. Also what it looks like on default installation with the snap package | |
AppImage weekly | true | ? | Yet another theme. Unclear where it comes from | |
AppImage weekly | false | FreeCAD/Tango | This is the FreeCAD icon set, which uses Tango icons. |
from freecad.
Is it something which could be solved in FreeCAD or is there no system icon to distinguish between them?
from freecad.
I'm not sure how the translation FreeCAD icon => System icon works. FreeCAD does name them differently though (zoom-all
and zoom-selection
). I don't know whether some system icons can be overriden by FreeCAD icons when using the system theme.
FreeCAD/src/Gui/CommandView.cpp
Lines 1595 to 1605 in 47fd87a
FreeCAD/src/Gui/CommandView.cpp
Lines 1563 to 1574 in 47fd87a
from freecad.
On my system they both look the same in the appimage. The icon they resolve to is zoom-fit-best
from my scheme selected in KDE. There is an actual bug here, because "zoom-selection" and "zoom-all" aren't listed in the Freedesktop Icon Naming Specification. This means an application can't be sure they will exist. See also the related Icon There Spec
I have no idea how this works on Windows. The QIcon docs are a long read.
from freecad.
I spoke too soon. FreeCAD does have those named icons in the source,
https://github.com/FreeCAD/FreeCAD/blob/main/src/Gui/Icons/zoom-fit-best.svg
https://github.com/FreeCAD/FreeCAD/blob/main/src/Gui/Icons/zoom-all.svg
... but apparently they don't get used if Bitmaps/Theme/ThemeSearchPaths is true? In my case there is no setting defined.
from freecad.
... but apparently they don't get used if Bitmaps/Theme/ThemeSearchPaths is true? In my case there is no setting defined.
That was the same behavior on my system. Before I created the property, the two icons distributed with FreeCAD were not used, so I assume if Bitmaps/Theme/ThemeSearchPath
is not defined, it defaults to 'true' => use system theme icons. As per the table.
If I understand it correctly,
- from https://doc.qt.io/qt-5/qicon.html#fromTheme, and at least on Linux: that method is used to fetch the system icon given a descriptive string (e.g.
zoom-all
).
Lines 981 to 989 in 82101ac
Just as an example, there are other places where that method is called
Then also from the docs:
If an icon can't be found in the current theme, then it will be searched in fallbackSearchPaths() as an unthemed icon.
-
The Icon Naming spec defines
zoom-fit-best
,zoom-in
,zoom-original
andzoom-out
. Neither of those map to thezoom-all
orzoom-selection
strings defined in the FreeCAD code to load those icons. -
Despite not being a match,
zoom-fit-best
is the system theme icon returned when callingiconFromTheme()
for eitherzoom-original
orzoom-out
.
This would mean that his bug is about finding out why 3) is happening.
from freecad.
Related Issues (20)
- FCAD 0.22.0dev - File > New not working after editing sketch HOT 2
- Checking Connection to github connect failed HOT 3
- Helix breaks over certain length HOT 6
- FreeCAD 0.21.2 | Draft Import : SVG as Geometry failed HOT 4
- DRAFT: Error Shape2DView HOT 4
- CAM: CW/CCW/Conventional/Climb terminology consistency HOT 3
- BIM: getTreeViewItem in BimViews.py fails if the comma is the decimal separator HOT 1
- TechDraw: Snapping not working correctly HOT 2
- TechDraw: Navigation problems with active dimension tool
- TechDraw: access violation error on dimension undo/redo
- TechDraw: Dimension tool places dimension automatically with preselection
- Inspection: Annotation not working
- Draft/BIM: Entered data get's overwritten when trying to click OK HOT 3
- Measure does not handle selecting link elements HOT 1
- Arc length dimension doesn't snap to other dimensions HOT 2
- New Cam simulator: resizing window does not affect viewing area HOT 6
- Add possibility to set a default value for “Cascade spacing” HOT 1
- UI: Classic theme transparent overlays still have borders
- AddonManager: Redirects not handled properly HOT 1
- UI: Visibility toggle should be possible with active tools (eye icon) HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freecad.