-
Notifications
You must be signed in to change notification settings - Fork 25
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
Improve flat theme, colours #237
Conversation
On dark themes the shadows become usually inverted, making it look like light is shining behind an object. Shadows are to make controls feel like actual objects that can be touched and moved. However, I don't think it's necessary for the flat theme. I designed the mockups with the shaded theme in mind. The disabled states are actually just a flat theme. As for colours you might try to compute it using a color model like hsl and a perceptually uniform color space like CIELAB (hsluv is an example, rust-hsluv is Rust implememtation). For example for hover the accent colour becomes lighter by adding 20 to the lightness. I haven't tried it out myself yet, so it has to be seen how to use it at scale effectively. Gold mine of design information: https://programmingdesignsystems.com/ |
Regarding colours, I use palette to map from sRGB to linear for all transformations. I already have slightly-crude logic to produce highlight/depress/disabled variants of colours. Maybe this could be better but it seems okay. These |
Using a grid-aligned pattern is better for small circles.
Care to comment on #238? |
ColoursWhen the text box doesn't have focus the underline is dark grey in @hummingly's concept art. This appears to be a unique colour? I'm attempting to reduce the number of unique colours down to something reasonable, but this doesn't fit elsewhere (except possibly as the scrollbar handle, though it's probably darker). Besides that, I have the following list of colours (with (programmable) generating logic for hover/pressed/disabled variants):
|
I added this dark gray because in unfocused state the background is grayish and it might be confused with the disabled state. I also didn't want to have it so colourful but most of all you can probably not the see at a first glance that the bottom border is thicker on focus. However, it might be better to just make it by default use a lighter accent color and drop the hover state. I think it is enough to change the cursor to the text beam icon on hover. |
No, I think using the accent colour to indicate input focus is a good idea. Using the soft-accent colour otherwise isn't a clear enough distinction. Not showing this thicker bar at all (only the regular border) without focus is another option. With my current colours the background gets brighter on highlight and input focus, so using it for hover highlight isn't really necessary. |
Is there a reason the text box uses a serif font? Doesn't really fit the theme imo. |
I think that's all for this PR. It's not complete of course:
@CryZe serif fonts are (currently) the default for edit fields (I prefer function over form). This is set by the theme configuration which is user-editable but (ironically enough) not by the individual theme currently. |
These theme adjustments are inspired by @hummingly. Current progress:
FlatTheme
the default (this might be renamed later; theShadedTheme
will likely stay unchanged for now other than colours and minor tweaks)text
andtext_invert
automatically since the text background colour isn't currently available; this should be doable but I may not bother)Shadows are an important detail according to @hummingly. Current ideas are to use a post-processing shader for pretty soft shadows from height or to draw using lines (but then curved corners are tricky).
Other widgets such as
EditBox
andScrollBar
are currently untouched.