mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-27 03:54:24 +00:00
Pixelate skins if we ever show them full size or greater
This commit is contained in:
parent
b9d5a968a1
commit
e51a59f7aa
1 changed files with 5 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import React from "react";
|
||||
import * as Utils from "./utils";
|
||||
import { SCREENSHOT_HEIGHT } from "./constants";
|
||||
|
||||
export default class Skin extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
@ -51,6 +52,10 @@ export default class Skin extends React.Component {
|
|||
>
|
||||
<img
|
||||
src={this.props.src}
|
||||
style={{
|
||||
imageRendering:
|
||||
this.props.height >= SCREENSHOT_HEIGHT ? "pixelated" : null
|
||||
}}
|
||||
className={`screenshot ${this.state.loaded ? "loaded" : ""}`}
|
||||
onLoad={this._handleLoad}
|
||||
alt={Utils.filenameFromHash(this.props.hash)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue