Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
38
native/desktop/maplefile/internal/app/app_settings.go
Normal file
38
native/desktop/maplefile/internal/app/app_settings.go
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
package app
|
||||
|
||||
// GetTheme returns the current theme setting
|
||||
func (a *Application) GetTheme() (string, error) {
|
||||
return a.config.GetTheme(a.ctx)
|
||||
}
|
||||
|
||||
// SetTheme updates the theme setting
|
||||
func (a *Application) SetTheme(theme string) error {
|
||||
return a.config.SetTheme(a.ctx, theme)
|
||||
}
|
||||
|
||||
// GetWindowSize returns the configured window size
|
||||
func (a *Application) GetWindowSize() (map[string]int, error) {
|
||||
width, height, err := a.config.GetWindowSize(a.ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return map[string]int{
|
||||
"width": width,
|
||||
"height": height,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// SetWindowSize updates the window size configuration
|
||||
func (a *Application) SetWindowSize(width, height int) error {
|
||||
return a.config.SetWindowSize(a.ctx, width, height)
|
||||
}
|
||||
|
||||
// GetCloudProviderAddress returns the backend API URL
|
||||
func (a *Application) GetCloudProviderAddress() (string, error) {
|
||||
return a.config.GetCloudProviderAddress(a.ctx)
|
||||
}
|
||||
|
||||
// SetCloudProviderAddress updates the backend API URL
|
||||
func (a *Application) SetCloudProviderAddress(address string) error {
|
||||
return a.config.SetCloudProviderAddress(a.ctx, address)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue