forked from suyu/suyu
Merge pull request #12720 from t895/return-to-global
android: Change "Clear" to "Use global setting" for per-game settings
This commit is contained in:
commit
93a3342841
5 changed files with 8 additions and 10 deletions
|
@ -75,7 +75,7 @@ class DriverManagerFragment : Fragment() {
|
|||
driverViewModel.showClearButton(!StringSetting.DRIVER_PATH.global)
|
||||
binding.toolbarDrivers.setOnMenuItemClickListener {
|
||||
when (it.itemId) {
|
||||
R.id.menu_driver_clear -> {
|
||||
R.id.menu_driver_use_global -> {
|
||||
StringSetting.DRIVER_PATH.global = true
|
||||
driverViewModel.updateDriverList()
|
||||
(binding.listDrivers.adapter as DriverAdapter)
|
||||
|
@ -93,7 +93,7 @@ class DriverManagerFragment : Fragment() {
|
|||
repeatOnLifecycle(Lifecycle.State.STARTED) {
|
||||
driverViewModel.showClearButton.collect {
|
||||
binding.toolbarDrivers.menu
|
||||
.findItem(R.id.menu_driver_clear).isVisible = it
|
||||
.findItem(R.id.menu_driver_use_global).isVisible = it
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone"
|
||||
android:text="@string/clear"
|
||||
android:text="@string/use_global_setting"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/clear"
|
||||
android:text="@string/use_global_setting"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_driver_clear"
|
||||
android:icon="@drawable/ic_clear"
|
||||
android:title="@string/clear"
|
||||
app:showAsAction="always" />
|
||||
android:id="@+id/menu_driver_use_global"
|
||||
android:title="@string/use_global_setting" />
|
||||
|
||||
</menu>
|
||||
|
|
|
@ -287,6 +287,7 @@
|
|||
<string name="notice">Notice</string>
|
||||
<string name="import_complete">Import complete</string>
|
||||
<string name="more_options">More options</string>
|
||||
<string name="use_global_setting">Use global setting</string>
|
||||
|
||||
<!-- GPU driver installation -->
|
||||
<string name="select_gpu_driver">Select GPU driver</string>
|
||||
|
|
Loading…
Reference in a new issue