X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fdialogs%2FFontSizeDialog.kt;h=c8f3de8984a5c7b82ad4b5cd7988b2e694d65555;hp=75ef4e4517a88caa2bd9840e8097ae0db82d428d;hb=39380e8e8bdb3b9e29569a263277c9c3112b44ac;hpb=bc2e180db377eedadbe1ea455d8fb311ead8f9d6 diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/FontSizeDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/FontSizeDialog.kt index 75ef4e45..c8f3de89 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/FontSizeDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/FontSizeDialog.kt @@ -16,13 +16,14 @@ * You should have received a copy of the GNU General Public License * along with Privacy Browser. If not, see . */ + package com.stoutner.privacybrowser.dialogs import android.annotation.SuppressLint import android.app.Dialog import android.content.Context import android.content.DialogInterface -import android.content.res.Configuration + import android.os.Bundle import android.view.KeyEvent import android.view.View @@ -85,15 +86,8 @@ class FontSizeDialog: DialogFragment() { // Use a builder to create the alert dialog. val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog) - // Get the current theme status. - val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - dialogBuilder.setIcon(R.drawable.font_size_day) - } else { - dialogBuilder.setIcon(R.drawable.font_size_night) - } + dialogBuilder.setIconAttribute(R.attr.fontSizeBlueIcon) // Set the title. dialogBuilder.setTitle(R.string.font_size)