forked from Blendman974/faceclaw
EvenHub phone UI: add top bar, add open icon
This commit is contained in:
1 parent
c6949fde3b
commit
e879c58d9c
9 files changed
+284
-30
No files matched your search
@@ -27,3 +27,21 @@ export function grayImageToPreviewSource(image: GrayImage): ImageSource | null {
|
||||
);
|
||||
return new ImageSource(bitmap);
|
||||
}
|
||||
|
||||
/**
|
||||
* A glasses icon as a white-on-transparent phone image (gray becomes alpha),
|
||||
* for the dark action bar.
|
||||
*/
|
||||
export function grayImageToWhiteIconSource(image: GrayImage): ImageSource | null {
|
||||
if (!global.isAndroid) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const baked = image.withDrawsBaked();
|
||||
const bitmap = com.faceclaw.app.PreviewBitmapUtil.whiteIconFromGray(
|
||||
copyToJavaByteBuffer(baked.pixels),
|
||||
baked.width,
|
||||
baked.height,
|
||||
);
|
||||
return new ImageSource(bitmap);
|
||||
}
|
||||
Reference in new issue
Block a user