Skip to content

Commit d5a39ba

Browse files
authored
Merge pull request #759 from dweymouth/fyne-2.7-migration
Fyne 2.7 migration
2 parents 37b148c + 691fcea commit d5a39ba

File tree

12 files changed

+74
-55
lines changed

12 files changed

+74
-55
lines changed

backend/config.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,9 @@ type ReplayGainConfig struct {
148148
}
149149

150150
type ThemeConfig struct {
151-
ThemeFile string
152-
Appearance string
151+
ThemeFile string
152+
Appearance string
153+
UseRoundedImageCorners bool
153154
}
154155

155156
type TranscodingConfig struct {
@@ -284,7 +285,8 @@ func DefaultConfig(appVersionTag string) *Config {
284285
MaxBitRateKBPS: 160,
285286
},
286287
Theme: ThemeConfig{
287-
Appearance: "Dark",
288+
Appearance: "Dark",
289+
UseRoundedImageCorners: true,
288290
},
289291
PeakMeter: PeakMeterConfig{
290292
WindowWidth: 375,

go.mod

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/dweymouth/supersonic
33
go 1.24.0
44

55
require (
6-
fyne.io/fyne/v2 v2.6.1
6+
fyne.io/fyne/v2 v2.7.1
77
github.com/20after4/configdir v0.1.1
88
github.com/Microsoft/go-winio v0.6.2
99
github.com/boxes-ltd/imaging v1.7.1
@@ -33,43 +33,41 @@ require (
3333

3434
require (
3535
al.essio.dev/pkg/shellescape v1.5.1 // indirect
36-
fyne.io/systray v1.11.0 // indirect
37-
github.com/BurntSushi/toml v1.4.0 // indirect
36+
fyne.io/systray v1.11.1-0.20250603113521-ca66a66d8b58 // indirect
37+
github.com/BurntSushi/toml v1.5.0 // indirect
3838
github.com/danieljoos/wincred v1.2.2 // indirect
3939
github.com/davecgh/go-spew v1.1.1 // indirect
40-
github.com/fogleman/gg v1.3.0 // indirect
41-
github.com/fredbi/uri v1.1.0 // indirect
42-
github.com/fsnotify/fsnotify v1.7.0 // indirect
43-
github.com/fyne-io/gl-js v0.1.0 // indirect
44-
github.com/fyne-io/glfw-js v0.2.0 // indirect
40+
github.com/fredbi/uri v1.1.1 // indirect
41+
github.com/fsnotify/fsnotify v1.9.0 // indirect
42+
github.com/fyne-io/gl-js v0.2.0 // indirect
43+
github.com/fyne-io/glfw-js v0.3.0 // indirect
4544
github.com/fyne-io/image v0.1.1 // indirect
46-
github.com/fyne-io/oksvg v0.1.0 // indirect
45+
github.com/fyne-io/oksvg v0.2.0 // indirect
4746
github.com/go-audio/riff v1.0.0 // indirect
4847
github.com/go-gl/gl v0.0.0-20231021071112-07e5d0ea2e71 // indirect
4948
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a // indirect
5049
github.com/go-text/render v0.2.0 // indirect
5150
github.com/go-text/typesetting v0.2.1 // indirect
52-
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
5351
github.com/h2non/filetype v1.1.3 // indirect
5452
github.com/hack-pad/go-indexeddb v0.3.2 // indirect
5553
github.com/hack-pad/safejs v0.1.0 // indirect
5654
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
57-
github.com/jeandeaual/go-locale v0.0.0-20241217141322-fcc2cadd6f08 // indirect
55+
github.com/jeandeaual/go-locale v0.0.0-20250612000132-0ef82f21eade // indirect
5856
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 // indirect
5957
github.com/koron/go-ssdp v0.0.5 // indirect
6058
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
6159
github.com/nicksnyder/go-i18n/v2 v2.5.1 // indirect
6260
github.com/pmezard/go-difflib v1.0.0 // indirect
63-
github.com/rymdport/portal v0.4.1 // indirect
61+
github.com/rymdport/portal v0.4.2 // indirect
6462
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c // indirect
6563
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef // indirect
66-
github.com/stretchr/testify v1.10.0 // indirect
64+
github.com/stretchr/testify v1.11.1 // indirect
6765
github.com/yuin/goldmark v1.7.8 // indirect
6866
golang.org/x/image v0.32.0 // indirect
6967
gopkg.in/yaml.v3 v3.0.1 // indirect
7068
)
7169

72-
replace fyne.io/fyne/v2 v2.6.1 => github.com/dweymouth/fyne/v2 v2.3.0-rc1.0.20250712002006-5064d705dac4
70+
replace fyne.io/fyne/v2 v2.7.1 => github.com/dweymouth/fyne/v2 v2.3.0-rc1.0.20251115180245-c1288f7754ab
7371

7472
replace github.com/go-audio/wav v1.1.0 => github.com/dweymouth/go-wav v0.0.0-20250719173115-e60429a83eb0
7573

go.sum

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
al.essio.dev/pkg/shellescape v1.5.1 h1:86HrALUujYS/h+GtqoB26SBEdkWfmMI6FubjXlsXyho=
22
al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890=
3-
fyne.io/systray v1.11.0 h1:D9HISlxSkx+jHSniMBR6fCFOUjk1x/OOOJLa9lJYAKg=
4-
fyne.io/systray v1.11.0/go.mod h1:RVwqP9nYMo7h5zViCBHri2FgjXF7H2cub7MAq4NSoLs=
3+
fyne.io/systray v1.11.1-0.20250603113521-ca66a66d8b58 h1:eA5/u2XRd8OUkoMqEv3IBlFYSruNlXD8bRHDiqm0VNI=
4+
fyne.io/systray v1.11.1-0.20250603113521-ca66a66d8b58/go.mod h1:RVwqP9nYMo7h5zViCBHri2FgjXF7H2cub7MAq4NSoLs=
55
github.com/20after4/configdir v0.1.1 h1:ylL5dO+aGxBV4jDtG9Ej9hZfeE8Fw9jULQVq0N+ErJ8=
66
github.com/20after4/configdir v0.1.1/go.mod h1:kZ7yOiD6MFUABqBI2/N62QA1wyEB8sGeI+mygme1pl4=
7-
github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=
8-
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
7+
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
8+
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
99
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
1010
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
1111
github.com/boxes-ltd/imaging v1.7.1 h1:JlfPQkr9sowLuPY24OLNw1Wa0UjriPVo2BN0YyxdCf0=
@@ -25,8 +25,8 @@ github.com/dweymouth/fyne-advanced-list v0.0.0-20250211191927-58ea85eec72c h1:UX
2525
github.com/dweymouth/fyne-advanced-list v0.0.0-20250211191927-58ea85eec72c/go.mod h1:Idgzr4LYzve8IPHF1stLO1bdGQZnDKt/bT9WfJflCGw=
2626
github.com/dweymouth/fyne-tooltip v0.3.0 h1:NKCyTkh9NtvnTsiHtTOtaJzRDOFYP8AckQ2tyhOh6JY=
2727
github.com/dweymouth/fyne-tooltip v0.3.0/go.mod h1:m04ShLW/Tp6LXrNieTumApvNgo7YSB+wi+jZTN+kDBU=
28-
github.com/dweymouth/fyne/v2 v2.3.0-rc1.0.20250712002006-5064d705dac4 h1:Q3r94AcVL8yaF4Nrd3EQFKyLL3UN/zHPkj+My9B2vCQ=
29-
github.com/dweymouth/fyne/v2 v2.3.0-rc1.0.20250712002006-5064d705dac4/go.mod h1:YZt7SksjvrSNJCwbWFV32WON3mE1Sr7L41D29qMZ/lU=
28+
github.com/dweymouth/fyne/v2 v2.3.0-rc1.0.20251115180245-c1288f7754ab h1:3a3Dop0y5uGYSgjoyReYlwZqpo7xFQu+tULfZueCjEQ=
29+
github.com/dweymouth/fyne/v2 v2.3.0-rc1.0.20251115180245-c1288f7754ab/go.mod h1:xClVlrhxl7D+LT+BWYmcrW4Nf+dJTvkhnPgji7spAwE=
3030
github.com/dweymouth/go-jellyfin v0.0.0-20250928223159-bd2fb9681ef5 h1:Or5VJodg7cGmdnBIcS+FrEH0twBi7mZsFCz6V0vCOQI=
3131
github.com/dweymouth/go-jellyfin v0.0.0-20250928223159-bd2fb9681ef5/go.mod h1:fcUagHBaQnt06GmBAllNE0J4O/7064zXRWdqnTTtVjI=
3232
github.com/dweymouth/go-wav v0.0.0-20250719173115-e60429a83eb0 h1:mYcctuWgVArHhSLJxndlUM43C3hoE18BLDBkXKM2tl0=
@@ -35,20 +35,18 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
3535
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
3636
github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g=
3737
github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw=
38-
github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8=
39-
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
40-
github.com/fredbi/uri v1.1.0 h1:OqLpTXtyRg9ABReqvDGdJPqZUxs8cyBDOMXBbskCaB8=
41-
github.com/fredbi/uri v1.1.0/go.mod h1:aYTUoAXBOq7BLfVJ8GnKmfcuURosB1xyHDIfWeC/iW4=
42-
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
43-
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
44-
github.com/fyne-io/gl-js v0.1.0 h1:8luJzNs0ntEAJo+8x8kfUOXujUlP8gB3QMOxO2mUdpM=
45-
github.com/fyne-io/gl-js v0.1.0/go.mod h1:ZcepK8vmOYLu96JoxbCKJy2ybr+g1pTnaBDdl7c3ajI=
46-
github.com/fyne-io/glfw-js v0.2.0 h1:8GUZtN2aCoTPNqgRDxK5+kn9OURINhBEBc7M4O1KrmM=
47-
github.com/fyne-io/glfw-js v0.2.0/go.mod h1:Ri6te7rdZtBgBpxLW19uBpp3Dl6K9K/bRaYdJ22G8Jk=
38+
github.com/fredbi/uri v1.1.1 h1:xZHJC08GZNIUhbP5ImTHnt5Ya0T8FI2VAwI/37kh2Ko=
39+
github.com/fredbi/uri v1.1.1/go.mod h1:4+DZQ5zBjEwQCDmXW5JdIjz0PUA+yJbvtBv+u+adr5o=
40+
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
41+
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
42+
github.com/fyne-io/gl-js v0.2.0 h1:+EXMLVEa18EfkXBVKhifYB6OGs3HwKO3lUElA0LlAjs=
43+
github.com/fyne-io/gl-js v0.2.0/go.mod h1:ZcepK8vmOYLu96JoxbCKJy2ybr+g1pTnaBDdl7c3ajI=
44+
github.com/fyne-io/glfw-js v0.3.0 h1:d8k2+Y7l+zy2pc7wlGRyPfTgZoqDf3AI4G+2zOWhWUk=
45+
github.com/fyne-io/glfw-js v0.3.0/go.mod h1:Ri6te7rdZtBgBpxLW19uBpp3Dl6K9K/bRaYdJ22G8Jk=
4846
github.com/fyne-io/image v0.1.1 h1:WH0z4H7qfvNUw5l4p3bC1q70sa5+YWVt6HCj7y4VNyA=
4947
github.com/fyne-io/image v0.1.1/go.mod h1:xrfYBh6yspc+KjkgdZU/ifUC9sPA5Iv7WYUBzQKK7JM=
50-
github.com/fyne-io/oksvg v0.1.0 h1:7EUKk3HV3Y2E+qypp3nWqMXD7mum0hCw2KEGhI1fnBw=
51-
github.com/fyne-io/oksvg v0.1.0/go.mod h1:dJ9oEkPiWhnTFNCmRgEze+YNprJF7YRbpjgpWS4kzoI=
48+
github.com/fyne-io/oksvg v0.2.0 h1:mxcGU2dx6nwjJsSA9PCYZDuoAcsZ/OuJlvg/Q9Njfo8=
49+
github.com/fyne-io/oksvg v0.2.0/go.mod h1:dJ9oEkPiWhnTFNCmRgEze+YNprJF7YRbpjgpWS4kzoI=
5250
github.com/go-audio/aiff v0.0.0-20180403003018-6c3a8a6aff12/go.mod h1:AMSAp6W1zd0koOdX6QDgGIuBDTUvLa2SLQtm7d9eM3c=
5351
github.com/go-audio/aiff v1.0.0/go.mod h1:Kazp+9JR/Y1ITCXaDlO6OIIOrz6eGGAn+dGT04V4HPM=
5452
github.com/go-audio/audio v0.0.0-20180206231410-b697a35b5608/go.mod h1:6uAu0+H2lHkwdGsAY+j2wHPNPpPoeg5AaEFh9FlA+Zs=
@@ -67,8 +65,6 @@ github.com/go-text/typesetting-utils v0.0.0-20241103174707-87a29e9e6066 h1:qCuYC
6765
github.com/go-text/typesetting-utils v0.0.0-20241103174707-87a29e9e6066/go.mod h1:DDxDdQEnB70R8owOx3LVpEFvpMK9eeH1o2r0yZhFI9o=
6866
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
6967
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
70-
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
71-
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
7268
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd h1:1FjCyPC+syAzJ5/2S8fqdZK1R22vvA0J7JZKcuOIQ7Y=
7369
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg=
7470
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
@@ -87,8 +83,8 @@ github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB1
8783
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
8884
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
8985
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
90-
github.com/jeandeaual/go-locale v0.0.0-20241217141322-fcc2cadd6f08 h1:wMeVzrPO3mfHIWLZtDcSaGAe2I4PW9B/P5nMkRSwCAc=
91-
github.com/jeandeaual/go-locale v0.0.0-20241217141322-fcc2cadd6f08/go.mod h1:ZDXo8KHryOWSIqnsb/CiDq7hQUYryCgdVnxbj8tDG7o=
86+
github.com/jeandeaual/go-locale v0.0.0-20250612000132-0ef82f21eade h1:FmusiCI1wHw+XQbvL9M+1r/C3SPqKrmBaIOYwVfQoDE=
87+
github.com/jeandeaual/go-locale v0.0.0-20250612000132-0ef82f21eade/go.mod h1:ZDXo8KHryOWSIqnsb/CiDq7hQUYryCgdVnxbj8tDG7o=
9288
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 h1:YLvr1eE6cdCqjOe972w/cYF+FjW34v27+9Vo5106B4M=
9389
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25/go.mod h1:kLgvv7o6UM+0QSf0QjAse3wReFDsb9qbZJdfexWlrQw=
9490
github.com/koron/go-ssdp v0.0.5 h1:E1iSMxIs4WqxTbIBLtmNBeOOC+1sCIXQeqTWVnpmwhk=
@@ -114,8 +110,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
114110
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
115111
github.com/quarckster/go-mpris-server v1.0.3 h1:ef6d3DpxlORtdEBHnhQ/j3gS0Z3+YUfXeJhC9L9DZvA=
116112
github.com/quarckster/go-mpris-server v1.0.3/go.mod h1:2b4IdrpnEoEfU+6fQKjYhAgdvsiz4JxmTpDAUrMJVO4=
117-
github.com/rymdport/portal v0.4.1 h1:2dnZhjf5uEaeDjeF/yBIeeRo6pNI2QAKm7kq1w/kbnA=
118-
github.com/rymdport/portal v0.4.1/go.mod h1:kFF4jslnJ8pD5uCi17brj/ODlfIidOxlgUDTO5ncnC4=
113+
github.com/rymdport/portal v0.4.2 h1:7jKRSemwlTyVHHrTGgQg7gmNPJs88xkbKcIL3NlcmSU=
114+
github.com/rymdport/portal v0.4.2/go.mod h1:kFF4jslnJ8pD5uCi17brj/ODlfIidOxlgUDTO5ncnC4=
119115
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c h1:km8GpoQut05eY3GiYWEedbTT0qnSxrCjsVbb7yKY1KE=
120116
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c/go.mod h1:cNQ3dwVJtS5Hmnjxy6AgTPd0Inb3pW05ftPSX7NZO7Q=
121117
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef h1:Ch6Q+AZUxDBCVqdkI8FSpFyZDtCVBc2VmejdNrm5rRQ=
@@ -128,8 +124,8 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/
128124
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
129125
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
130126
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
131-
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
132-
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
127+
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
128+
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
133129
github.com/supersonic-app/fyne-lyrics v0.0.0-20250614151306-b1880a70a410 h1:wuDHCo6SU6r0KMm0EuI5FGVJCuLK4hcuPcMKmln8oCA=
134130
github.com/supersonic-app/fyne-lyrics v0.0.0-20250614151306-b1880a70a410/go.mod h1:XvGBPgXWkKrK+5OsoVkTcTZmwZac1Sj6miEn8q6uA20=
135131
github.com/supersonic-app/go-glfw/v3.3/glfw v0.0.0-20250906235349-c09e5a2f6b75 h1:aZnnCd5QHk/5/K5L4HpPoDwzlXXRC/hJdecdKSOOJFE=

res/translations/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@
260260
"URL": "URL",
261261
"Use blurred album cover for Now Playing page background": "Use blurred album cover for Now Playing page background",
262262
"Use legacy authentication": "Use legacy authentication",
263+
"Use rounded image corners": "Use rounded image corners",
263264
"Use waveform seekbar": "Use waveform seekbar",
264265
"Username": "Username",
265266
"version": "version",

ui/dialogs/settingsdialog.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,14 @@ func (s *SettingsDialog) createAppearanceTab(window fyne.Window) *container.TabI
573573

574574
nowPlayingBackground := widget.NewCheckWithData(lang.L("Use blurred album cover for Now Playing page background"), binding.BindBool(&s.config.NowPlayingConfig.UseBackgroundImage))
575575

576+
useRoundedImageCorners := widget.NewCheck(lang.L("Use rounded image corners"), func(b bool) {
577+
s.config.Theme.UseRoundedImageCorners = b
578+
if s.OnPageNeedsRefresh != nil {
579+
s.OnPageNeedsRefresh()
580+
}
581+
})
582+
useRoundedImageCorners.Checked = s.config.Theme.UseRoundedImageCorners
583+
576584
return container.NewTabItem(lang.L("Appearance"), container.NewVBox(
577585
util.NewHSpace(0), // insert a theme.Padding amount of space at top
578586
container.NewBorder(nil, nil, widget.NewLabel(lang.L("Theme")), /*left*/
@@ -586,6 +594,7 @@ func (s *SettingsDialog) createAppearanceTab(window fyne.Window) *container.TabI
586594
s.newSectionSeparator(),
587595
useWaveformSeekbar,
588596
nowPlayingBackground,
597+
useRoundedImageCorners,
589598
s.newSectionSeparator(),
590599
widget.NewRichText(&widget.TextSegment{Text: lang.L("Application font"), Style: util.BoldRichTextStyle}),
591600
container.New(layout.NewFormLayout(),

ui/mainwindow.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,11 @@ func (m *MainWindow) SetupSystemTrayMenu(appName string, fyneApp fyne.App) {
413413
)
414414
desk.SetSystemTrayMenu(menu)
415415
desk.SetSystemTrayIcon(res.ResAppicon256Png)
416+
if runtime.GOOS != "darwin" {
417+
// Left-click opening systray menu instead of raising window
418+
// is standard behavior on Mac.
419+
desk.SetSystemTrayWindow(m.Window)
420+
}
416421
m.haveSystemTray = true
417422
}
418423
}

ui/theme/theme.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ const (
3333
SizeNameSubText fyne.ThemeSizeName = "subText" // in between Text and Caption
3434
SizeNameSuffixText fyne.ThemeSizeName = "suffixText" // a tiny bit smaller than subText
3535

36+
SizeNameImageCornerRadius fyne.ThemeSizeName = "imageCornerRadius"
37+
3638
AnimationDurationShort = canvas.DurationShort
3739
AnimationDurationMedium = 225 * time.Millisecond
3840
AnimationDurationLong = canvas.DurationStandard
@@ -286,6 +288,11 @@ func (m *MyTheme) Size(name fyne.ThemeSizeName) float32 {
286288
return 12
287289
case theme.SizeNameScrollBar:
288290
return 14
291+
case SizeNameImageCornerRadius:
292+
if m.config.UseRoundedImageCorners {
293+
return theme.InputRadiusSize()
294+
}
295+
return 0
289296
default:
290297
return theme.DefaultTheme().Size(name)
291298
}

ui/theme/themedrectangle.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ type ThemedRectangle struct {
1515

1616
rect *canvas.Rectangle
1717

18-
ColorName fyne.ThemeColorName
19-
Translucent bool
20-
BorderWidth float32
21-
BorderColorName fyne.ThemeColorName
22-
CornerRadiusName fyne.ThemeSizeName
18+
ColorName fyne.ThemeColorName
19+
Translucent bool
20+
BorderWidth float32
21+
BorderColorName fyne.ThemeColorName
22+
CornerRadius float32
2323
}
2424

2525
func NewThemedRectangle(colorName fyne.ThemeColorName) *ThemedRectangle {
@@ -43,9 +43,7 @@ func (t *ThemedRectangle) Refresh() {
4343
t.rect.FillColor = fc
4444
t.rect.StrokeWidth = t.BorderWidth
4545
t.rect.StrokeColor = theme.Color(t.BorderColorName, settings.ThemeVariant())
46-
if t.CornerRadiusName != "" {
47-
t.rect.CornerRadius = theme.Size(t.CornerRadiusName)
48-
}
46+
t.rect.CornerRadius = t.CornerRadius
4947
t.BaseWidget.Refresh()
5048
}
5149

ui/util/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ func AddHeaderBackground(obj fyne.CanvasObject) *fyne.Container {
365365

366366
func AddHeaderBackgroundWithColorName(obj fyne.CanvasObject, colorName fyne.ThemeColorName) *fyne.Container {
367367
bgrnd := myTheme.NewThemedRectangle(colorName)
368-
bgrnd.CornerRadiusName = theme.SizeNameInputRadius
368+
bgrnd.CornerRadius = theme.InputRadiusSize()
369369
return container.NewStack(bgrnd,
370370
container.New(&layout.CustomPaddedLayout{LeftPadding: 10, RightPadding: 10, TopPadding: 10, BottomPadding: 10},
371371
obj))

ui/widgets/imageplaceholder.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
// A widget that can display an image or else
1515
// a placeholder with a rectangular border frame
1616
// and an icon positioned in the center of the frame.
17+
// The corner radius is taken from the app theme.
1718
type ImagePlaceholder struct {
1819
ScaleMode canvas.ImageScale
1920
PlaceholderIcon fyne.Resource
@@ -109,6 +110,8 @@ func (i *ImagePlaceholder) Refresh() {
109110
i.imageDisp.Hidden = !i.HaveImage()
110111
i.imageDisp.ScaleMode = i.ScaleMode
111112
i.iconImage.ScaleMode = i.ScaleMode
113+
i.imageDisp.CornerRadius = i.Theme().Size(myTheme.SizeNameImageCornerRadius)
114+
i.border.CornerRadius = i.imageDisp.CornerRadius
112115
i.BaseWidget.Refresh()
113116
}
114117

0 commit comments

Comments
 (0)