mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 10:48:12 +08:00
Add the range slider design to the NumberInput widget (#839)
* Add range slider to NumberInput * Cleanup * Fix event ordering causing bug in Firefox * Polish the code * Switch number input modes to range in relevant places
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
<template>
|
||||
<LayoutRow class="field-input" :class="{ disabled, 'sharp-right-corners': sharpRightCorners }" :title="tooltip">
|
||||
<input
|
||||
type="text"
|
||||
v-if="!textarea"
|
||||
:class="{ 'has-label': label }"
|
||||
:id="`field-input-${id}`"
|
||||
ref="input"
|
||||
type="text"
|
||||
v-model="inputValue"
|
||||
:spellcheck="spellcheck"
|
||||
:disabled="disabled"
|
||||
@@ -15,6 +15,7 @@
|
||||
@change="() => $emit('textChanged')"
|
||||
@keydown.enter="() => $emit('textChanged')"
|
||||
@keydown.esc="() => $emit('cancelTextChange')"
|
||||
data-input-element
|
||||
/>
|
||||
<textarea
|
||||
v-else
|
||||
@@ -49,10 +50,11 @@
|
||||
flex-direction: row-reverse;
|
||||
|
||||
label {
|
||||
flex: 1 1 100%;
|
||||
flex: 0 0 auto;
|
||||
line-height: 18px;
|
||||
margin-left: 8px;
|
||||
padding: 3px 0;
|
||||
padding-right: 4px;
|
||||
margin-left: 8px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
|
||||
Reference in New Issue
Block a user