korlibs / korlibs/korge

uiSlider bug on uiHorizontalFill

Open
#2,165 0 comments 0 reactions 0 assignees View on GitHub
investiage
Dominant language
Kotlin
Stars
3k
Forks
148
Avg merge
13h 44m
Merged PRs (30d)
1

Description

Code like this:

```
uiVerticalStack(150.0) {
uiHorizontalFill {
uiSlider(value = 0, min = -5, max = 5, step = 1) {
this.marks = true
}
uiText("sample")
}
}
```

produces this result:
![Zrzut ekranu 2024-02-26 215110](https://github.com/korlibs/korge/assets/33195725/2e8ef9ee-2f93-4086-92c7-f21ad3377f4c)

however simply changing the order of uiSlider and uiText works correctly:

![Zrzut ekranu 2024-02-26 215226](https://github.com/korlibs/korge/assets/33195725/db821f97-18a0-4f58-98bc-6a545c27798b)
code for that:
```
uiVerticalStack(150.0) {
uiHorizontalFill {
uiText("sample")
uiSlider(value = 0, min = -5, max = 5, step = 1) {
this.marks = true
}
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the two uiVerticalStack/uiHorizontalFill examples from the issue and compare the rendered results when uiSlider precedes or follows uiText. Trace the uiSlider and uiHorizontalFill layout behavior to identify why child order changes the rendering; done means both orders render the slider with marks correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.