Commit Graph

11 Commits

Author SHA1 Message Date
germanaizek
a20215d9da Replace 'push*' -> 'emplace*' if possible and use std::move() 2022-05-12 20:54:42 +02:00
ge0rdi
bce9efcc43 Display monochrome icons using color of corresponding text item
Some icons (modern settings, jump-list tasks) are monochrome, basically
they are defined just by alpha channel.
Thus they can be displayed in any color (white is default).

Since these icons are white by default, they look nice on dark
backgrounds. But they are not very visible on light backgrounds.

Thus the idea is to 'colorize' such icon using color of corresponding
text item. That way they will always have proper color.

Fixes #466.
2020-09-26 15:46:19 +02:00
ge0rdi
7d59f5ebfb Support for modern app jump-list tasks
Task jump-list items for modern apps require special handling.

First of all they don't provide icon directly.
Icon location is stored in `PKEY_AppUserModel_DestListLogoUri` property.
And then has to be resolved for given application package.

Next, context menu of provided `IShellLink` item doesn't seem to be able
to start actual link target.
Thus we need to obtain context menu of target item.

Fixes #375.
2020-09-23 11:50:32 +02:00
ge0rdi
728f982310 Modernize CItemManager::LoadCustomIcon 2020-09-23 11:50:32 +02:00
ge0rdi
2ca236c291 Don't make metro icons smaller if Invert metro icons is enabled
There should be no need to make icons smaller.
2020-09-23 11:50:32 +02:00
ge0rdi
8a22282191 ItemManager: Better handling of modern application links
Link to modern application will be treat as modern application itself.

This fixes jump-lists and invert metro color option on modern apps pinned
to start menu.
2020-09-23 11:50:32 +02:00
ge0rdi
aa09a0dcc2 ItemManager: Keep metro name if already obtained 2020-09-22 19:12:35 +02:00
ge0rdi
1f6e06fc85 Use proper flag in LoadMetroIcon 2020-08-29 14:03:59 +02:00
ge0rdi
9976e134ca Fix 'Invert Metro icon color' option for grayscale icons
When `Invert Metro icon color` is enabled `Open-Shell` needs to
distinguish full color icons from monochromatic ones.

Color icons are displayed normally. Monochromatic ones are displayed
inverted (original background becomes transparent and foreground will
get Metro accent color).

Metro icon is loaded from Metro app resources (usually PNG image) as
bitmap with premultiplied alpha channel.
This causes monochromatic image to essentially become grayscale (because
RGB values are multiplied with alpha channel value).

Function `DetectGrayscaleImage` is used to distinguish such images.

Unfortunatelly if original image is grayscale (such as new Windows
Terminal icon) it is recognized as monochromatic and thus inverted.

To prevent this we will take into account also alpha channel in
`DetectGrayscaleImage`.

In monochromatic images alpha channel value will be the same as the rest of
channel values.
For color images alpha channel value will be different than other
channel values.

Fixes #364.
2020-06-07 06:47:03 +02:00
ge0rdi
2fb9448ffd Few improvements (#65)
* Fix naming inconsistencies

'Menu' vs 'StartMenu'

* Installer: Remove Facebook link

* Installer: Remove PayPal donate remnants

* OpenShellReadme: Remove info about product version
2018-08-13 00:28:42 -04:00
Xenhat
f4dd56155b Rebrand to Open-Shell (#36) (#58)
* Rebrand to Open-Shell

* Slight installer branding improvement
2018-08-05 15:22:10 -04:00