Skip to content

fix(weather-editor): scale button size with text#2366

Merged
alandtse merged 1 commit into
community-shaders:devfrom
SkrubbySkrubInAShrub:time-controls-button-size
May 18, 2026
Merged

fix(weather-editor): scale button size with text#2366
alandtse merged 1 commit into
community-shaders:devfrom
SkrubbySkrubInAShrub:time-controls-button-size

Conversation

@SkrubbySkrubInAShrub
Copy link
Copy Markdown
Collaborator

@SkrubbySkrubInAShrub SkrubbySkrubInAShrub commented May 17, 2026

specifically for the time control sliders, at various resolutions it could be cutting off.

Summary by CodeRabbit

  • Style
    • Time controls pause/resume button now dynamically adjusts width based on text content for improved layout consistency.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2412b3e3-c963-4fdc-8a42-21fed1f2b423

📥 Commits

Reviewing files that changed from the base of the PR and between 8c9b18c and c771ae6.

📒 Files selected for processing (1)
  • src/WeatherEditor/EditorWindow.cpp

📝 Walkthrough

Walkthrough

This PR updates the time controls UI in the Weather Editor by replacing a hardcoded button width with dynamic sizing. The Pause/Resume toggle width now adapts to the rendered text widths of the time control labels and style padding, eliminating fixed-size assumptions.

Changes

Time Controls Button Sizing

Layer / File(s) Summary
Dynamic button width in time controls UI
src/WeatherEditor/EditorWindow.cpp
EditorWindow::DrawTimeControls computes the Pause/Resume toggle button width dynamically from the text widths of "Resume Time", "Pause Time", and "Reset Speed" plus frame padding, replacing the previous fixed 120.0f * scale expression.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • alandtse
  • davo0411
  • jiayev

Poem

🐰 A button that shrinks, a button that grows,
Text-wise and padded, responsive it flows—
No more fixed widths on the weather editor stage,
Dynamic sizing has turned the new page! 📊✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: buttons are now scaled based on text rather than using fixed sizing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 OpenGrep (1.20.0)

OpenGrep fatal error (exit code 2): [00.11][ERROR]: Error: exception Unix_error: No such file or directory stat src/WeatherEditor/EditorWindow.cpp
Raised by primitive operation at UTmp.replace_named_pipe_by_regular_file_if_needed in file "libs/commons/UTmp.ml", line 145, characters 8-27
Called from Scan_CLI.replace_target_roots_by_regular_files_where_needed.(fun) in file "src/osemgrep/cli_scan/Scan_CLI.ml", lines 1086-1087, characters 19-65
Called from List_.fast_map in file "libs/commons/List_.ml", line 81, characters 17-20
Calle


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

No actionable suggestions for changed features.

@github-actions
Copy link
Copy Markdown

✅ A pre-release build is available for this PR:
Download

@alandtse alandtse merged commit b703bf2 into community-shaders:dev May 18, 2026
12 checks passed
IgorAlanAlbuquerque pushed a commit to IgorAlanAlbuquerque/skyrim-community-shaders that referenced this pull request May 29, 2026
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants