Add dark mode to search bar

This commit is contained in:
MM20
2022-10-21 18:07:09 +02:00
parent 02bb12549b
commit 6859948bd8
6 changed files with 51 additions and 2 deletions
@@ -2,6 +2,7 @@ package de.mm20.launcher2.preferences
import android.content.Context
import android.graphics.Color
import de.mm20.launcher2.preferences.Settings.SearchBarSettings.SearchBarColors
import scheme.Scheme
fun createFactorySettings(context: Context): Settings {
@@ -133,6 +134,7 @@ fun createFactorySettings(context: Context): Settings {
Settings.SearchBarSettings.newBuilder()
.setSearchBarStyle(Settings.SearchBarSettings.SearchBarStyle.Transparent)
.setAutoFocus(false)
.setColor(SearchBarColors.Auto)
.build()
)
.setIcons(
@@ -216,6 +216,12 @@ message Settings {
}
SearchBarStyle search_bar_style = 1;
bool auto_focus = 2;
enum SearchBarColors {
Auto = 0;
Light = 1;
Dark = 2;
}
SearchBarColors color = 3;
}
SearchBarSettings search_bar = 20;