Skip to content

Commit

Permalink
Take highlighter down from 50% to 37.5% opacity.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-signal committed Jun 9, 2020
1 parent 1ecdea5 commit a758056
Showing 1 changed file with 3 additions and 5 deletions.
Expand Up @@ -7,7 +7,6 @@
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Switch;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand All @@ -20,7 +19,6 @@
import org.thoughtcrime.securesms.scribbles.widget.ColorPaletteAdapter;
import org.thoughtcrime.securesms.scribbles.widget.VerticalSlideColorPicker;
import org.thoughtcrime.securesms.util.Debouncer;
import org.thoughtcrime.securesms.util.ViewUtil;

import java.util.Arrays;
import java.util.HashMap;
Expand Down Expand Up @@ -300,10 +298,10 @@ private void presentModeText() {

private final VerticalSlideColorPicker.OnColorChangeListener standardOnColorChangeListener = selectedColor -> eventListener.onColorChange(selectedColor);

private final VerticalSlideColorPicker.OnColorChangeListener highlightOnColorChangeListener = selectedColor -> eventListener.onColorChange(replaceAlphaWith128(selectedColor));
private final VerticalSlideColorPicker.OnColorChangeListener highlightOnColorChangeListener = selectedColor -> eventListener.onColorChange(withHighlighterAlpha(selectedColor));

private static int replaceAlphaWith128(int color) {
return color & ~0xff000000 | 0x80000000;
private static int withHighlighterAlpha(int color) {
return color & ~0xff000000 | 0x60000000;
}

public void setUndoAvailability(boolean undoAvailable) {
Expand Down

0 comments on commit a758056

Please sign in to comment.