-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: update hardcoded XPMs to .svg files. Updated .svg icons for clarity. #13110
Conversation
4d81a61
to
5be71c4
Compare
".######.", | ||
"..####.."}; | ||
static QPixmap forbidden_icon(forbidden_xpm); | ||
static QPixmap forbidden_icon(Gui::BitmapFactory().pixmapFromSvg("forbidden", QSize(8, 8))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you can use a size of 24x24 or 32x32 as otherwise the overlay icon will be too small.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but the icon will be displayed too large then. When I scale it down after a higher resolution with .scaled
Do I need to call the get dpr every time then, if #13176 is in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using 8x8 then the overlay icon is extremely tiny. With 24x24 or 32x32 the size is sensible for me. Not sure why because in the past 8x8 was OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Windows it looks like the bottom one with the 10x10 or 8x8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can at least use it in DocumentObjectItem::testStatus() where you can access the tree widget.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but overlay icons are set from almost all WBs. Could this be integrated in pixmapFromSvg()
instead? If no DPR is given, calculate it there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, as this only makes no sense. On systems with several monitors it's possible that widgets have different DPR and pixmapFromSvg() doesn't know anything about the context a pixmap is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is it working with toolbar icons? On my second monitor DPI they also look good. dragging them from one to another monitor updates them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. I guess Qt does it automatically.
See files for overview.
fix partially #6765
fix partially #12992