Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    PanelDue Firmware

    Scheduled Pinned Locked Moved
    PanelDue
    4
    23
    804
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rkutunundefined
      rkutun
      last edited by

      When I adjust the button height on PanelDue, the button text doesn’t center properly. Is there anyone who could help with this?

      elmoretundefined 1 Reply Last reply Reply Quote 0
      • elmoretundefined
        elmoret @rkutun
        last edited by

        A photo seems like it'd be helpful here.

        rkutunundefined 1 Reply Last reply Reply Quote 2
        • rkutunundefined
          rkutun @elmoret
          last edited by

          @elmoret

          https://github.com/maxgerhardt/PanelDueFirmware/blob/f9c987c3394fe6145328ca4d9ce688759e322fbf/src/UI/Display.cpp#L731-L736

          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.

          dc42undefined 1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators @rkutun
            last edited by

            @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?

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            rkutunundefined 2 Replies Last reply Reply Quote 1
            • rkutunundefined
              rkutun @dc42
              last edited by

              @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.”

              1 Reply Last reply Reply Quote 0
              • rkutunundefined
                rkutun @dc42
                last edited by

                Does anyone with knowledge on this topic help me? @dc42

                rkutunundefined 1 Reply Last reply Reply Quote 0
                • rkutunundefined
                  rkutun @rkutun
                  last edited by

                  This post is deleted!
                  elmoretundefined 1 Reply Last reply Reply Quote -1
                  • elmoretundefined
                    elmoret @rkutun
                    last edited by

                    @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.

                    rkutunundefined 1 Reply Last reply Reply Quote 2
                    • rkutunundefined
                      rkutun @elmoret
                      last edited by rkutun

                      @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.

                      1 Reply Last reply Reply Quote 0
                      • rkutunundefined
                        rkutun
                        last edited by

                        photo1.jpg

                        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.

                        dc42undefined 1 Reply Last reply Reply Quote 0
                        • dc42undefined
                          dc42 administrators @rkutun
                          last edited by dc42

                          @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.

                          Duet WiFi hardware designer and firmware engineer
                          Please do not ask me for Duet support via PM or email, use the forum
                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                          rkutunundefined 2 Replies Last reply Reply Quote 2
                          • rkutunundefined
                            rkutun @dc42
                            last edited by

                            @dc42 First of all, thank you for your response. I will try this and inform you.

                            1 Reply Last reply Reply Quote 0
                            • rkutunundefined
                              rkutun @dc42
                              last edited by

                              WhatsApp Görsel 2024-11-07 saat 10.31.44_a9ccd43a.jpg
                              I adjusted the button heights, but the button labels are not centered. How can I fix this? @dc42

                              droftartsundefined 1 Reply Last reply Reply Quote 0
                              • droftartsundefined
                                droftarts administrators @rkutun
                                last edited by

                                @rkutun @dc42 said earlier:

                                Line 748 places the top of the text at the font height plus one pixel below the top of the button.

                                You'll need to change this line to place the top of the text at the height of the text box divided by 2, less the font height divided by two.

                                Ian

                                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                                rkutunundefined 2 Replies Last reply Reply Quote 1
                                • rkutunundefined
                                  rkutun @droftarts
                                  last edited by

                                  @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.

                                  1 Reply Last reply Reply Quote 0
                                  • rkutunundefined
                                    rkutun @droftarts
                                    last edited by

                                    WhatsApp Görsel 2024-11-08 saat 16.25.03_e505cf91.jpg
                                    @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.

                                    droftartsundefined 1 Reply Last reply Reply Quote 0
                                    • droftartsundefined
                                      droftarts administrators @rkutun
                                      last edited by

                                      @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

                                      Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                                      rkutunundefined 1 Reply Last reply Reply Quote 1
                                      • rkutunundefined
                                        rkutun @droftarts
                                        last edited by

                                        @droftarts Thank you anyway. But I'm waiting for their help. I have no other option.

                                        rkutunundefined 1 Reply Last reply Reply Quote 0
                                        • rkutunundefined
                                          rkutun @rkutun
                                          last edited by

                                          help please +++

                                          elmoretundefined dc42undefined 2 Replies Last reply Reply Quote 0
                                          • elmoretundefined
                                            elmoret @rkutun
                                            last edited by

                                            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.

                                            rkutunundefined 1 Reply Last reply Reply Quote 2
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA