adding SystemIcons struct to contains name of system images

dev_views_Settings
Rémi REGNAULT 11 months ago
parent 63eeb921e3
commit 4bc2b427aa

@ -0,0 +1,15 @@
//
// SystemIcons.swift
// DouShouQi_App
//
// Created by Rémi REGNAULT on 28/05/2024.
//
import Foundation
public struct SystemIcons {
static let DarkTheme = "moon"
static let LightTheme = "sun.max"
static let SoundOn = "speaker.2"
static let SoundOff = "speaker.slash"
}

@ -30,7 +30,7 @@ struct SettingsView: View {
Spacer()
CustomSwitchButton(IsOn: $theme, imgSystemNameIsOff: "sun.max", imgSystemNameIsOn: "moon")
CustomSwitchButton(IsOn: $theme, imgSystemNameIsOff: SystemIcons.LightTheme, imgSystemNameIsOn: SystemIcons.DarkTheme)
}
Divider()
@ -57,7 +57,7 @@ struct SettingsView: View {
Spacer()
CustomSwitchButton(IsOn: $sound, imgSystemNameIsOff: "speaker.slash", imgSystemNameIsOn: "speaker.2")
CustomSwitchButton(IsOn: $sound, imgSystemNameIsOff: SystemIcons.SoundOff, imgSystemNameIsOn: SystemIcons.SoundOn)
}
Divider()

Loading…
Cancel
Save