Skip to content

Commit

Permalink
Merge pull request #431 from lawsie/dev
Browse files Browse the repository at this point in the history
v 1.3.0
  • Loading branch information
Martin O'Hanlon authored Jan 1, 2022
2 parents 7744c41 + dcb9fe4 commit 1c3011a
Show file tree
Hide file tree
Showing 92 changed files with 1,947 additions and 287 deletions.
2 changes: 1 addition & 1 deletion docs-src/docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ The aim of guizero is to make the process of creating simple GUIs quick, accessi

### Version

guizero is currently [version 1.2.0](changelog.md)
guizero is currently [version 1.3.0](changelog.md)

9 changes: 9 additions & 0 deletions docs-src/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# guizero

## 1.3.0 - 2022-01-01
- Added [TitleBox](./titlebox/) widget
- Added cursor_position property to [TextBox](./textbox/)
- Made wrapping consistent (`word`) for multiline [TextBox](./textbox/) and added a `wrap` property
- Code tidy up
- Tested with Python 3.10 and added python version classifiers to setup.py
- Minor documentation updates
- contributors [martinohanlon](https://github.com/martinohanlon), [lawsie](https://github.com/lawsie), [kosme](https://github.com/kosme) - "^

## 1.2.0 - 2021-05-04
- Added `filename` to `select_file` dialog
- Added `when_resized` and `when_double_clicked` events
Expand Down
9 changes: 9 additions & 0 deletions docs-src/docs/colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ text.text_color = (0, 255, 0)

If a color is set using a list of rgb values (`(255,255,255)`) it will be returned as an #rgb hex value (`#ffffff`)

A widget's color can be reset to its default value by setting the property to `None`, for example:

```python
text = Text(app, text = "hi")
text.text_color = "green"
# reset to original color
text.text_color = None
```

### Color names

Some color names can be given as strings, for example
Expand Down
21 changes: 17 additions & 4 deletions docs-src/docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Notes on how to develop guizero (on Windows).
Upgrade pip:

```
python.exe -m pip install pip --upgrade
python -m pip install pip --upgrade
```

Install / upgrade pre-requisites:
Expand All @@ -18,6 +18,12 @@ pip install mkdocs wheel twine virtualenv pytest pillow --upgrade

## Python library

Uninstall previous versions of guizero:

```
pip uninstall guizero
```

Create a virtual environment (not essential, but a good idea!):

```
Expand Down Expand Up @@ -48,17 +54,24 @@ Scripts\deactivate

## Tests

To run the automated tests:
If running the tests inside a virtual environment you will need to install pytest in that virtual environment.

```
pip install pytest
```

To run all the automated tests:

```
cd guizero\test
pytest -v
```

If running the tests inside a virtual environment you will need to install pytest in that virtual environment.
To run a specific test:

```
pip install pytest
cd guizero\test
pytest -v [test_filename.py]
```

_Note - tkinter can error when running the tests usually when the interpreter doesn't start properly, it doesn't seem to like being initialised and destroyed hundreds of times, I suspect a file locking issue as you don't see the problem on Linux. So sometimes you might get a test fail with an error like `This probably means that tk wasn't installed properly.`. Just re-run the last failed errors! `pytest --lf -v`_
Expand Down
Binary file removed docs-src/docs/images/guizero-class-hierarchy.jpg
Binary file not shown.
Binary file added docs-src/docs/images/guizero-class-hierarchy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-src/docs/images/titlebox-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-src/docs/images/titlebox-complicated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-src/docs/images/titlebox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs-src/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ If you installed guizero using the easy install method, to upgrade you should fo
If you are using Windows you can install guizero by downloading and running a Windows MSI installer application.
1. Download either the [64-bit guizero installer](https://github.com/lawsie/guizero/releases/latest/download/guizero-1.2.0.amd64.msi) or the [32-bit guizero installer](https://github.com/lawsie/guizero/releases/latest/download/guizero-1.2.0.win32.msi) depending on which version of Python you are using.
1. Download either the [64-bit guizero installer](https://github.com/lawsie/guizero/releases/latest/download/guizero-1.3.0.amd64.msi) or the [32-bit guizero installer](https://github.com/lawsie/guizero/releases/latest/download/guizero-1.3.0.win32.msi) depending on which version of Python you are using.
**Note:** If you are not sure what version of python you are running, run the following program in Python, which will output either `32` or `64`:
Expand Down
35 changes: 19 additions & 16 deletions docs-src/docs/textbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,25 @@ You can call the following methods on your TextBox object.

You can set and get the following properties:

| Method | Data type | Description |
|------------|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| align | string | The alignment of this widget within its container |
| bg | [color](colors.md) | The background colour of the widget |
| enabled | boolean | `True` if the widget is enabled |
| font | string | The font of the text |
| grid | List | `[x,y]` coordinates of this widget. This parameter is only required if the `master` object has a grid |
| height | [size](size.md) | Set the height of the widget in characters or to `"fill"`, only effective if `multiline` is `True` |
| hide_text | boolean / char | When set to `True` will hide the text replacing typed characters with `*`. Setting to a character will result in the text being hidden with that character. |
| master | App or Box | The container to which this widget belongs |
| value | string | The text in the TextBox |
| visible | boolean | If this widget is visible |
| width | [size](size.md) | Set the width of the widget in characters or to `"fill"` |
| text_size | int | The size of the text |
| text_color | [color](colors.md) | The colour of the text |
| tk | tkinter.Entry | The internal tkinter object, see [Using tkinter](usingtk.md) |
| Method | Data type | Description |
|-----------------|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| align | string | The alignment of this widget within its container |
| bg | [color](colors.md) | The background colour of the widget |
| cursor_position | int | The current position of the cursor |
| enabled | boolean | `True` if the widget is enabled |
| font | string | The font of the text |
| grid | List | `[x,y]` coordinates of this widget. This parameter is only required if the `master` object has a grid |
| height | [size](size.md) | Set the height of the widget in characters or to `"fill"`, only effective if `multiline` is `True` |
| hide_text | boolean / char | When set to `True` will hide the text replacing typed characters with `*`. Setting to a character will result in the text being hidden with that character. |
| master | App or Box | The container to which this widget belongs |
| value | string | The text in the TextBox |
| visible | boolean | If this widget is visible |
| width | [size](size.md) | Set the width of the widget in characters or to `"fill"` |
| text_size | int | The size of the text |
| text_color | [color](colors.md) | The colour of the text |
| tk | tkinter.Entry | The internal tkinter object, see [Using tkinter](usingtk.md) |
| wrap | boolean | Whether text in a multiline text box should be wrapped. Defaults to `True`. If its a single line TextBox, `None` will be returned and a warning displayed when trying to set. |


### Examples

Expand Down
Loading

0 comments on commit 1c3011a

Please sign in to comment.