themedtestapp.go 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // !build test
  2. package theme
  3. import (
  4. "net/url"
  5. "fyne.io/fyne/v2"
  6. )
  7. type themedApp struct {
  8. theme fyne.Theme
  9. }
  10. func (t *themedApp) CloudProvider() fyne.CloudProvider {
  11. return nil
  12. }
  13. func (t *themedApp) BuildType() fyne.BuildType {
  14. return fyne.BuildStandard
  15. }
  16. func (t *themedApp) NewWindow(title string) fyne.Window {
  17. return nil
  18. }
  19. func (t *themedApp) OpenURL(url *url.URL) error {
  20. return nil
  21. }
  22. func (t *themedApp) Icon() fyne.Resource {
  23. return nil
  24. }
  25. func (t *themedApp) SetIcon(fyne.Resource) {
  26. }
  27. func (t *themedApp) Run() {
  28. }
  29. func (t *themedApp) Quit() {
  30. }
  31. func (t *themedApp) Driver() fyne.Driver {
  32. return nil
  33. }
  34. func (t *themedApp) UniqueID() string {
  35. return ""
  36. }
  37. func (t *themedApp) SendNotification(notification *fyne.Notification) {
  38. }
  39. func (t *themedApp) Settings() fyne.Settings {
  40. return t
  41. }
  42. func (t *themedApp) Storage() fyne.Storage {
  43. return nil
  44. }
  45. func (t *themedApp) Preferences() fyne.Preferences {
  46. return nil
  47. }
  48. func (t *themedApp) Lifecycle() fyne.Lifecycle {
  49. return nil
  50. }
  51. func (t *themedApp) Metadata() fyne.AppMetadata {
  52. return fyne.AppMetadata{}
  53. }
  54. func (t *themedApp) PrimaryColor() string {
  55. return ColorBlue
  56. }
  57. func (t *themedApp) Theme() fyne.Theme {
  58. return t.theme
  59. }
  60. func (t *themedApp) SetTheme(theme fyne.Theme) {
  61. t.theme = theme
  62. }
  63. func (t *themedApp) ThemeVariant() fyne.ThemeVariant {
  64. return VariantDark
  65. }
  66. func (t *themedApp) SetCloudProvider(fyne.CloudProvider) {
  67. }
  68. func (t *themedApp) Scale() float32 {
  69. return 1.0
  70. }
  71. func (t *themedApp) ShowAnimations() bool {
  72. return true
  73. }
  74. func (t *themedApp) AddChangeListener(chan fyne.Settings) {
  75. }