PySimpleGUI / PySimpleGUI/PySimpleGUI

[ Enhancement/Bug] We can't set the color of pad.

Aberta
#2,717 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Linguagem predominante
Python
Estrelas
13.8k
Forks
1.8k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Enhancement/bug

Operating System

Windows10

Python version

3.8.2

PySimpleGUI Port and Version

version: 4.16.0 Released 20 Feb 2020
port:PySimpleGUI
This is critical to know. Knowing where your PySimpleGUI.py file is located is just as important. You can get these by adding this to the top of your file and running it:

import PySimpleGUI as sg
print(sg)
print(sg.version)
Your Experience Levels In Months or Years

4 months Python programming experience
21 months Programming experience overall
No Have used another Python GUI Framework (tkiner, Qt, etc) previously (yes/no is fine)?

You have completed these steps:
  • Read instructions on how to file an Issue
  • Searched through main docs http://www.PySimpleGUI.org for your problem
  • Searched through the readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
  • Looked for Demo Programs that are similar to your goal http://www.PySimpleGUI.com
  • Note that there are also Demo Programs under each port on GitHub
  • Run your program outside of your debugger (from a command line)
  • Searched through Issues (open and closed) to see if already reported
Description of Problem / Question / Details

When using the function Extend() to add a new element, the color of the pad can't be changed and will be kept in the defaultcolor. But if the background color is different from the default, it will look stange.

You can see this by using the following program.

Code To Duplicate
import PySimpleGUI as sg

chat_layout=[
    [sg.Button("Add",key="add",font=("Consolas",20,"bold"),size=(13,1),button_color=("#FFF7FF","#729FCF"),pad=((1,0),0))]
]

chat_window=sg.Window("Chat Room",chat_layout,size=(950,500),border_depth=0,margins=(0,0),background_color="#300A24",alpha_channel=.9)

while 1:
    event,value=chat_window.read(timeout=100,timeout_key="TimeOut")
    if event=="add":
        chat_window.extend_layout(chat_window,
            [[sg.Button("123",font=("Consolas",13,"bold"),button_color=("#FFF7FF","#729FCF"),size=(20,1),pad=(5,5)),]])

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Execute a reprodução Python fornecida no Windows com PySimpleGUI 4.16.0 e, em seguida, rastreie o ponto de entrada Window.extend_layout e como o Button anexado lida com as configurações de pad e color. Considera-se concluído quando o botão adicionado dinamicamente usa as cores e o espaçamento solicitados, em vez da cor padrão sobre o plano de fundo personalizado da janela.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
python
Domínio
frontend
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.