pladams9 / hexsheets

A basic spreadsheet application with hexagonal cells inspired by: http://www.secretgeek.net/hexcel.
MIT License
91 stars 3 forks source link

Cell text should not be a canvas "window" item #43

Closed pladams9 closed 4 years ago

pladams9 commented 4 years ago

Broken resize preview lines

broken line

This is happening because the cell text for each cell is a label in a window. Windows are drawn above everything on a canvas.

Cell text should be changed to use a text canvas item so that it works like other canvas items. A the same time, text items should only be created for cells that have text in them. This might speed things up some (both using less items and not using full label widgets).

Label widgets and windows were used originally to allow the label to easily be cut off to a specific square. A new way will need to be worked out... possibly just reducing the number of characters in each text item based on size.

Originally posted by @pladams9 in https://github.com/pladams9/hexsheets/pull/42#issuecomment-640319122

pladams9 commented 4 years ago

Current thought on correcting this: use Pillow to create an image for each cell's text, and display that as an image item on the canvas.

See: https://pillow.readthedocs.io/en/stable/index.html

pladams9 commented 4 years ago

Another question to be answered: how should cut off text be displayed?