PySimpleGUI / PySimpleGUI/PySimpleGUI

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

オープン
#2,717 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
13.8k
フォーク
1.8k
PR マージ指標
30日以内にマージされた PR はありません

説明

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)),]])

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Windows 上で PySimpleGUI 4.16.0 を使用して提供された Python の再現コードを実行し、その後、Window.extend_layout のエントリポイントと、追加された Button が pad および color の設定をどのように処理するかを追跡します。動的に追加されたボタンが、カスタムウィンドウ背景に対するデフォルト色ではなく、要求された色とパディングを使用すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。