mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 06:38:12 +08:00
Implement abstract syntax tree parsing of XML layout
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<input:checkbox-with-dropdown content="OPTION_LIST" :disabled="DISABLED = false" :checked="CHECKED = false" :default="DEFAULT = 0">
|
||||
<input:checkbox-with-dropdown content="OPTION_LIST: (None) = none" :disabled="DISABLED: (Bool) = false" :checked="CHECKED: (Bool) = false" :selected-index="SELECTED_INDEX: (Integer) = 0">
|
||||
<!-- Checkbox -->
|
||||
<col width="height" height="100%">
|
||||
<box width="100%" height="100%" x-align="0.5" y-align="0.5" :fill="[accent]">
|
||||
<box width="100%" height="100%" x-align="50%" y-align="50%" :round="4px 0px 0px 4px" :fill="['accent']">
|
||||
<input:checkbox :checked="{{CHECKED}}" :disabled="{{DISABLED}}" :inverted="true" />
|
||||
</box>
|
||||
</col>
|
||||
<!-- Dropdown -->
|
||||
<col width="100%">
|
||||
<input:dropdown width="100%" :default="{{DEFAULT}}" :disabled="{{DISABLED}}">{{OPTION_LIST}}</input:dropdown>
|
||||
<input:dropdown width="100%" :selected-index="{{SELECTED_INDEX}}" :disabled="{{DISABLED}}">{{OPTION_LIST}}</input:dropdown>
|
||||
</col>
|
||||
</input:checkbox-with-dropdown>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<input:checkbox :checked="CHECKED = false" :disabled="DISABLED = false" :inverted="INVERTED = false">
|
||||
<input:checkbox :checked="CHECKED: (Bool) = false" :disabled="DISABLED: (Bool) = false" :inverted="INVERTED: (Bool) = false">
|
||||
<box width="14px" height="14px" :fill="{{BOX_COLOR}}" :round="2px">
|
||||
<if :a="{{CHECKED}}">
|
||||
<if :a="{{INVERTED}}" :b="false">
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<input:dropdown content="OPTION_LIST" :default="DEFAULT = 0" :disabled="DISABLED = false">
|
||||
<input:dropdown content="OPTION_LIST: (TemplateString | None) = none" :selected-index="SELECTED_INDEX: (Integer) = 0" :disabled="DISABLED: (Bool) = false">
|
||||
<box width="100%" :round="4px">
|
||||
<!-- Current selection text -->
|
||||
<col width="100%" height="24px">
|
||||
<text width="100%" height="100%" x-align="0.5" y-align="0.5" :color="[mildwhite]">{{CURRENT_TEXT}}</text>
|
||||
<text width="100%" height="100%" x-align="50%" y-align="50%" :color="['mildwhite']">{{CURRENT_TEXT}}</text>
|
||||
</col>
|
||||
<!-- Dropdown arrow icon -->
|
||||
<col width="8px" height="100%">
|
||||
<icon width="8px" height="100%" x-align="0.5" y-align="0.5">
|
||||
<icon width="8px" height="100%" x-align="50%" y-align="50%">
|
||||
<svg width="7" height="5" viewBox="0 0 7 5">
|
||||
<path d="M0,.5l3.5,3L7,.5v2l-3.5,3L0,2.5Z" transform="translate(0 -0.5)" fill="#ddd" />
|
||||
</svg>
|
||||
|
||||
Reference in New Issue
Block a user