mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 07:58:11 +08:00
Add option to toggle ruler visibility (#1479)
* Sending Toggle Ruler message and setting visibility. Text and markers not working * Added resize on mount for Ruler Input * Set default for rulers_visible to pass test * Ruler Visibility portfolio wide instead of document * Sending Toggle Ruler message and setting visibility. Text and markers not working * Ruler Visibility portfolio wide instead of document * Cleanup * Reorganize the View menu bar; add toggle rulers hotkey * Remove non-working redundant bools, and make rulers set per-document --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
4fdf8410cf
commit
4fead6e7ec
@@ -3,6 +3,8 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { onMount } from "svelte";
|
||||
|
||||
const RULER_THICKNESS = 16;
|
||||
const MAJOR_MARK_THICKNESS = 16;
|
||||
const MEDIUM_MARK_THICKNESS = 6;
|
||||
@@ -96,6 +98,8 @@
|
||||
const remainder = n % m;
|
||||
return Math.floor(remainder >= 0 ? remainder : remainder + m);
|
||||
}
|
||||
|
||||
onMount(resize);
|
||||
</script>
|
||||
|
||||
<div class={`ruler-input ${direction.toLowerCase()}`} bind:this={rulerInput}>
|
||||
|
||||
Reference in New Issue
Block a user