ol-geocoder icon indicating copy to clipboard operation
ol-geocoder copied to clipboard

Low-resolution icon appears blurry in HiDPI screens

Open jmgomezpoveda opened this issue 9 years ago • 5 comments

The icon provided has a low resolution, and therefore appears blurry when viewed in HiDPI screens. This contrasts with the other, sharper icons.

no-hidpi

jmgomezpoveda avatar Dec 03 '16 08:12 jmgomezpoveda

As an alternative to using the icon, one can also use the unicode search character:

.ol3-geocoder-btn-search {
    background-image: none;
}
.ol3-geocoder-btn-search:before {
    content: '🔍';
    font-size: 0.7em;
    line-height: 0.8em;
}

unicode-search

jmgomezpoveda avatar Dec 03 '16 08:12 jmgomezpoveda

Optionally, in case you prefer the old icon for non-HiDPI devices, this icon could be used only in HiDPI devices using media queries:

@media only screen and (-webkit-min-device-pixel-ratio: 1.3),
only screen and (-o-min-device-pixel-ratio: 13/10),
only screen and (min-resolution: 120dpi) {
	.ol3-geocoder-btn-search {
	    background-image: none;
	}
	.ol3-geocoder-btn-search:before {
	    content: '🔍';
	    font-size: 0.7em;
	    line-height: 0.8em;
	}
}

jmgomezpoveda avatar Dec 04 '16 11:12 jmgomezpoveda

@jmgomezpoveda Sorry the delay, I'm right now in a hurry and ASAP will give it a closer look.

jonataswalker avatar Dec 05 '16 12:12 jonataswalker

@jmgomezpoveda

Are you able to prepare a PR with your suggestions?

jonataswalker avatar Dec 19 '16 16:12 jonataswalker

I am afraid this may not work with 2.4.0, due to the styling changes. Will need to analyse the impact to port it to 2.4.0.

jmgomezpoveda avatar Dec 19 '16 18:12 jmgomezpoveda

Closed in v4.3.1 Icon replaced by unicode char

Dominique92 avatar Sep 15 '23 15:09 Dominique92