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

Visual Improvements - Border/Corner Radius & Gradient Titlebars #59

Open
Naros opened this issue Jan 6, 2024 · 0 comments · May be fixed by #60
Open

Visual Improvements - Border/Corner Radius & Gradient Titlebars #59

Naros opened this issue Jan 6, 2024 · 0 comments · May be fixed by #60
Milestone

Comments

@Naros
Copy link
Member

Naros commented Jan 6, 2024

Description

As discussed on Discord, it would be neat to add additional cosmetic features allowing users to specify a custom border/corner radius that is applied to the GraphNode instances and optionally specify gradient title bars.

Border/Corner Radius

We probably should limit this to a range, perhaps 0-24 or maybe even 0-16. Going above those upper bounds will likely distort the application's visual fidelity just due to how these work. Additionally, border/corner radius values cannot be applied to gradient title boxes. This is a Godot limitation with how StyleBox objects work.

Gradient Title Bars

Gradient title bars work by applying a StyleBoxTexture2D rather than a StyleBoxFlat theme to the GraphNode. These do not have the same features as the flat style box, particularly, they exclude the ability to set border/corner radius and border colors. This means they don't work well with the border/corner radius concept above, nor will they render well in selection highlighting, which is currently done by shading the node's border with yellow.

For now, when Gradient title bars are enabled, and a node is selected, the Gradient effect is disabled on the node, and it will render as though it's using the flat style box theme so that the selection looks reasonable without shifting the title bar's color to compensate, which may be worse for accessibility reasons.

Implementation ideas

We need to add two new settings to OrchestratorSettings, specifically:

  • ui/nodes/titlebar/use_gradient/colors
  • ui/nodes/border_radius

For gradient colors, this will be of the type Variant::BOOL, which will either toggle the behavior on or off. The style box will be created using a StyleBoxTexture2D with an inverted, linear gradient texture based on the node's color defined elsewhere in the settings panel. This option should default to false.

For border-radius, this will be a Variant::INT based on a range of 0-24 with a step range of 1. This option will default to 6, slightly improving the current standard border/corner radius.

Naros added a commit to Naros/godot-orchestrator that referenced this issue Jan 6, 2024
@Naros Naros linked a pull request Jan 6, 2024 that will close this issue
@Naros Naros added this to the 2.0 milestone Jan 6, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Jan 18, 2024
@Naros Naros modified the milestones: 2.0, 2.1 Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant