qt-csd-demo icon indicating copy to clipboard operation
qt-csd-demo copied to clipboard

webbrowser: icons are missing on macos

Open ipatch opened this issue 4 years ago • 1 comments

cloned the repo, and ran the webbrowser.qml binary with the below command

/usr/local/Cellar/qt/5.14.1/libexec/qml.app/Contents/MacOS/qml webbrowser.qml

and the GUI app looks like the below on my system,

Screen Shot 2020-04-20 at 10 45 20 PM

looking like some of the icons aren't rendering for whatever reason.

ipatch avatar Apr 21 '20 03:04 ipatch

So I guess I kind of cheated with the icons because I used a special set of unicode characters for that purpose: https://www.compart.com/en/unicode/U+1F5D6

Looks like the default font on macOS doesn't have support for them...

For a proper solution it's probably best to do one of the following:

  • Bundle a font with the icons with the app
  • Draw icons with the shapes api instead: https://doc.qt.io/qt-5/qml-qtquick-shapes-shape.html
  • Use image based icons instead (svg or png). IMO these are harder to get right across different high DPI displays

Now for the demo app... Perhaps it's best to just use regular characters... i.e. x, #, _ etc. that every font has. That would keep the code simple/small, but it would look worse :/

Thanks for reporting the issue.

johanhelsing avatar Apr 21 '20 05:04 johanhelsing