1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-28 19:45:50 +01:00

Fossil Hybrid HR: Invert widgets color when the background image is inverted

This commit is contained in:
Arjan Schrijver 2022-06-17 22:42:58 +02:00
parent 48212d4185
commit 0349b2530f
2 changed files with 8 additions and 0 deletions

View File

@ -227,6 +227,11 @@ public class HybridHRWatchfaceDesignerActivity extends AbstractGBActivity implem
} else if (v.getId() == R.id.watchface_invert_colors) {
if (selectedBackgroundImage != null) {
selectedBackgroundImage = BitmapUtil.invertBitmapColors(selectedBackgroundImage);
for (int i=0; i<widgets.size(); i++) {
HybridHRWatchfaceWidget widget = widgets.get(i);
widget.setColor(widget.getColor() ^ 1);
widgets.set(i, widget);
}
renderWatchfacePreview();
if (defaultWidgetColor == HybridHRWatchfaceWidget.COLOR_WHITE) {
defaultWidgetColor = HybridHRWatchfaceWidget.COLOR_BLACK;

View File

@ -121,6 +121,9 @@ public class HybridHRWatchfaceWidget {
public int getColor() {
return color;
}
public void setColor(int color) {
this.color = color;
}
public String getTimezone() {
return timezone;