Repository navigation
Sheet tabs: show a padlock on protected sheets - #1222
Open
richard1912 wants to merge 1 commit into
Open
richard1912 wants to merge 1 commit into
richard1912 wants to merge 1 commit into
Conversation
A protected sheet's tab now carries a padlock before its name, centred with the name as one group, and a "Protected sheet" hover tip. Unprotected tabs are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A2bJ3LxrZ6YnmppgrfwHwr
This was referenced Oct 14, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1183.
A protected sheet's tab looked exactly like any other, so the first hint that a sheet was protected was an edit being refused. Now its tab carries a small padlock before the name, and hovering the tab shows "Protected sheet". Unprotected tabs are unchanged. Thanks to @dfgodvan for pointing at
sheet_tabsandIcon::Lock.Excel itself shows nothing on the tab, so this is a small improvement on Excel rather than a parity fix (Google Sheets shows a padlock the same way).
Change
crates/ui-egui/src/tabs.rs,sheet_tabs: the tab list now carriesSheet::is_protected(). A protected tab reserves 16 px (12 px padlock + 4 px gap), and the padlock and name are centred together as one group. The padlock usestext_dim, or the accent colour on the active tab to match its name. The rename field is untouched.Tests
protected_sheet_tabs_carry_a_padlock_before_the_nameincrates/ui-egui/tests/sheet_tabs.rs: protects a sheet throughreview.protectSheetand checks the name moves right, the tab grows by up to the padlock's room, and a padlock is painted just left of the name. It fails on main and passes here.cargo xtask ci: fmt, clippy, test, assets, layers and wasm pass.parityfails the same way on unmodified main on Windows (the checklist regenerates with different line endings).