Skip to content

theme editor #63

Closed
Closed

Description

@unitycoder

separate application or webpage to design custom themes.

*but then again, if new themes are added, would have to update the separate theme editor everytime.. maybe its better to include simple color picker editor?

TODO (if builtin editor)

  • theme editor window
  • get current colors from active theme, if enabled? otherwise it takes original colors?
  • RGBA color adjust
  • reset theme to default
  • use separate fixed colors for theme editor window (so that cannot make whole theme editor single color)
  • save theme to file
  • save dialog for save theme
  • make themes/ folder in application root
  • load themes from themes/ folder in main window
  • apply changes to main window
  • missing theme colors: datagrid, blue selected row
  • missing theme colors: textbox white background
  • missing theme colors: checkboxes & toggles
  • undo last color change (ctrl+z)
  • keep previous save file name, if save again
  • optional: sort theme editor color names in alphabetic order
  • do some cleanup on theme editor cs
  • cleanup theme colors (too many colors, many similar / almost same, check names, add checkbox colors if needed)

Extra steps/ideas for later:

  • optional: save theme to Settings (but then if make bad theme, cannot find theme editor button next time?)
  • optional: HSV color adjust
  • optional: set saved theme as current theme? or not needed, since theme stays until reset or close
  • extra: add search filter for theme colors grid
  • extra: make textbox not readonly (so can type 0-255 value)
  • extra: randomize colors button, pick some nice theme colors?
  • redo last color change (ctrl+shift+z) *no redo for now

TODO (if separate editor) *skipped for now

  • take screenshots of editor, each item on different color *note: transparent objects wouldnt work as is
  • website, to adjust colors for each element
  • realtime preview (maybe could use unity webgl + color replace shaders?)
  • RGB>HTML (#AARRGGBB)>RGB converter
  • reset theme (to default theme colors)
  • export theme (opens download for themename.ini file)
  • import theme (copy paste as text? or drag n drop)
  • submit/share theme? (needs server space..)
  • best theme competition.. maybe later?
  • Settings tab, button link to theme editor url

Activity

  1. added
    enhancement
    on Feb 13, 2022
  2. changed the title [-]separate theme editor[/-] [+]theme editor[/+] on Feb 21, 2022
  3. unitycoder commented on Feb 21, 2022

    @unitycoder
    OwnerAuthor

    solved just hide highlight color, and use highlight row color instead..

                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}">Transparent</SolidColorBrush>
                    <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}">Transparent</SolidColorBrush>
    

    Better solution:
    instead of setting color inside content, set it in the Ellipse row instead:

    <Ellipse x:Name="TargetEllipse" Width="14" Height="14" Fill="{DynamicResource ThemeButtonForeground}">
        <!--<Ellipse.Fill>
            <SolidColorBrush x:Name="FillBrush" Color="White"/>
        </Ellipse.Fill>-->
    

    small problem, if override highlight color for datagrid, it excepts type "Color", whereas all template colors are SolidColorBrush.. so would be nice to be able to use SolidColorBrush for all..

    <DataGrid.Resources> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Red"/> <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Red"/> </DataGrid.Resources>

    this doesnt work (no error):
    <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="{DynamicResource ThemeGridRowHighlight.Color}"/>

    Using binding and converter, errors on element (adding elementtarget brings other errors)
    <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="{Binding DynamicResource ThemeGridRowHighlight, Converter={StaticResource solidColorBrushToColorConverter}}"/>

    so how to get SolidColorBrush from color resources, as color into that..

    Can override color from script, but then thats extra work, all other colors come from dynamic resources..
    gridRecent.Resources[System.Windows.SystemColors.InactiveSelectionHighlightBrushKey] = System.Windows.SystemColors.ControlDarkBrush;

    image

  4. unitycoder commented on Feb 26, 2022

    @unitycoder
    OwnerAuthor

    current theme colors as palette texture:
    image

    current theme colors arranged in 3d space (can see there are too many similar/nearby colors)
    image

  5. unitycoder commented on Mar 3, 2022

    @unitycoder
    OwnerAuthor

    good enough for now, build is coming soon (in a week or so)

  6. unitycoder commented on Sep 29, 2022

    @unitycoder
    OwnerAuthor
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions