fix caption dialog (#4799)

The Material 3 redesign seems to have broken the dialog when very small
images where used.
Also removes the weird background behind the context menu (seen in the
before screenshot)

Before / after:
<img
src="https://github.com/user-attachments/assets/c418125d-ef80-458f-9d94-fde428a2f59f"
width="280"/> <img
src="https://github.com/user-attachments/assets/b832b16d-0c18-4bf1-a263-de4fe0362854"
width="280"/>
This commit is contained in:
Konrad Pozniak 2024-12-10 21:11:55 +01:00 committed by GitHub
commit 328aca7031
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 9 deletions

View file

@ -130,7 +130,7 @@ class CaptionDialog : DialogFragment() {
dialog?.apply {
window?.setLayout(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT
LinearLayout.LayoutParams.WRAP_CONTENT
)
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
}