Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug] custom_text in popup display wrong size for some language

Aperta
#6,571 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
desktop

Direzione di ricerca

Inizia riproducendo l'esempio sg.popup fornito con il port di tkinter e i valori cinesi di custom_text. Traccia l'implementazione del popup e la gestione delle dimensioni personalizzate dei pulsanti. Il lavoro è completato quando le etichette si adattano correttamente per le lingue il cui testo occupa più spazio, senza compromettere il comportamento inglese esistente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug Port - TK
Type of Issue (Enhancement, Error, Bug, Question)

Bug


Operating System

WIN10

PySimpleGUI Port (tkinter, Qt, Wx, Web)

tkinter


Versions

Version information can be obtained by calling sg.main_get_debug_data()
Or you can print each version shown in ()

Python version (sg.sys.version)

3.11.2

PySimpleGUI Version (sg.__version__)

4.61.0.201

GUI Version (tkinter (sg.tclversion_detailed), PySide2, WxPython, Remi)

8.6.12


Your Experience In Months or Years (optional)

Years Python programming experience
5 yrs
Years Programming experience overall
10+ yrs
Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)
tkinter
Anything else you think would be helpful?
None


Troubleshooting

These items may solve your problem. Please check those you've done by changing - [ ] to - [X]

  • Searched main docs for your problem www.PySimpleGUI.org
  • Looked for Demo Programs that are similar to your goal. It is recommend you use the Demo Browser! Demos.PySimpleGUI.org
  • None of your GUI code was generated by an AI algorithm like GPT
  • If not tkinter - looked for Demo Programs for specific port
  • For non tkinter - Looked at readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
  • Run your program outside of your debugger (from a command line)
  • Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.org
  • Have upgraded to the latest release of PySimpleGUI on PyPI (lastest official version)
  • Tried using the PySimpleGUI.py file on GitHub. Your problem may have already been fixed but not released
Detailed Description

custom_text in popup display wrong size for some language because they occupied more space than in English.
Although we can build one popup by user, maybe it will be better to remove the setting size from popup when layout because it is not required.

size=(len(custom_text), 1)
size=(len(custom_text[0]), 1)
size=(len(custom_text[1]), 1)
Code To Duplicate
import PySimpleGUI as sg

sg.popup('确定要修改密码吗?', custom_text=('确认', '取消'))
Screenshot, Sketch, or Drawing

image

Lingua principale
Python
Stelle
13.8k
Fork
1.8k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PySimpleGUI/PySimpleGUI

Tutte le issue di PySimpleGUI/PySimpleGUI

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.