emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master d2f024af612: Display background dialogs using the correct style


From: Po Lu
Subject: master d2f024af612: Display background dialogs using the correct style
Date: Fri, 22 Sep 2023 20:32:00 -0400 (EDT)

branch: master
commit d2f024af612d5951c7572725d4054ca732154576
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Display background dialogs using the correct style
    
    * java/org/gnu/emacs/EmacsDialog.java (toAlertDialog): Wrap
    CONTEXT within EmacsStyle such that dialogs are displayed in the
    same style used by activities.
---
 java/org/gnu/emacs/EmacsDialog.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/java/org/gnu/emacs/EmacsDialog.java 
b/java/org/gnu/emacs/EmacsDialog.java
index af3bf538410..bad1ddde227 100644
--- a/java/org/gnu/emacs/EmacsDialog.java
+++ b/java/org/gnu/emacs/EmacsDialog.java
@@ -41,6 +41,7 @@ import android.widget.Button;
 import android.widget.LinearLayout;
 import android.widget.FrameLayout;
 
+import android.view.ContextThemeWrapper;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.Window;
@@ -158,6 +159,13 @@ public final class EmacsDialog implements 
DialogInterface.OnDismissListener
     TypedArray attributes;
     Window window;
 
+    /* Wrap the context within a style wrapper.  Any dialog properties
+       tied to EmacsStyle (such as those applied by the system ``dark
+       theme'') will thus affect the dialog irrespective of whether
+       CONTEXT is an activity or the service.  */
+
+    context = new ContextThemeWrapper (context, R.style.EmacsStyle);
+
     size = buttons.size ();
     styleId = -1;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]