Theming related fixes (#627)

* Make navigation match window background

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Remove light navigation flag

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Use black navbar in light theme

windowLightNavigationBar is not portable across API 23 to 29 so we're better off with this solution

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Simplify folder dialog title UI

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Make night theme completely flat

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Remove unnecessary type

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

* Don't try to use non-existent external repo

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>

Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
This commit is contained in:
Harsh Shandilya 2020-02-01 23:41:44 +05:30 committed by GitHub
parent 907b22cf66
commit 085b946c7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 19 deletions

View file

@ -88,7 +88,7 @@ class UserPreference : AppCompatActivity() {
val clearClipboard20xPreference = findPreference<CheckBoxPreference>("clear_clipboard_20x")
// Autofill preferences
autoFillEnablePreference = findPreference<CheckBoxPreference>("autofill_enable")
autoFillEnablePreference = findPreference("autofill_enable")
val autoFillAppsPreference = findPreference<Preference>("autofill_apps")
val autoFillDefaultPreference = findPreference<CheckBoxPreference>("autofill_default")
val autoFillAlwaysShowDialogPreference = findPreference<CheckBoxPreference>("autofill_always")

View file

@ -18,6 +18,7 @@ import java.io.File
class FolderCreationDialogFragment : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val alertDialogBuilder = MaterialAlertDialogBuilder(requireContext())
alertDialogBuilder.setTitle(R.string.title_create_folder)
alertDialogBuilder.setView(R.layout.folder_creation_dialog_fragment)
alertDialogBuilder.setPositiveButton(getString(R.string.button_create)) { _: DialogInterface, _: Int ->
createDirectory(requireArguments().getString(CURRENT_DIR_EXTRA)!!)

View file

@ -145,9 +145,12 @@ open class PasswordRepository protected constructor() {
}
return if (settings.getBoolean("git_external", false)) {
val externalRepo = settings.getString("git_external_repo", null)
File(requireNotNull(externalRepo))
if (externalRepo != null)
File(externalRepo)
else
File(context.filesDir.toString(), "/store")
} else {
File(context.filesDir.toString() + "/store")
File(context.filesDir.toString(), "/store")
}
}

View file

@ -7,18 +7,10 @@
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/title_create_folder"
android:textColor="@color/color_control_normal"
android:textAppearance="@style/TextAppearance.AppCompat.SearchResult.Title"/>
<com.google.android.material.textfield.TextInputLayout
style="@style/TextInputLayoutBase"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:hint="@string/crypto_name_hint"
app:hintTextColor="@color/color_control_normal"
app:hintEnabled="true">

View file

@ -12,7 +12,8 @@
<!-- Theme variables -->
<color name="window_background">@color/primary_color</color>
<color name="password_icon_color">#FAFAFA</color>
<color name="color_surface">#FF111111</color>
<color name="navigation_bar_color">@color/primary_color</color>
<color name="list_multiselect_background">#66EEEEEE</color>
<color name="status_bar_color">@color/window_background</color>
</resources>

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="light_status_bar">false</bool>
<bool name="light_navigation_bar">false</bool>
</resources>

View file

@ -14,9 +14,9 @@
<!-- Theme variables -->
<color name="window_background">#eceff1</color>
<color name="ic_launcher_background">#D4F1EA</color>
<color name="password_icon_color">#757575</color>
<color name="color_control_normal">@color/primary_text_color</color>
<color name="color_surface">#FFFFFF</color>
<color name="list_multiselect_background">#668eacbb</color>
<color name="navigation_bar_color">#000000</color>
<color name="status_bar_color">@color/primary_dark_color</color>
</resources>

View file

@ -14,7 +14,7 @@
<item name="colorControlNormal">@color/color_control_normal</item>
<item name="android:colorBackgroundFloating">@color/primary_color</item>
<item name="android:statusBarColor">@color/status_bar_color</item>
<item name="android:windowLightStatusBar">@bool/light_status_bar</item>
<item name="android:navigationBarColor">@color/navigation_bar_color</item>
<item name="android:windowBackground">@color/window_background</item>
<item name="actionModeStyle">@style/ActionMode</item>
<item name="alertDialogTheme">@style/AppTheme.Dialog</item>