Fix[Controls]: Color selector allowing transparent button stroke

This commit is contained in:
Mathias-Boulay 2023-03-01 10:39:05 +01:00
parent 036e76315b
commit b9fa6b8756
2 changed files with 3 additions and 2 deletions

View File

@ -160,6 +160,7 @@ public class ColorSelector implements HueSelectionListener, RectangleSelectionLi
public void setAlphaEnabled(boolean alphaEnabled){ public void setAlphaEnabled(boolean alphaEnabled){
mAlphaEnabled = alphaEnabled; mAlphaEnabled = alphaEnabled;
mAlphaView.setVisibility(alphaEnabled ? View.VISIBLE : View.GONE); mAlphaView.setVisibility(alphaEnabled ? View.VISIBLE : View.GONE);
mAlphaView.setAlpha(255);
} }
private void notifyColorSelector(int color){ private void notifyColorSelector(int color){

View File

@ -8,6 +8,7 @@ import static net.kdt.pojavlaunch.Tools.currentDisplayMetrics;
import android.animation.ObjectAnimator; import android.animation.ObjectAnimator;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
import android.graphics.Color;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.util.Log; import android.util.Log;
@ -168,8 +169,7 @@ public class EditControlPopup {
} }
mDisplayingColor = true; mDisplayingColor = true;
if(color != -1) mColorSelector.show(color == -1 ? Color.WHITE : color);
mColorSelector.show(color);
} }
/** Slide out the layout */ /** Slide out the layout */