made tint less bright and added fg and bg colors

pull/11/head
Ahmet Inan 2024-05-08 08:10:44 +02:00
rodzic f5eafb55ad
commit 82d22525b9
3 zmienionych plików z 12 dodań i 8 usunięć

Wyświetl plik

@ -76,8 +76,8 @@ public class MainActivity extends AppCompatActivity {
private int recordRate;
private int recordChannel;
private int audioSource;
private int tint;
private int thin;
private int fgColor;
private int thinColor;
private void setStatus(int id) {
setTitle(id);
@ -135,8 +135,8 @@ public class MainActivity extends AppCompatActivity {
int peak = pixels;
if (max > 0)
peak = (int) Math.round(Math.min(Math.max(-Math.PI * Math.log(max), 0), pixels));
Arrays.fill(peakMeterBuffer.pixels, 0, peak, thin);
Arrays.fill(peakMeterBuffer.pixels, peak, pixels, tint);
Arrays.fill(peakMeterBuffer.pixels, 0, peak, thinColor);
Arrays.fill(peakMeterBuffer.pixels, peak, pixels, fgColor);
peakMeterBitmap.setPixels(peakMeterBuffer.pixels, 0, peakMeterBuffer.width, 0, 0, peakMeterBuffer.width, peakMeterBuffer.height);
peakMeterView.invalidate();
}
@ -381,8 +381,8 @@ public class MainActivity extends AppCompatActivity {
EdgeToEdge.enable(this);
setContentView(config.orientation == Configuration.ORIENTATION_LANDSCAPE ? R.layout.activity_main_land : R.layout.activity_main);
handleInsets();
tint = getColor(R.color.tint);
thin = getColor(R.color.thin);
fgColor = getColor(R.color.fg);
thinColor = getColor(R.color.thin);
scopeBuffer = new PixelBuffer(640, 2 * 1280);
createScope(config);
freqPlotBuffer = new PixelBuffer(256, 2 * 256);

Wyświetl plik

@ -5,5 +5,7 @@
<color name="gray">#FFB4B4B4</color>
<color name="thin">#FF2F2F2F</color>
<color name="white">#FFFFFFFF</color>
<color name="tint">#FFFFFFFF</color>
<color name="tint">#FFE6E0E9</color>
<color name="fg">#FFFFFFFF</color>
<color name="bg">#FF000000</color>
</resources>

Wyświetl plik

@ -5,5 +5,7 @@
<color name="gray">#FF696969</color>
<color name="thin">#FFE0E0E0</color>
<color name="white">#FFFFFFFF</color>
<color name="tint">#FF000000</color>
<color name="tint">#FF1D1B20</color>
<color name="fg">#FF000000</color>
<color name="bg">#FFFFFFFF</color>
</resources>