Class ViewSettings

java.lang.Object
io.github.jbastgen.stemma.app.config.ViewSettings

public final class ViewSettings extends Object
UI settings. These correspond to the "Tweaks" of the design prototype.
  • Field Details

    • theme

      public Theme theme
      The bright look is the default.
    • followSystem

      public boolean followSystem
      Theme "Automatic": the light or dark look follows the operating system (where it tells, see SystemTheme); theme is the fallback.
    • libraryLayout

      public ViewSettings.LibraryLayout libraryLayout
    • repoLayout

      public ViewSettings.RepoLayout repoLayout
    • graphStyle

      public ViewSettings.GraphStyle graphStyle
    • splitDiff

      public boolean splitDiff
      true = side-by-side diff, false = unified.
    • colorToolbar

      public boolean colorToolbar
      The icons of the toolbar of a repository in colour (true) or flat grey.
    • diffContext

      public int diffContext
      Unchanged lines shown before and after each change in the diff view (3 like git; 100000 = all).
    • wrapDiff

      public boolean wrapDiff
      Long lines of a diff are wrapped (else the diff scrolls sideways).
    • accent

      public String accent
      The accent colour as #rrggbb; empty = the colour of the theme.
    • graphColors

      public String graphColors
      The colours of the lanes of the commit graph, #rrggbb separated by commas; fewer than two = the colours of the theme.
    • graphRules

      public String graphRules
      Rules that pin a colour to branches, one per line: release/* = #22aa66.
    • repoViews

      public Map<String,String> repoViews
      The main view of each repository (feature 37), by the path of the repository: HISTORY, FILES or OVERVIEW.
    • brand

      public Branding brand
      The company branding (feature 16).
    • managed

      public transient BrandingFile.Content managed
      What branding.json of the configuration folder sets (feature 18); it replaces the branding, accent and graph colours without being stored.
    • sidebarWidth

      public double sidebarWidth
      Width of the sidebar in a repository view; changed by dragging its divider.
    • libraryListWidth

      public double libraryListWidth
      Width of the list in the library's "list + preview" layout; changed by dragging its divider.
    • bottomHeight

      public double bottomHeight
      Height of the panels below the history (changed files and details, or working tree and commit form); changed by dragging.
    • windowWidth

      public double windowWidth
      The size of the window when Stemma ended in its normal state (not maximized), 0 = none yet; remembered for the next start (feature 62).
    • windowHeight

      public double windowHeight
    • bottomFilesPercent

      public double bottomFilesPercent
      The share of the width of those panels that the list of changed files takes, in percent; changed by dragging.
  • Constructor Details

    • ViewSettings

      public ViewSettings()
  • Method Details

    • effectiveTheme

      public Theme effectiveTheme()
      The theme that is shown: the one of the operating system while "Automatic" is on and the system tells, else theme.
    • effectiveBrand

      public Branding effectiveBrand()
      The branding in use.
    • effectiveAccent

      public String effectiveAccent()
      The accent in use: the primary brand colour while the branding is on, else the chosen one.
    • effectiveGraphColors

      public String effectiveGraphColors()
      The graph colours in use.
    • effectiveGraphRules

      public String effectiveGraphRules()
      The rules for the colours of branches in use.
    • copyLookFrom

      public void copyLookFrom(ViewSettings other)
      Takes over the look and layout choices (not the panel widths) of other.
    • copy

      public ViewSettings copy()
      A deep copy, for the settings dialog to edit.