Bug 255202

Summary: drawer.lua: brand positioning not working
Product: Base System Reporter: Jose Luis Duran <jlduran>
Component: miscAssignee: Kyle Evans <kevans>
Status: Open ---    
Severity: Affects Some People CC: bugs, kevans, tsoome
Priority: --- Keywords: needs-qa
Version: CURRENTFlags: koobs: maintainer-feedback? (kevans)
koobs: mfc-stable13?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Screenshot with spindle artifact
none
WIP of the patch
none
Fix brand positioning and hide twiddle
none
Patch using git format-patch
none
A more descriptive commit message none

Description Jose Luis Duran 2021-04-18 23:47:40 UTC
Created attachment 224233 [details]
Screenshot with spindle artifact

drawer.lua ignores the values in `loader_brand_x` and `loader_brand_y`.

I have attached a patch that *fixes* it, but I would like to request, if possible, some reviewing.

I have also attached a screenshot, taken with the patch applied, however there's the spindle? artifact hanging around, and being shifted by the offsetting of the brand (indicated by the red arrow). I don't know how to address this.

This can be replicated by creating two files:

/boot/loader.conf.d/bootloader.conf:
loader_logo="none"
loader_brand="nakatomi"
loader_brand_x="15"

/boot/lua/gfx-nakatomi.lua:
return {
	brand = {
		image = "/boot/images/freebsd-logo-rev.png"
	}
}

Thank you!
Comment 1 Jose Luis Duran 2021-04-18 23:49:14 UTC
Created attachment 224234 [details]
WIP of the patch
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-04-19 03:42:56 UTC
Thank you for the bug report and patch Jose!
Comment 3 Jose Luis Duran 2021-04-23 15:44:07 UTC
Created attachment 224378 [details]
Fix brand positioning and hide twiddle

This patch fixes the brand positioning, allowing it to be adjusted and also hides the "twiddle" (spinner, twiddler or whatever it is called).
Comment 4 Kyle Evans freebsd_committer freebsd_triage 2021-04-23 15:49:01 UTC
Hi,

Can you re-upload this patch in `git show`/`git format-patch` format, please? This includes authorship metadata and a proposed commit message-

Thanks,

Kyle Evans
Comment 5 Jose Luis Duran 2021-04-23 16:12:12 UTC
Created attachment 224381 [details]
Patch using git format-patch
Comment 6 Jose Luis Duran 2021-04-23 16:16:20 UTC
(In reply to Kyle Evans from comment #4)
For some reason it seems to have removed the last line of the file, this was unintended.  This is the first time I submit using git format-patch. I'll investigate. Thank you.
Comment 7 Jose Luis Duran 2021-04-23 16:30:16 UTC
(In reply to Jose Luis Duran from comment #6)
Sorry, false alarm.  The patch is OK. Thank you for reviewing it!
Comment 8 Jose Luis Duran 2021-04-23 16:45:58 UTC
Created attachment 224383 [details]
A more descriptive commit message
Comment 9 Jose Luis Duran 2021-04-24 00:56:53 UTC
While this should be OK for now,  there are a few minor things I discovered while testing.  I will enumerate them here for reference, but I think they can be addressed separately:

- [ ] Update drawer.lua.8 (use gfx-*)
      - [ ] Mention that the height of the brand is capped to 7 rows
      or
      - [ ] Implement `branddef.image_rl`
- [ ] Test the forth implementation

Thank you!