Menu

Move rEFInd's menu a little lower

2019-12-25
2022-03-14
  • Sander in 't Hout

    Hi guys,

    I would love to keep my Lenovo Yoga's EFI BGRT image (this is the typical vendor image that is shown during EFI POST on modern systems) on screen, so I extracted the bmp using Linux and created a nice 1920x1080 image from it that matches how the firmware shows the logo. There is one little problem, the Lenovo logo is pretty large, and the rEFInd menu is displayed all over the image.

    Is there any way to move the selection menu of rEFInd a little lower? Perhaps I can submit a pull request that adds an Y offset setting?

    Merry Xmas!

    • Sander in 't Hout
     
  • Roderick W. Smith

    That's not currently supported, but if you submit a merge request for a patch to add this feature, I'll certainly consider it.

     
    • Fernando Cordeiro

      @srs5694 I suppose the relevant code is lines 1192 to 1194 of refind/menu.c, i.e.:

      UINTN ComputeRow0PosY(VOID) {
          return ((UGAHeight / 2) - TileSizes[0] / 2);
      } // UINTN ComputeRow0PosY()
      

      And I suppose some code to properly parse the config option also needs to be added to refind/config.c.

      I was thinking of implementing a very simple new option, it'd be offset and it'd be possible to make it work similarly to the option resolution, in this case a single value would be a vertical offset, while two values would be a vertical then a horizontal. Though for startes it could be single-value, vertical-only.

      As for the code itself, I was thinking of simply adding this offset value to the current position, i.e., considering a single-value, vertical-only option, the above code would become something like:

      UINTN ComputeRow0PosY(VOID) {
          return ((UGAHeight / 2) - TileSizes[0] / 2) + GlobalConfig.Offset;
      } // UINTN ComputeRow0PosY()
      

      plus refind/config.c needs some code, I'd probably insert, between lines 753 and 754 (So it's between an option with 2 arguments and an option with 1 argument, making it easier to have a reference if/when a decision is made to change how this option works), the code would be something like:

              } else if (MyStriCmp(TokenList[0], L"offset")) {
                  HandleInt(TokenList, TokenCount, &(GlobalConfig.Offset));
      

      plus adding Offset as a variable, I'm still not sure what code in which files should be changed for that, Sourceforge not having a way to search code also doesn't help, but that's no big deal since I'll need to clone the repo before doing any changes.

      Anyways, I wanted to check with you whether you're interested in having something like that submitted and if you have any considerations/observations/requirements/suggestions/etc.

       
      • dakanji

        dakanji - 2022-03-14

        There is already a pending merge request on this item dated 28 Jan 2022: https://sourceforge.net/p/refind/code/merge-requests/41/

        I had actually thought about implementing it in RefindPlus but decided it was unlikely to be widely required and left it until Rod Smith makes a call vis a vis rEFInd.

        I will now reconsider this.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.