Skip to content

Commit 3d64ff1

Browse files
Disable 'Export All Custom Themes' if custom themes is empty (#2027)
### Description A quick PR... If the user doesn't have any custom themes, disable the "Export All Custom Themes...", as it still opens a save panel and lets the user choose a directory even though nothing's going to be saved. <!--- REQUIRED: Describe what changed in detail --> ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [ ] I documented my code ### Screenshots With no custom themes: <img width="929" alt="Screenshot 2025-04-14 at 17 54 45" src="https://github.com/user-attachments/assets/2cc76ac1-4980-4baa-9fbd-91f4197cd2e7" /> With custom themes: <img width="929" alt="Screenshot 2025-04-14 at 17 55 11" src="https://github.com/user-attachments/assets/c884e061-6909-4825-b4b1-903ccf56af4d" />
1 parent 2981547 commit 3d64ff1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CodeEdit/Features/Settings/Pages/ThemeSettings/ThemeSettingsView.swift

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ struct ThemeSettingsView: View {
5353
} label: {
5454
Text("Export All Custom Themes...")
5555
}
56+
.disabled(themeModel.themes.filter { !$0.isBundled }.isEmpty)
5657
}
5758
})
5859
.padding(.horizontal, 5)

0 commit comments

Comments
 (0)