Replies: 16 comments 3 replies
-
@u1550l It appears to be a bug inside the GUIslice API since the text is shown differently in the two right buttons but I would guess the '\n' is causing a cursor advancement that's occuring because of the 320 limit being exceeded or on a threshold . Or at least the driver GUIslice is layered upon thinks so (not GUIslice). If that's the case you might want to just shrink the buttons and text so that a margin on the right hand exists. This would be @ImpulseAdventure Calvin's domain but since He's MIA I could take a look at it if you can post a zip file of your project with just this screen. Paul-- |
Beta Was this translation helpful? Give feedback.
-
hello @Pconti31 I am using a standard 320x240 TFT (ILI9341 controller) -Richard |
Beta Was this translation helpful? Give feedback.
-
@u1550l You are not going to believe how easy this was to fix... |
Beta Was this translation helpful? Give feedback.
-
@Pconti31 : I corrected my example (all done in builder: button width 103, button pos x= 217 could you check again? --Richard |
Beta Was this translation helpful? Give feedback.
-
@Pconti31 : with some space left between button and display edge: posX=217, width=100, remaining=3 --Richard |
Beta Was this translation helpful? Give feedback.
-
@u1550l I ran your sample unmodified on my ESP32 with a ILI9341 dusplay 320x240 and also on my Arduino Mega with a different
while my Adafruit_ILI9341 driver library.properties show:
Paul-- |
Beta Was this translation helpful? Give feedback.
-
@u1550l I see, using a Teensy might be the problem since I tested with ESP32 and Arduino Mega. However, Calvin is using a large amount of #if #else's that make the code really hard to follow... |
Beta Was this translation helpful? Give feedback.
-
@u1550l You might also try editting your config file to use a different library
Although that could lead to font issues... So maybe not? |
Beta Was this translation helpful? Give feedback.
-
@u1550l In looking over the code inside GUIslice_drv_adagfx.cpp I think the problem area is between
Paul-- |
Beta Was this translation helpful? Give feedback.
-
@u1550l I honestly don't know if this would work or not but since you are using the Adfruit built-in fonts maybe we can avoid adafruit automatically moving the Y cursor like so: lines 1445 to 1450 changed:
Thus doing the Y positioning by hand. |
Beta Was this translation helpful? Give feedback.
-
Hi @Pconti31 , currently I get these version infos (compile output): But I noticed that the GUIslice (master branch) /library.properties file is 4 years old and still contains 0.17.0 I have to compare/merge the arduino lib and the github master branch. I will be back in a few days ... -Richard |
Beta Was this translation helpful? Give feedback.
-
Hi @Pconti31 , I will now try your suggestions one other thing: -Richard |
Beta Was this translation helpful? Give feedback.
-
@u1550l @ImpulseAdventure Assuming you have your changes marked between #if defined areas you can issue a pull request to merge your changes back into GUIslice. After you have done a git push origin your-branch-name and you go to the web site of your forked GUIslice repository you should see a message about creating the pull request. In worst case if you select the Pull request tab it should have a message about creating a pull request. Paul-- |
Beta Was this translation helpful? Give feedback.
-
Hi all,
Some lines above I found the call to ILI9341_t3n::print(ch)
The lines in the right buttom are too close together. It looks like the extra space is done by some auto-linewrap when the 6th char ina line is printed and the screen borrder hit. Does this info trigger any ideas? --Richard |
Beta Was this translation helpful? Give feedback.
-
@u1550l Ok, I have modified the driver to try and adjust spacing if teensy is used. The Built-in font sizes have heights of So my code change which I susgested above is calculated on line 1451
gives two pixels between lines. You can try higher or lower... I hope it helps... Paul-- |
Beta Was this translation helpful? Give feedback.
-
Hi @ImpulseAdventure, hi @Pconti31, I think, I can tell you the solution: KurtE 's optimized ILI9341-for-teensy driver has an auto-scroll functionality which obviously seems not to be fully aware of the font size. When writing the 5th character, this mechanism hit the right edge of the screen and decided to do a CR/LF. In https://github.com/KurtE/ILI9341_t3n/blob/master/src/ILI9341_t3n.h: I set both to false. Now my Buttons are all beautiful :) Thank you so much for your support. |
Beta Was this translation helpful? Give feedback.
-
I created a GUIslice page using GUIslice Builder with 6 identical text-buttons:
The generated code:
I was expecting to get the same image on my 320x240 pix TFT.
but the two buttons on the right side seem to need more space for the text. The distance between the lines is calculated differently:
Is this a bug?
Any ideas?
Regards, Richard
(edited: replaced "image-button" by "text-button")
Beta Was this translation helpful? Give feedback.
All reactions