Merge pull request #1386 from PySimpleGUI/Dev-latest

Dev latest
This commit is contained in:
MikeTheWatchGuy 2019-05-09 10:12:59 -04:00 committed by GitHub
commit 1706c9ee5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 5 deletions

View File

@ -1,6 +1,7 @@
import sys
if sys.version_info[0] >= 3:
import PySimpleGUI as sg
# import PySimpleGUIWeb as sg # take your pick of ports. Runs on both
else:
import PySimpleGUI27 as sg
import random

View File

@ -757,6 +757,7 @@ class Listbox(Element):
background_color=bg, text_color=fg, key=key, pad=pad, tooltip=tooltip, visible=visible, size_px=size_px)
def Update(self, values=None, disabled=None, set_to_index=None,background_color=None, text_color=None, font=None, visible=None):
return
if values is not None:
self.Values = values
self.Widget.set_value(values)
@ -1808,7 +1809,7 @@ class Graph(Element):
return None
return
def DrawRectangle(self, top_left, bottom_right, fill_color='black', line_color=None):
def DrawRectangle(self, top_left, bottom_right, fill_color=None, line_color='black'):
converted_top_left = self._convert_xy_to_canvas_xy(top_left[0], top_left[1])
converted_bottom_right = self._convert_xy_to_canvas_xy(bottom_right[0], bottom_right[1])
if self.Widget is None:
@ -1816,9 +1817,12 @@ class Graph(Element):
print('Call Window.Finalize() prior to this operation')
return None
rpoint = remi.gui.SvgRectangle(converted_top_left[0], converted_top_left[1], converted_bottom_right[0]-converted_top_left[0], converted_top_left[1] - converted_bottom_right[1])
rpoint = remi.gui.SvgRectangle(converted_top_left[0], converted_top_left[1], abs(converted_bottom_right[0]-converted_top_left[0]), abs(converted_top_left[1] - converted_bottom_right[1]))
rpoint.set_stroke(width=1, color=line_color)
if fill_color is not None:
rpoint.set_fill(fill_color)
else:
rpoint.set_fill('transparent')
self.SvgGroup.append([rpoint,])
return rpoint

View File

@ -8,7 +8,7 @@
![Python Version](https://img.shields.io/badge/Python-3.x-yellow.svg)
![Python Version](https://img.shields.io/badge/PySimpleGUIWeb_-0.24.0-orange.svg?longCache=true&style=for-the-badge)
![Python Version](https://img.shields.io/badge/PySimpleGUIWeb_-0.27.0-orange.svg?longCache=true&style=for-the-badge)
@ -87,6 +87,7 @@ PySimpleGUIWeb runs only on Python 3. Legacy Python (2.7) is not supported.
* Multiline Input Element
* Multiline Output Element
* Output Element (redirect STDOUT)
* Graph Element (your canvas to paint on)
* Table Element (yes, tables! even if limited)
* Window background color
* Element padding
@ -331,6 +332,44 @@ One-time patch to remove a debug print
* Base64 support for Image Element
## 0.25.0 PySimpleGUIWeb 25-Apr-19
* DrawImage method WORKS! DrawImage now takes BOTH filenames and base64 variables
* Fix for DrawRectangle (wasn't passing the right parms)
## 0.26.0 PySimpleGUIWeb 1-May-2019
* Combo - converts values into a list of strings
* Image.Update is working with both filename and base64 (but no size controls yet)
* Window - new parameter - return_key_down_events. Normally it's key up events that are returned from Read calls
* Returning keyboard input works!
* Turned off Remi Logging completely (may be a bad idea. can change it back)
* Rearranged code so that same code is used for first window and following windows
* Window disable_close parameter controls wether or not server keeps running after user disconnects
## 0.27.0 PySimpleGUIWeb 8-May-2019
* Changed default icon from string to bytes
* New Text Update to match newer call parameters
* Added image_subsample, image_size parms to be backward compat. Note - not enabled
* SuperImage changes - load both base64 images and files
* Fix for DrawRectangle
* Added data parm to DrawImage
* Added DeleteFigure
* Tab Support
* Just barely beginning
* May or may not work
* Window new class variable - AllKeysDict
* Contains dictionary of all elements and keys
* Now used by FindElement / Element calls for quick lookup
* Fix for Column elements and rows that didn't line up. Changed tk_row_frame style
* Graph Element
* enable_events works
* drag events works
* click events works
# Design
# Author