use orange widget colors by default

This commit is contained in:
tibbi 2022-05-20 15:18:53 +02:00
parent 40a5127d0d
commit 807bf5d4c1
6 changed files with 9 additions and 17 deletions

View File

@ -61,7 +61,7 @@ android {
}
dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:e5a4973e6a'
implementation 'com.github.SimpleMobileTools:Simple-Commons:745f169a48'
implementation 'org.greenrobot:eventbus:3.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
}

View File

@ -8,7 +8,6 @@ import android.os.Bundle
import android.widget.SeekBar
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.DEFAULT_WIDGET_BG_COLOR
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
import com.simplemobiletools.flashlight.R
import com.simplemobiletools.flashlight.extensions.config
@ -44,11 +43,7 @@ class WidgetBrightDisplayConfigureActivity : SimpleActivity() {
private fun initVariables() {
mWidgetColor = config.widgetBgColor
mWidgetAlpha = if (mWidgetColor == DEFAULT_WIDGET_BG_COLOR) {
1f
} else {
Color.alpha(mWidgetColor) / 255.toFloat()
}
mWidgetAlpha = Color.alpha(mWidgetColor) / 255.toFloat()
mWidgetColorWithoutTransparency = Color.rgb(Color.red(mWidgetColor), Color.green(mWidgetColor), Color.blue(mWidgetColor))
config_widget_seekbar.setOnSeekBarChangeListener(seekbarChangeListener)

View File

@ -8,7 +8,6 @@ import android.os.Bundle
import android.widget.SeekBar
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.DEFAULT_WIDGET_BG_COLOR
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
import com.simplemobiletools.flashlight.R
import com.simplemobiletools.flashlight.extensions.config
@ -45,11 +44,7 @@ class WidgetTorchConfigureActivity : SimpleActivity() {
private fun initVariables() {
mWidgetColor = config.widgetBgColor
mWidgetAlpha = if (mWidgetColor == DEFAULT_WIDGET_BG_COLOR) {
1f
} else {
Color.alpha(mWidgetColor) / 255.toFloat()
}
mWidgetAlpha = Color.alpha(mWidgetColor) / 255.toFloat()
mWidgetColorWithoutTransparency = Color.rgb(Color.red(mWidgetColor), Color.green(mWidgetColor), Color.blue(mWidgetColor))
config_widget_seekbar.setOnSeekBarChangeListener(seekbarChangeListener)

View File

@ -2,5 +2,4 @@
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bright_display_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp" />
android:layout_height="wrap_content" />

View File

@ -2,5 +2,4 @@
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/flashlight_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp" />
android:layout_height="wrap_content" />

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="default_widget_bg_color">-571114496</integer> <!-- #DDF57C00 -->
</resources>