Skip to content

Enabling users to set line spacing for multi-line labels #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 24, 2019
Merged

Enabling users to set line spacing for multi-line labels #7

merged 2 commits into from
Mar 24, 2019

Conversation

mikerenfro
Copy link
Contributor

Greetings. Regarding the part of PyPortal set_text speed (and line-spacing)? about the default line spacing for multi-line text, I managed to override the _line_spacing property on my text area to a much denser value.

The image below shows the result of the tighter spacing.
IMG_3346

Making a PR to allow users to set their own line spacing without using private properties, and keeping the default line spacing of 1.25. Thanks for any feedback.

@ladyada
Copy link
Member

ladyada commented Mar 24, 2019

@mikerenfro thanks - this looks great, there's one pylint error, if you fix it i'm happy to merge :)

Copy link
Member

@ladyada ladyada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix travis pylint :)

@ladyada
Copy link
Member

ladyada commented Mar 24, 2019

@ladyada
Copy link
Member

ladyada commented Mar 24, 2019

you read my mind! awesome
btw, what is that project? how did you get that graph to display? it looks great!

@mikerenfro
Copy link
Contributor Author

@ladyada Code should be lint-free now.

@ladyada ladyada merged commit a7ddd6d into adafruit:master Mar 24, 2019
@mikerenfro
Copy link
Contributor Author

It's an update to an office door sign I started several years ago, back when I had a Chumby and a Palm Pre Plus.

The graph is generated by Ganglia and saved as a PNG on one of my servers at work, I'm definitely not graphing that content on the PyPortal. I'm just happy to finally get the PyPortal to update the graph once per hour and check the status text once a minute.

I'll make a repo for the final code tomorrow.

@ladyada
Copy link
Member

ladyada commented Mar 24, 2019

neat, how are you displaying PNGs? we only have support for BMPs natively, are you using a gfx conversion service ?

@mikerenfro
Copy link
Contributor Author

Yes, that part is just standard PyPortal code using the Adafruit.io conversion service. I've used ImageMagick to convert locally on an earlier iteration of this, but for whatever reason, your BMPs end up considerably smaller than mine. And now that I'm able to separate the refresh cycles on the image and the status text, I don't worry nearly as much about SD lifespan, or getting rate-limited by the service, or unnecessary screen repainting.

@ladyada
Copy link
Member

ladyada commented Mar 24, 2019

nice! please let us know when the code is posted, it looks really handy :)

@mikerenfro
Copy link
Contributor Author

Posted to https://github.com/mikerenfro/iot-office-door-sign

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 7, 2019
Updating https://github.com/adafruit/Adafruit_CircuitPython_ADXL34x to 1.10.2 from 1.10.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_ADXL34x#8 from makermelissa/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_MMA8451 to 1.2.3 from 1.2.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_MMA8451#5 from dherrada/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_NeoTre to 1.0.5 from 1.04:
  > Merge pull request adafruit/Adafruit_CircuitPython_NeoTre#5 from dherrada/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM9x to 1.1.6 from 1.1.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM9x#26 from terriko/error_improvement

Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.2.0 from 3.1.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#25 from makermelissa/hx8357

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.1.0 from 2.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#7 from mikerenfro/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants