mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-11 11:02:27 +08:00
fix(touch_bar): blurry native images
This commit is contained in:
parent
0430a9c3f5
commit
f2f0f6178b
@ -19,9 +19,21 @@ export default class TouchBarWidget extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#buildIcon(name: string) {
|
#buildIcon(name: string) {
|
||||||
return this.nativeImage
|
const sourceImage = this.nativeImage.createFromNamedImage(name, [-1, 0, 1]);
|
||||||
.createFromNamedImage(name, [-1, 0, 1])
|
const newImage = this.nativeImage.createEmpty()
|
||||||
.resize({ height: 20 });
|
newImage.addRepresentation({
|
||||||
|
scaleFactor: 1,
|
||||||
|
width: 22,
|
||||||
|
height: 22,
|
||||||
|
buffer: sourceImage.resize({ height: 22 }).toBitmap()
|
||||||
|
});
|
||||||
|
newImage.addRepresentation({
|
||||||
|
scaleFactor: 2,
|
||||||
|
width: 44,
|
||||||
|
height: 44,
|
||||||
|
buffer: sourceImage.resize({ height: 44 }).toBitmap()
|
||||||
|
});
|
||||||
|
return newImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
#buildTouchBar() {
|
#buildTouchBar() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user