Skip to content
This repository has been archived by the owner on May 21, 2023. It is now read-only.

Commit

Permalink
Add UI Font size selector
Browse files Browse the repository at this point in the history
  • Loading branch information
docent27 committed Jan 29, 2022
1 parent 87aca59 commit eca289e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/src/main/java/ui/activity/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ class MainActivity : AppCompatActivity() {
file.Writer.write(Constants.USER_CONFIG + "/settings.cfg", "color topic specific", prefs.getString("pref_color_topic_specific", "true")!!)
file.Writer.write(Constants.USER_CONFIG + "/settings.cfg", "color topic exhausted", prefs.getString("pref_color_topic_exhausted", "true")!!)
file.Writer.write(Constants.USER_CONFIG + "/settings.cfg", "async nav mesh updater threads", prefs.getString("pref_async_nav_mesh_updater_threads", "true")!!)
file.Writer.write(Constants.USER_CONFIG + "/settings.cfg", "font size", prefs.getString("pref_font_size", "true")!!)

file.Writer.write(Constants.USER_CONFIG + "/settings.cfg", "vsync", (if (prefs.getBoolean("pref_vsync", false)) "true" else "false"))
file.Writer.write(Constants.USER_CONFIG + "/settings.cfg", "preload enabled", (if (prefs.getBoolean("pref_preloading", false)) "true" else "false"))
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -688,4 +688,16 @@
<item>2</item>
<item>1</item>
</string-array>
<string name="pref_font_size">UI Font size</string>
<string name="pref_font_size_default">16</string>
<string-array name="pref_font_size_entries">
<item>Large 20</item>
<item>Large 18</item>
<item>Normal 16</item>
</string-array>
<string-array name="pref_font_size_values">
<item>20</item>
<item>18</item>
<item>16</item>
</string-array>
</resources>
9 changes: 9 additions & 0 deletions app/src/main/res/xml/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@
android:textStyle="bold"
android:title="@string/pref_uiScaling" />

<ListPreference
android:defaultValue="@string/pref_font_size_default"
android:dialogTitle="@string/pref_font_size"
android:entries="@array/pref_font_size_entries"
android:entryValues="@array/pref_font_size_values"
android:key="pref_font_size"
android:summary="%s"
android:title="@string/pref_font_size" />

<CheckBoxPreference
android:defaultValue="true"
android:key="pref_stretch_menu_background"
Expand Down

0 comments on commit eca289e

Please sign in to comment.