mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 02:05:53 +01:00
fix(touch_bar): blurry native images
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user