Skip to content

Commit 2c88bee

Browse files
committed
Update some UI components to polish the frontend
1 parent 0004bbb commit 2c88bee

File tree

12 files changed

+40
-23
lines changed

12 files changed

+40
-23
lines changed

frontend/assets/icon-16px-solid/transformation-rotate.svg

Lines changed: 0 additions & 1 deletion
Loading

frontend/src/components/Editor.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,11 @@
235235
.scrollable-y {
236236
overflow: hidden;
237237
238-
// Firefox (standardized in CSS, but less capable)
239238
scrollbar-width: thin;
239+
// Not supported in Safari
240240
scrollbar-color: var(--color-5-dullgray) transparent;
241241
242-
// WebKit (only in Chromium/Safari but more capable)
242+
// Safari (more capable, removed from recent versions of Chromium, possibly still supported in Safari but not tested)
243243
&::-webkit-scrollbar {
244244
width: calc(2px + 6px + 2px);
245245
height: calc(2px + 6px + 2px);

frontend/src/components/panels/Document.svelte

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -614,23 +614,24 @@
614614
.tool-shelf {
615615
flex: 0 0 auto;
616616
justify-content: space-between;
617-
// A precaution in case the variables above somehow fail
618-
max-width: var(--columns-width-max);
619617
620618
.tools {
621619
flex: 0 1 auto;
622620
621+
// Disabled because Firefox appears to have switched to using overlay scrollbars which float atop the content and don't affect the layout (as of FF 135 on Windows).
622+
// We'll keep this here in case it's needed in the future.
623+
//
623624
// Firefox-specific workaround for this bug causing the scrollbar to cover up the toolbar instead of widening to accommodate the scrollbar:
624625
// <https://bugzilla.mozilla.org/show_bug.cgi?id=764076>
625626
// <https://stackoverflow.com/questions/63278303/firefox-does-not-take-vertical-scrollbar-width-into-account-when-calculating-par>
626627
// Remove this when the Firefox bug is fixed.
627-
@-moz-document url-prefix() {
628-
--available-height-plus-1: calc(var(--available-height) + 1px);
629-
--3-col-required-height: calc(var(--total-tool-rows-for-3-columns) * calc(var(--tool-width) * 1px) + var(--total-separators) * var(--separator-height));
630-
--overflows-with-3-columns: calc(1px - clamp(0px, calc((var(--available-height-plus-1) - Min(var(--available-height-plus-1), var(--3-col-required-height))) * 1000000), 1px));
631-
--firefox-scrollbar-width-space-occupied: 8; // Might change someday, or on different platforms, but this is the value in FF 120 on Windows
632-
padding-right: calc(var(--firefox-scrollbar-width-space-occupied) * var(--overflows-with-3-columns));
633-
}
628+
// @-moz-document url-prefix() {
629+
// --available-height-plus-1: calc(var(--available-height) + 1px);
630+
// --3-col-required-height: calc(var(--total-tool-rows-for-3-columns) * calc(var(--tool-width) * 1px) + var(--total-separators) * var(--height-of-separator));
631+
// --overflows-with-3-columns: calc(1px - clamp(0px, calc((var(--available-height-plus-1) - Min(var(--available-height-plus-1), var(--3-col-required-height))) * 1000000), 1px));
632+
// --firefox-scrollbar-width-space-occupied: 2; // Might change someday, or on different platforms, but this is the value in FF 120 on Windows
633+
// padding-right: calc(var(--firefox-scrollbar-width-space-occupied) * var(--overflows-with-3-columns));
634+
// }
634635
635636
.widget-span {
636637
flex-wrap: wrap;

frontend/src/components/widgets/buttons/TextButton.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,12 @@
146146
}
147147
148148
&.flush {
149-
background: none;
149+
--button-background-color: none;
150+
--button-text-color: var(--color-e-nearwhite);
150151
151152
&:hover,
152153
&.open {
153-
background: var(--color-5-dullgray);
154+
--button-background-color: var(--color-5-dullgray);
154155
}
155156
}
156157

frontend/src/components/widgets/inputs/DropdownInput.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@
138138
139139
.dropdown-arrow {
140140
margin: 4px;
141+
margin-right: 2px;
141142
flex: 0 0 auto;
142143
}
143144

frontend/src/components/widgets/inputs/FontInput.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
dispatch("fontFamily", newName);
7373
7474
family = newName;
75-
style = "Normal (400)";
75+
style = "Regular (400)";
7676
}
7777
7878
const fontFileUrl = await fonts.getFontFileUrl(family, style);

frontend/src/components/widgets/inputs/NumberInput.svelte

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -739,10 +739,6 @@
739739
// An outline can appear when pressing the arrow button with left click then hitting Escape, so this stops that from showing
740740
outline: none;
741741
742-
&:hover {
743-
background: var(--color-4-dimgray);
744-
}
745-
746742
&.right {
747743
right: 0;
748744
padding-left: 7px;
@@ -774,6 +770,18 @@
774770
border-color: transparent var(--color-e-nearwhite) transparent transparent;
775771
}
776772
}
773+
774+
&:hover {
775+
background: var(--color-4-dimgray);
776+
777+
&::before {
778+
border-color: transparent transparent transparent var(--color-f-white);
779+
}
780+
781+
&::after {
782+
border-color: transparent var(--color-f-white) transparent transparent;
783+
}
784+
}
777785
}
778786
}
779787

frontend/src/components/widgets/labels/Separator.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}
2626
2727
&.section {
28-
// If changing this, update `--separator-height` in `Document.svelte`
28+
// If changing this, update `--height-of-separator` in `Document.svelte`
2929
margin: 12px 0;
3030
width: 100%;
3131

frontend/src/state-providers/fonts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const weightNameMapping = new Map([
106106
[100, "Thin"],
107107
[200, "Extra Light"],
108108
[300, "Light"],
109-
[400, "Normal"],
109+
[400, "Regular"],
110110
[500, "Medium"],
111111
[600, "Semi Bold"],
112112
[700, "Bold"],

node-graph/gcore/src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ pub const LAYER_OUTLINE_STROKE_WEIGHT: f64 = 1.;
66

77
// Fonts
88
pub const DEFAULT_FONT_FAMILY: &str = "Cabin";
9-
pub const DEFAULT_FONT_STYLE: &str = "Normal (400)";
9+
pub const DEFAULT_FONT_STYLE: &str = "Regular (400)";

0 commit comments

Comments
 (0)