mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
* unfinished implementation * Add frontend for the empty panel screen * Add an icon for Folder based on NodeFolder * fixed messages causing peicees of ui not to render on new document * Standardize nextTick syntax * WIP generisization of component subscriptions (not compiling yet) * Fix crash when loading font and there is no active document * Only advertise tool actions with a document * Fix failure to create new document * Initalise the properties panel * Fix highlight tab, canvas jump, warns and layer tree * Fix tests * Possibly fix some things? * Move WorkingColors layout definition to backend * Standardize action macro formatting * Provide typing for widgets in TS/Vue and associated cleanup * Fix viewport positioning initialization * Fix menu bar init at startup not document creation * Fix no viewport bounds bug * Change !=0 to >0 * Simplify the init system Closes #656 Co-authored-by: Keavon Chambers <keavon@keavon.com> Co-authored-by: 0hypercube <0hypercube@gmail.com>
62 lines
1.2 KiB
Vue
62 lines
1.2 KiB
Vue
<template>
|
|
<LayoutRow :class="['icon-label', iconSizeClass, iconStyleClass]">
|
|
<component :is="icon" />
|
|
</LayoutRow>
|
|
</template>
|
|
|
|
<style lang="scss">
|
|
.icon-label {
|
|
flex: 0 0 auto;
|
|
fill: var(--color-e-nearwhite);
|
|
|
|
&.size-12 {
|
|
width: 12px;
|
|
height: 12px;
|
|
}
|
|
|
|
&.size-16 {
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
|
|
&.size-24 {
|
|
width: 24px;
|
|
height: 24px;
|
|
}
|
|
|
|
&.node-style {
|
|
border-radius: 2px;
|
|
background: var(--color-node-background);
|
|
fill: var(--color-node-icon);
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent, PropType } from "vue";
|
|
|
|
import { IconName, IconStyle, icons, iconComponents } from "@/utility-functions/icons";
|
|
|
|
import LayoutRow from "@/components/layout/LayoutRow.vue";
|
|
|
|
export default defineComponent({
|
|
props: {
|
|
icon: { type: String as PropType<IconName>, required: true },
|
|
iconStyle: { type: String as PropType<IconStyle | undefined>, required: false },
|
|
},
|
|
computed: {
|
|
iconSizeClass(): string {
|
|
return `size-${icons[this.icon].size}`;
|
|
},
|
|
iconStyleClass(): string {
|
|
if (!this.iconStyle || this.iconStyle === "Normal") return "";
|
|
return `${this.iconStyle.toLowerCase()}-style`;
|
|
},
|
|
},
|
|
components: {
|
|
LayoutRow,
|
|
...iconComponents,
|
|
},
|
|
});
|
|
</script>
|