isXander / isXander/YetAnotherConfigLib

No ability to scale list entry elements

Open
#305 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
155
Forks
68
PR merge metrics
No merged PRs in 30d

Description

the list is hardcoded to be 20 units tall because of this call to the super constructor in ListEntryWidget.java
super(entryWidget.getDimension().withHeight(Math.min(entryWidget.getDimension().height(), 20) - ((listOptionEntry.parentGroup().indexOf(listOptionEntry) == listOptionEntry.parentGroup().options().size() - 1) ? 0 : 2))); // -2 to remove the padding
The issue is that you cannot make the height larger than 20 Math.min(entryWidget.getDimension().height(), 20)
The list itself appears to support different sizes as the UI uses the height of the entry, but the height of the list entries cannot be changed without using internal methods.
It may be possible that it was supposed to be Math.max() since 20 is the hardcoded size of the buttons

Edit: forgot to mention this is for version 3.8.0+1.21.9-fabric

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in ListEntryWidget.java at the super-constructor call that limits the entry height, then inspect how the list obtains each entry's dimension. Confirm the intended sizing behavior for entries taller than 20 and verify that configurable list entries retain their requested height without breaking the existing padding adjustment.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.