PanelDue Firmware
-
A photo seems like it'd be helpful here.
-
I’m taking the height as a parameter in the ‘PanelDue firmware’ section. However, when I do this, the text inside the button is not centered properly. I couldn’t resolve this.
-
@remzirecep the function at line 731 defines the button height as the font height plus twice the text margin size plus 2 pixels. Line 748 places the top of the text at the font height plus one pixel below the top of the button. What exactly are you changing?
-
@dc42 “When I take the height as a parameter and create a button on the screen, the text inside the button is not centered. I want this text to be centered.”
-
Does anyone with knowledge on this topic help me? @dc42
-
This post is deleted! -
@remzirecep Yelling for help is not a path to a solution.
Posting the aforementioned photo is a path to a solution, as is posting the changes you've made to the code.
You're getting a reply from the lead firmware author. Maybe a little appreciation for that would be helpful too.
-
@elmoret I forgot because I couldn’t solve the problem. I’m sorry. I've been working on this for days. I'm not very good with using the site either; I'm learning slowly. Please excuse me.
-
I've just created the page in the photo and added buttons to it. I want to change the width and height of these buttons, but the current button structure doesn't allow it. How can I do this? This is exactly what I need help with. Thank you.
-
@rkutun you can already change the width of the button, you pass it as the pw parameter to the SingleButton class.
There is currently no facility to change the height of a screen element. To add such a facility you would need to start by adding a height parameter to the SingleButton constructor. You could adopt the convention that a zero value means automatic height (the existing behaviour) and a nonzero value means you want exactly that height. Store the parameter in the SingleButton object and change SingleButton::GetHeight to return that stored value if it is nonzero.
-
@dc42 First of all, thank you for your response. I will try this and inform you.
-
I adjusted the button heights, but the button labels are not centered. How can I fix this? @dc42 -
-
@droftarts I solved the problem, but now there is another problem. Now my problem is that the height of the textField does not change. I could not figure out for what purpose these were made. Why is the height parameter not requested when drawing something. There is no height parameter in PanelDue software.
-
@droftarts I can't adjust the height of the section highlighted in blue. Could you help me with this? I've been looking into it myself but haven't found a solution. I don't want it to take too long. -
@rkutun I'm not a programmer, so I can't really help. Really only @dc42 or possibly @mfs12 (though he doesn't seem to be around much now) can help you. Or just keep digging until you find it.
Any reason you are using this fork https://github.com/maxgerhardt/PanelDueFirmware rather than the master https://github.com/Duet3D/PanelDueFirmware ? Using a different fork makes it even more difficult to help you.
Ian
-
@droftarts Thank you anyway. But I'm waiting for their help. I have no other option.
-
help please +++
-
You're effectively asking someone to do development work for you for free. You've gotten a fair bit of (free) help so far. If that's not enough, you could consider contacting Duet3D to set up paid development work.
-
@elmoret Thank you!