mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-10-31 22:52:59 +01:00
Fossil Hybrid HR: Invert widgets color when the background image is inverted
This commit is contained in:
parent
48212d4185
commit
0349b2530f
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user