feat(menu): add option to disable Clear Shader Cache button#1740
feat(menu): add option to disable Clear Shader Cache button#1740SkrubbySkrubInAShrub wants to merge 5 commits into
Conversation
📝 WalkthroughWalkthroughThis PR introduces a new configuration option Changes
Sequence DiagramsequenceDiagram
participant Settings as Settings System
participant HeaderRenderer as MenuHeaderRenderer
participant ActionIcon as ActionIcon Data
participant ImGui as ImGui Rendering
Settings->>HeaderRenderer: Theme.DisableClearCacheButton = true/false
HeaderRenderer->>HeaderRenderer: BuildActionIcons()<br/>compute isDisabled from settings
HeaderRenderer->>ActionIcon: Create ActionIcon(disabled=isDisabled)<br/>Set tooltip to "(Disabled)" if disabled
ActionIcon->>ImGui: Pass disabled flag & tooltip
ImGui->>ImGui: BeginDisabled(icon.disabled)
ImGui->>ImGui: Render button with tint/state
ImGui->>ImGui: Block callback if disabled
ImGui->>ImGui: EndDisabled()
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly Related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
will rework |
Some preset authors have voiced a frustration about how they often accidentally click the clear shader cache button instead of clicking save settings. This leads to having lengthy shader recompilations.
This PR aims to address this frustration by adding a new toggle in the themes tab, which will grey out this button and disable it, this setting is turned off by default as to not affect default behaviour and my intention is to save this to the themes, rather than the user settings. however this is currently cumbersome as the theme saving system has jank.
Draft for now, will talk to Davo.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.