Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semicolon position fixation issue #19

Closed
easyhooon opened this issue Sep 2, 2024 · 3 comments · Fixed by #21
Closed

Semicolon position fixation issue #19

easyhooon opened this issue Sep 2, 2024 · 3 comments · Fixed by #21
Labels
bug Something isn't working

Comments

@easyhooon
Copy link

easyhooon commented Sep 2, 2024

commandiron/WheelPickerCompose#43

This is an issue that existed in the previous WheelPickerCompose library, but it's still occurring in the TimePicker. I was wondering if you could help solve this problem

image

WheelTimPicker code in project

              WheelTimePicker(
                  modifier = Modifier
                      .fillMaxWidth()
                      .padding(horizontal = 15.dp),
                  startTime = uiState.mateRecruitTime.parseToLocalTime(),
                  minTime = Clock.System.now().toLocalDateTime(TimeZone.of("Asia/Seoul")).time,
                  maxTime = kotlinx.datetime.LocalTime(23, 59),
                  timeFormat = TimeFormat.AM_PM,
                  rowCount = 5,
                  textStyle = Large20_Mid,
                  textColor = Gray001,
                  selectorProperties = WheelPickerDefaults.selectorProperties(
                      enabled = true,
                      shape = RoundedCornerShape(10.dp),
                      color = Gray010,
                      border = BorderStroke(2.dp, Gray010),
                  ),
              ) { snappedTime -> run { selectedTime = snappedTime.formatToTime() } }

thx for reading :)

@darkokoa
Copy link
Owner

darkokoa commented Sep 3, 2024

Thanks for catching this bug. I really appreciate you taking the time to report it. I'm planning to dive in and fix it soon.

But until then, here's a quick workaround you could try: avoid using Modifier.fillMaxWidth() for now. There are plenty of other ways to center stuff in layouts that should sidestep this issue. Hope this temp fix helps you out while I work on squashing the bug for good. And your feedback is helpful in making this project better!

@easyhooon
Copy link
Author

easyhooon commented Sep 3, 2024

image

As you mentioned, I confirmed that the position of ":" was correctly placed when I removed the fillMaxWidth() option from the Modifier. However, it doesn't seem to be vertically centered. Thank you for your quick feedback. I'm looking forward to the updated version :)

@darkokoa darkokoa added the bug Something isn't working label Sep 3, 2024
@darkokoa
Copy link
Owner

darkokoa commented Sep 9, 2024

You can try v1.0.1 now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants