Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

[Bug] Titlebars Cannot be Disabled in Android/PyDroid3

Ouverte
#6,807 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
android, python
Domaine
frontend, mobile-dev

Piste de recherche

Commencez avec le reproducteur ui() fourni et exécutez-le sur Android/PyDroid3, en vérifiant les appels à Window et popup qui définissent no_titlebar. Comparez le comportement des fenêtres normales et maximisées ; le travail est considéré comme terminé lorsque no_titlebar est respecté pour la fenêtre présentée et pour les deux cas de popup, sans perturber l’autre comportement de titlebar.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Type of Issue (Enhancement, Error, Bug, Question)

Bug


Operating System

Android 14 - PyDroid3

PySimpleGUI Port (tkinter, Qt, Wx, Web)

tkinter


Versions (NOTE - PSG4 is no longer supported)

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.4

PySimpleGUI Version (sg.__version__)

5.0.6

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

tkinter 8.6.10

GUI Version (tkinter (sg.tclversion_detailed), PySide2, WxPython, Remi)
Priority Support Code (Commercial License Users)

Your Experience In Months or Years (optional)

1 year
Years Python programming experience
1 year
Years Programming experience overall
50 years
Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)
tkinter (briefly)
Anything else you think would be helpful?


Troubleshooting

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

  • [ x] Searched main docs for your problem PySimpleGUI Documenation
  • Looked for Demo Programs that are similar to your goal. It is recommend you use the Demo Browser! Demo Programs
  • [x ] 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)
  • [x ] Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.com
  • Have upgraded to the latest release of PySimpleGUI on PyPI (lastest official version)
  • Tried running the Development Build. Your problem may have already been fixed but not released. Check Home Window for release notes and upgrading capability
  • For licensing questions please email license@PySimpleGUI.com
Detailed Description

This is a low priority, aesthetic, issue restricted to PySimpleGUI in PyDroid3. It is mainly 'for your information'. I enjoy using PyDroid3 to write 'hobby' programs on my phone, and after struggling with tkinter GUIs, I was very happy to discover PySimpleGUI and how well it works overall in PyDroid3.

Having Popups (and custom Window popups) always show a titlebar and frame looks a little messy on the small phone screen. At least they are functional, and a maximized Window does lose its titlebar and frame.

Code To Duplicate

A short program that isolates and demonstrates the problem (Do not paste your massive program, but instead 10-20 lines that clearly show the problem)

This pre-formatted code block is all set for you to paste in your bit of code:

import PySimpleGUI as sg

HDG = """
================================================
 TitlebarsOnAndroid.py            v.2024-09-20b
 '''''''''''''''''''''
 When running a PySimpleGUI script on Android
 with PyDroid3, the 'no_titlebar' parameter for
 Windows and Popups is ignored. Only maximized
 Windows will not have a titlebar/frame.
 
 NB: This Window has 'no_titlebar=True'.
================================================
"""
sg.theme('DarkGray16')
ISMAX=False
FNTL=(None,9)
FNTS=(None,5)
MONS=('Droid Sans Mono',5)

def ui():
  rowT = [
    sg.Text(" Titlebars On Android",
            pad=0, font=FNTL,
            background_color='#4a5459',
            expand_x=True),
    sg.Text("  x  ", key="-CLOSE-", 
            pad=0, font=FNTL,
            enable_events=True, 
            background_color='Maroon')
  ]
  
  rowD = [sg.Text(HDG, font=MONS, expand_x=True)]

  rowB = [
    sg.Button("Toggle Max", key='-MAX-',
              font=FNTS, expand_x=True),
    sg.Button('Popups', key='-POPUPS-',
              font=FNTS, expand_x=True)
  ]

  layout = [rowT, rowD, rowB]
  window = sg.Window("Titlebars On Android", 
                     layout,
                     size=(1000, 650),
                     location=(15,20),
                     grab_anywhere=True,
                     no_titlebar=True,
                     resizable=True, 
                     finalize=True)
  return window
# ==============================================
if __name__ == '__main__':
  print(HDG)
  win = ui()

  while True:
    ev, val = win.read()

    if ev in (sg.WIN_CLOSED, '-CLOSE-'):
      break

    if ev == '-MAX-':
      if ISMAX:
        win.normal()
        win.refresh()
        win.move(15,20)
      else:
        win.maximize()
      ISMAX=not ISMAX

    if ev == '-POPUPS-':
      sg.popup("no_titlebar = False",
               title="Popup",
               font=(None,6),
               non_blocking=True,
               location=(100,800),
               no_titlebar=False)
      sg.popup("no_titlebar = True",
               title="Popup",
               font=(None,6),
               non_blocking=True,
               location=(600,800),
               no_titlebar=True)

  # loop
  win.close()
  print("\nDone.\n")
# ==============================================
Screenshot, Sketch, or Drawing

Screenshot_Titlebars_Pydroid3 (s)

Watcha Makin?

If you care to share something about your project, it would be awesome to hear what you're building.

Langage dominant
Python
Étoiles
13.8k
Forks
1.8k
Métriques de merge des PR
Aucune PR mergée en 30 j

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de PySimpleGUI/PySimpleGUI

Toutes les issues de PySimpleGUI/PySimpleGUI

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.