mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Fossil Hybrid HR: Fix watchface background fuzziness due to resizing
This commit is contained in:
+3
-3
@@ -572,7 +572,7 @@ public class HybridHRWatchfaceDesignerActivity extends AbstractGBActivity implem
|
|||||||
wfFactory = new HybridHRWatchfaceFactory(watchfaceName);
|
wfFactory = new HybridHRWatchfaceFactory(watchfaceName);
|
||||||
}
|
}
|
||||||
wfFactory.setSettings(watchfaceSettings);
|
wfFactory.setSettings(watchfaceSettings);
|
||||||
wfFactory.setBackground(processedBackgroundImage);
|
wfFactory.setBackground(selectedBackgroundImage);
|
||||||
wfFactory.addWidgets(widgets);
|
wfFactory.addWidgets(widgets);
|
||||||
try {
|
try {
|
||||||
File tempFile = File.createTempFile("tmpWatchfaceFile", null);
|
File tempFile = File.createTempFile("tmpWatchfaceFile", null);
|
||||||
@@ -607,14 +607,14 @@ public class HybridHRWatchfaceDesignerActivity extends AbstractGBActivity implem
|
|||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
findViewById(R.id.watchface_upload_progress_bar).setVisibility(View.VISIBLE);
|
findViewById(R.id.watchface_upload_progress_bar).setVisibility(View.VISIBLE);
|
||||||
GBApplication.deviceService().onInstallApp(tempAppFileUri);
|
GBApplication.deviceService().onInstallApp(tempAppFileUri);
|
||||||
FossilHRInstallHandler.saveAppInCache(fossilFile, processedBackgroundImage, wfFactory.getPreviewImage(mContext), mCoordinator, HybridHRWatchfaceDesignerActivity.this);
|
FossilHRInstallHandler.saveAppInCache(fossilFile, selectedBackgroundImage, wfFactory.getPreviewImage(mContext), mCoordinator, HybridHRWatchfaceDesignerActivity.this);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.show();
|
.show();
|
||||||
} else {
|
} else {
|
||||||
findViewById(R.id.watchface_upload_progress_bar).setVisibility(View.VISIBLE);
|
findViewById(R.id.watchface_upload_progress_bar).setVisibility(View.VISIBLE);
|
||||||
GBApplication.deviceService().onInstallApp(tempAppFileUri);
|
GBApplication.deviceService().onInstallApp(tempAppFileUri);
|
||||||
FossilHRInstallHandler.saveAppInCache(fossilFile, processedBackgroundImage, wfFactory.getPreviewImage(mContext), mCoordinator, HybridHRWatchfaceDesignerActivity.this);
|
FossilHRInstallHandler.saveAppInCache(fossilFile, selectedBackgroundImage, wfFactory.getPreviewImage(mContext), mCoordinator, HybridHRWatchfaceDesignerActivity.this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|||||||
@@ -173,8 +173,6 @@ public class BitmapUtil {
|
|||||||
float left = (squareBitmapWidth-srcBitmap.getWidth())/2;
|
float left = (squareBitmapWidth-srcBitmap.getWidth())/2;
|
||||||
float top = (squareBitmapWidth-srcBitmap.getHeight())/2;
|
float top = (squareBitmapWidth-srcBitmap.getHeight())/2;
|
||||||
canvas.drawBitmap(srcBitmap, left, top, paint);
|
canvas.drawBitmap(srcBitmap, left, top, paint);
|
||||||
// Free the native object associated with this bitmap.
|
|
||||||
srcBitmap.recycle();
|
|
||||||
// Return the circular bitmap
|
// Return the circular bitmap
|
||||||
return dstBitmap;
|
return dstBitmap;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user