Skip to content

Add theme keys for TabItem (commit details tabs) to allow color customization #34

Description

@shutelmann

Description

The current theme JSON schema allows customization of many UI elements, but the tabs in the commit details view (Changes, Information, Files) cannot be styled. Their colors always fall back to Avalonia’s default TabItem template, ignoring any values set in BasicColors.

Current behavior

  • The commit detail tabs use hardcoded/default Avalonia styles.
  • Existing keys such as SubPanel, Border0, Border1, or Contents do not affect tab headers.
  • There is no way to change the background, foreground, or selected-state colors of these tabs via the theme JSON.

Desired behavior

Add new theme keys to the schema to control the appearance of TabItem elements (at least for the commit details tabs, ideally for all tabs in the app). Suggested keys:

  • TabItem.Background – background of an unselected tab
  • TabItem.Foreground – text color of an unselected tab
  • TabItem.SelectedBackground – background of the selected tab
  • TabItem.SelectedForeground – text color of the selected tab
  • TabItem.Border – border color around tabs (if applicable)
  • Optional but useful: TabItem.HoverBackground, TabItem.HoverForeground for hover state.

If a single set of keys is too broad, at minimum the commit details tabs should be customizable.

Example

{
  "BasicColors": {
    "TabItem.Background": "#252738",
    "TabItem.Foreground": "#d8e6e6",
    "TabItem.SelectedBackground": "#2dcc82",
    "TabItem.SelectedForeground": "#171928",
    "TabItem.Border": "#353746"
  }
}

Why this is useful

Many users create custom dark themes. Without tab styling, the tabs remain light/default and break the overall look. This is a common request in theming communities and would make SourceGit’s theme system much more complete.

Additional context

I tried using existing keys like SubPanel and Border0, but they have no effect on tab headers. The schema.json currently contains no tab-related properties. Adding these keys should be a straightforward enhancement.

Thank you for your work on SourceGit!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions