Skip to content

SETTINGS: Settings button and save the settings. #324

@gjwgit

Description

@gjwgit

Milestones

  • Allow choice of theme and set it.
  • When a theme is changed automatically inform R rather than needing the USE button.
  • Implement a RESTORE button to restore to factory default theme (Rattle)
  • Store theme locally and restore next time starting up Rattle

Description

New Settings button at the top right button hub between the RESET and ABOUT. The settings will be saved for the future and there is the option to reset to the Rattle defaults.

The settings will be a full app window popup that have various fields to set. The popup could use showGeneralDialog() for example, as we use in utils/show_image_dialog.dart`.

Why

So that the user has configuration options available to suit the user.

Details

For now, have a single setting:

  • Graphics Theme: Default is Rattle, but the user can choose from those available in ggplot2 and ggthemes through a matrix of chips with only one chip able to be chosen at a time, or else a dop down menu. The options will include:
    • Rattle (theme_default_rattle)
    • Default (theme_grey)
    • Economist (theme_economist)
    • Economist White (theme_economist_white)
    • Black and White (theme_bw)
    • Calc (theme_calc)
    • Clean (theme_clean)
    • Dark (theme_dark)
    • Excel
    • Excel New
    • Few
    • Five Thirty Eight
    • Foundation
    • GDocs
    • HC
      etc

On closing the SETTINGS popup the settings.R script should be run. All settings should be stored in a provider (the theme default, for example, should be theme_default_rattle) and r/source.dart should replace any settings in the settings.R script (all upper case strings) with the actual settings values from the provider. The settings should be saved between sessions.

To set the theme setting in settings.R it will simply require:

theme_rattle <- SETTINGS_GRAPHIC_THEME

For a start this is the only line R code in settings.R, and rSource('settings.R') is invoked to change the theme.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions