mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-31 19:10:58 +08:00
1 parent
60f805fab4
commit
c6523b30f9
3 files changed
+6
-6
No files matched your search
@@ -481,7 +481,7 @@
|
|||||||
<div class="appearance-choices">
|
<div class="appearance-choices">
|
||||||
<button type="button" data-material-choice="solid"><span class="material-solid-icon"></span><span>纯色</span></button>
|
<button type="button" data-material-choice="solid"><span class="material-solid-icon"></span><span>纯色</span></button>
|
||||||
<button type="button" data-material-choice="acrylic"><span class="material-acrylic-icon"></span><span>亚克力</span></button>
|
<button type="button" data-material-choice="acrylic"><span class="material-acrylic-icon"></span><span>亚克力</span></button>
|
||||||
<button type="button" data-material-choice="mica"><span class="material-mica-icon"></span><span>云母Alt</span></button>
|
<button type="button" data-material-choice="mica-alt"><span class="material-mica-alt-icon"></span><span>云母Alt</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -5101,7 +5101,7 @@ audio.page-media {
|
|||||||
.theme-light-icon,
|
.theme-light-icon,
|
||||||
.theme-dark-icon,
|
.theme-dark-icon,
|
||||||
.material-solid-icon,
|
.material-solid-icon,
|
||||||
.material-mica-icon,
|
.material-mica-alt-icon,
|
||||||
.material-acrylic-icon {
|
.material-acrylic-icon {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
@@ -5130,7 +5130,7 @@ audio.page-media {
|
|||||||
--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='1'/%3E%3Cpath d='M6 6h12v12H6z' fill='black' fill-opacity='.25' stroke='none'/%3E%3C/svg%3E");
|
--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='1'/%3E%3Cpath d='M6 6h12v12H6z' fill='black' fill-opacity='.25' stroke='none'/%3E%3C/svg%3E");
|
||||||
}
|
}
|
||||||
|
|
||||||
.material-mica-icon {
|
.material-mica-alt-icon {
|
||||||
--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='1'/%3E%3Cpath d='M3 13c6-7 12 7 18-2M3 18c6-7 12 7 18-2'/%3E%3C/svg%3E");
|
--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='1'/%3E%3Cpath d='M3 13c6-7 12 7 18-2M3 18c6-7 12 7 18-2'/%3E%3C/svg%3E");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ func (a applicationTheme) validate() error {
|
|||||||
if a.Mode == "light" && a.Dark || a.Mode == "dark" && !a.Dark {
|
if a.Mode == "light" && a.Dark || a.Mode == "dark" && !a.Dark {
|
||||||
return fmt.Errorf("主题配色无效")
|
return fmt.Errorf("主题配色无效")
|
||||||
}
|
}
|
||||||
if a.Material != "solid" && a.Material != "mica" && a.Material != "acrylic" {
|
if a.Material != "solid" && a.Material != "mica-alt" && a.Material != "acrylic" {
|
||||||
return fmt.Errorf("窗口材质无效")
|
return fmt.Errorf("窗口材质无效")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@@ -92,7 +92,7 @@ func (h *Host) themeIndex() ([]byte, error) {
|
|||||||
mode = "system"
|
mode = "system"
|
||||||
}
|
}
|
||||||
materials := []string{"solid"}
|
materials := []string{"solid"}
|
||||||
for _, choice := range []string{"acrylic", "mica"} {
|
for _, choice := range []string{"acrylic", "mica-alt"} {
|
||||||
if windowMaterial(choice) != guigo.WindowSolid {
|
if windowMaterial(choice) != guigo.WindowSolid {
|
||||||
materials = append(materials, choice)
|
materials = append(materials, choice)
|
||||||
}
|
}
|
||||||
@@ -163,7 +163,7 @@ func (h *Host) setTheme(value applicationTheme) (err error) {
|
|||||||
func windowMaterial(value string) guigo.WindowMaterial {
|
func windowMaterial(value string) guigo.WindowMaterial {
|
||||||
material := guigo.WindowSolid
|
material := guigo.WindowSolid
|
||||||
switch value {
|
switch value {
|
||||||
case "mica":
|
case "mica-alt":
|
||||||
material = guigo.WindowMicaAlt
|
material = guigo.WindowMicaAlt
|
||||||
case "acrylic":
|
case "acrylic":
|
||||||
material = guigo.WindowAcrylic
|
material = guigo.WindowAcrylic
|
||||||
|
|||||||
Reference in new issue
Block a user