Skip to content

Commit 807bf5d

Browse files
committed
use orange widget colors by default
1 parent 40a5127 commit 807bf5d

File tree

6 files changed

+9
-17
lines changed

6 files changed

+9
-17
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ android {
6161
}
6262

6363
dependencies {
64-
implementation 'com.github.SimpleMobileTools:Simple-Commons:e5a4973e6a'
64+
implementation 'com.github.SimpleMobileTools:Simple-Commons:745f169a48'
6565
implementation 'org.greenrobot:eventbus:3.3.1'
6666
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
6767
}

app/src/main/kotlin/com/simplemobiletools/flashlight/activities/WidgetBrightDisplayConfigureActivity.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import android.os.Bundle
88
import android.widget.SeekBar
99
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
1010
import com.simplemobiletools.commons.extensions.*
11-
import com.simplemobiletools.commons.helpers.DEFAULT_WIDGET_BG_COLOR
1211
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
1312
import com.simplemobiletools.flashlight.R
1413
import com.simplemobiletools.flashlight.extensions.config
@@ -44,11 +43,7 @@ class WidgetBrightDisplayConfigureActivity : SimpleActivity() {
4443

4544
private fun initVariables() {
4645
mWidgetColor = config.widgetBgColor
47-
mWidgetAlpha = if (mWidgetColor == DEFAULT_WIDGET_BG_COLOR) {
48-
1f
49-
} else {
50-
Color.alpha(mWidgetColor) / 255.toFloat()
51-
}
46+
mWidgetAlpha = Color.alpha(mWidgetColor) / 255.toFloat()
5247

5348
mWidgetColorWithoutTransparency = Color.rgb(Color.red(mWidgetColor), Color.green(mWidgetColor), Color.blue(mWidgetColor))
5449
config_widget_seekbar.setOnSeekBarChangeListener(seekbarChangeListener)

app/src/main/kotlin/com/simplemobiletools/flashlight/activities/WidgetTorchConfigureActivity.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import android.os.Bundle
88
import android.widget.SeekBar
99
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
1010
import com.simplemobiletools.commons.extensions.*
11-
import com.simplemobiletools.commons.helpers.DEFAULT_WIDGET_BG_COLOR
1211
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
1312
import com.simplemobiletools.flashlight.R
1413
import com.simplemobiletools.flashlight.extensions.config
@@ -45,11 +44,7 @@ class WidgetTorchConfigureActivity : SimpleActivity() {
4544

4645
private fun initVariables() {
4746
mWidgetColor = config.widgetBgColor
48-
mWidgetAlpha = if (mWidgetColor == DEFAULT_WIDGET_BG_COLOR) {
49-
1f
50-
} else {
51-
Color.alpha(mWidgetColor) / 255.toFloat()
52-
}
47+
mWidgetAlpha = Color.alpha(mWidgetColor) / 255.toFloat()
5348

5449
mWidgetColorWithoutTransparency = Color.rgb(Color.red(mWidgetColor), Color.green(mWidgetColor), Color.blue(mWidgetColor))
5550
config_widget_seekbar.setOnSeekBarChangeListener(seekbarChangeListener)

app/src/main/res/layout/widget_bright_display.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
33
android:id="@+id/bright_display_btn"
44
android:layout_width="wrap_content"
5-
android:layout_height="wrap_content"
6-
android:layout_margin="5dp" />
5+
android:layout_height="wrap_content" />

app/src/main/res/layout/widget_torch.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
33
android:id="@+id/flashlight_btn"
44
android:layout_width="wrap_content"
5-
android:layout_height="wrap_content"
6-
android:layout_margin="5dp" />
5+
android:layout_height="wrap_content" />
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<integer name="default_widget_bg_color">-571114496</integer> <!-- #DDF57C00 -->
4+
</resources>

0 commit comments

Comments
 (0)