Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » What is the best way to handle scaling icons?
Re: What is the best way to handle scaling icons? [message #50171 is a reply to message #50155] Fri, 10 August 2018 20:57 Go to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
We were trying to resolve this with hi-dpi support.

Current solution is as follows:

When the main font height reaches certain pixel size, U++ is switched into HIDPI mode. Now icons in .iml now have resolution setting:

- normal
- hidpi
- unknown

In non-HIDPI mode, all hidpi icons in all .iml are scaled down 2x. In HIDPI mode all normal icons in all .iml are scaled 2x up, using special algorithm that I have picked from console emulators... (so it tends to smooth lines in artificial icons).

There are also helper functions like Zx/Zy (scale numbers based on main font size) and DPI (scales numbers 2x in hidpi mode).

Mirek
 
Read Message
Read Message
Previous Topic: Decrease PDF size. Compress images?
Next Topic: DrawArc not working in GTK mode
Goto Forum:
  


Current Time: Wed May 15 05:44:22 CEST 2024

Total time taken to generate the page: 0.03509 seconds