OpenPoiesis/poietic-playground

Create Canvas Style/Theme

开放

#6 创建于 2025年3月25日

 (1 条评论) (0 个反应) (0 位负责人)GDScript (1 个派生)auto 404
diagramenhancementgood first issue

仓库指标

星标
 (3 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Aggregate styling options to a single structure called either canvas style or canvas theme.

Example of current colors from diagram_canvas.gd:

const default_pictogram_color = Color.WHITE
const default_label_color = Color.WHITE
const default_formula_color = Color.SKY_BLUE
const default_selection_color: Color = Color(1.0,0.8,0)
const handle_outline_color = Color.ROYAL_BLUE
const handle_color = Color.DODGER_BLUE

The styling properties are distinct from native Themes (Godot Theme). Themes describe mostly user interface. This styling can be shared between different kind of applications or even for printing or exporting to an image.

Requirements

  • Include at least the following styles:
    • pictogram color (line)
    • pictogram label color
    • pictograms formula color
    • note/comment color (node is not yet implemented)
    • selection outline color
    • error indicator color
    • value indicator color - positive, negative, overflow
    • default chart colors (to be discussed separately)
    • canvas color (not yet implemented)
    • canvas grid color (not yet implemented)
  • Store the colors in a portable way
  • It must be able to move the styling to PoieticCore in the future
  • At least two styles should be defined: light and dark

Implementation Notes

  • See diagram_canvas.gd for constants defining colors

贡献者指南