Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

theme editor #63

Closed
18 tasks done
unitycoder opened this issue Feb 13, 2022 · 4 comments
Closed
18 tasks done

theme editor #63

unitycoder opened this issue Feb 13, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@unitycoder
Copy link
Owner

unitycoder commented Feb 13, 2022

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
@unitycoder unitycoder added the enhancement New feature or request label Feb 13, 2022
@unitycoder unitycoder changed the title separate theme editor theme editor Feb 21, 2022
@unitycoder
Copy link
Owner Author

unitycoder commented Feb 21, 2022

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

@unitycoder
Copy link
Owner Author

unitycoder commented Feb 26, 2022

current theme colors as palette texture:
image

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

@unitycoder
Copy link
Owner Author

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

@unitycoder
Copy link
Owner Author

references for dark themes
https://github.com/AngryCarrot789/WPFDarkTheme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant