mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-26 07:18:11 +08:00
Options bar widgets for tools to control tool behavior (#283)
* Add JSON-backed options widget
* Add initial tool settings messaging to backend
* Add shape side selection with JSON deserialization
* Enforce minimum number of n-gon sides
* Make tool settings JSON errors safer
* Make tool settings JSON errors safer
* Refactor ToolOptions to ToolSettings
* Revert "Refactor ToolOptions to ToolSettings"
This reverts commit 651161fd16.
* Refactor all instances of "settings" to "options"
* Fix names and formatting
* Rearrange ToolOptions data to enforce types
This commit is contained in:
@@ -6,49 +6,7 @@
|
||||
|
||||
<Separator :type="SeparatorType.Section" />
|
||||
|
||||
<IconButton :icon="'AlignHorizontalLeft'" :size="24" title="Horizontal Align Left" />
|
||||
<IconButton :icon="'AlignHorizontalCenter'" :size="24" title="Horizontal Align Center" />
|
||||
<IconButton :icon="'AlignHorizontalRight'" :size="24" gapAfter title="Horizontal Align Right" />
|
||||
|
||||
<Separator :type="SeparatorType.Unrelated" />
|
||||
|
||||
<IconButton :icon="'AlignVerticalTop'" :size="24" title="Vertical Align Top" />
|
||||
<IconButton :icon="'AlignVerticalCenter'" :size="24" title="Vertical Align Center" />
|
||||
<IconButton :icon="'AlignVerticalBottom'" :size="24" title="Vertical Align Bottom" />
|
||||
|
||||
<Separator :type="SeparatorType.Related" />
|
||||
|
||||
<PopoverButton>
|
||||
<h3>Align</h3>
|
||||
<p>More alignment-related buttons will be here</p>
|
||||
</PopoverButton>
|
||||
|
||||
<Separator :type="SeparatorType.Section" />
|
||||
|
||||
<IconButton :icon="'FlipHorizontal'" :size="24" title="Flip Horizontal" />
|
||||
<IconButton :icon="'FlipVertical'" :size="24" title="Flip Vertical" />
|
||||
|
||||
<Separator :type="SeparatorType.Related" />
|
||||
|
||||
<PopoverButton>
|
||||
<h3>Flip</h3>
|
||||
<p>More flip-related buttons will be here</p>
|
||||
</PopoverButton>
|
||||
|
||||
<Separator :type="SeparatorType.Section" />
|
||||
|
||||
<IconButton :icon="'BooleanUnion'" :size="24" title="Boolean Union" />
|
||||
<IconButton :icon="'BooleanSubtractFront'" :size="24" title="Boolean Subtract Front" />
|
||||
<IconButton :icon="'BooleanSubtractBack'" :size="24" title="Boolean Subtract Back" />
|
||||
<IconButton :icon="'BooleanIntersect'" :size="24" title="Boolean Intersect" />
|
||||
<IconButton :icon="'BooleanDifference'" :size="24" title="Boolean Difference" />
|
||||
|
||||
<Separator :type="SeparatorType.Related" />
|
||||
|
||||
<PopoverButton>
|
||||
<h3>Boolean</h3>
|
||||
<p>More boolean-related buttons will be here</p>
|
||||
</PopoverButton>
|
||||
<ToolOptions :activeTool="activeTool" />
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
<div class="right side">
|
||||
@@ -255,6 +213,7 @@ import RadioInput from "@/components/widgets/inputs/RadioInput.vue";
|
||||
import NumberInput from "@/components/widgets/inputs/NumberInput.vue";
|
||||
import DropdownInput from "@/components/widgets/inputs/DropdownInput.vue";
|
||||
import OptionalInput from "@/components/widgets/inputs/OptionalInput.vue";
|
||||
import ToolOptions from "@/components/widgets/options/ToolOptions.vue";
|
||||
import { SectionsOfMenuListEntries } from "@/components/widgets/floating-menus/MenuList.vue";
|
||||
|
||||
const modeMenuEntries: SectionsOfMenuListEntries = [
|
||||
@@ -401,6 +360,7 @@ export default defineComponent({
|
||||
NumberInput,
|
||||
DropdownInput,
|
||||
OptionalInput,
|
||||
ToolOptions,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user