mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 19:08:05 +08:00
Added fine-grained choices to Snapping options popover (#1730)
* Added Customised Snapping * Fix snapping choice to Anchors; clean up popover menu code --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -134,13 +134,8 @@
|
||||
{/if}
|
||||
{@const popoverButton = narrowWidgetProps(component.props, "PopoverButton")}
|
||||
{#if popoverButton}
|
||||
<PopoverButton {...exclude(popoverButton, ["header", "text", "optionsWidget"])}>
|
||||
<TextLabel bold={true}>{popoverButton.header}</TextLabel>
|
||||
{#if popoverButton.optionsWidget?.length}
|
||||
<WidgetLayout layout={{ layout: popoverButton.optionsWidget, layoutTarget: layoutTarget }} />
|
||||
{:else}
|
||||
<TextLabel multiline={true}>{popoverButton.text}</TextLabel>
|
||||
{/if}
|
||||
<PopoverButton {...exclude(popoverButton, ["popoverLayout"])}>
|
||||
<WidgetLayout layout={{ layout: popoverButton.popoverLayout, layoutTarget: layoutTarget }} />
|
||||
</PopoverButton>
|
||||
{/if}
|
||||
{@const radioInput = narrowWidgetProps(component.props, "RadioInput")}
|
||||
|
||||
@@ -75,6 +75,16 @@
|
||||
.floating-menu {
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
|
||||
.floating-menu-content > :first-child:not(:has(:not(.text-label))),
|
||||
.floating-menu-content > :first-child:not(:has(:not(.checkbox-input))) {
|
||||
margin-top: -8px;
|
||||
}
|
||||
|
||||
.floating-menu-content > :last-child:not(:has(:not(.text-label))),
|
||||
.floating-menu-content > :last-child:not(:has(:not(.checkbox-input))) {
|
||||
margin-bottom: -8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user