Skip to content

Commit

Permalink
Changed Compont icon
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausSchaefers committed Nov 14, 2024
1 parent 2148b77 commit eefa113
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/canvas/toolbar/LayerList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,9 @@ export default {
if (box.template) {
if (box.isRootTemplate) {
return "mdi mdi-view-grid-outline MatcIcon45";
return "mdi mdi mdi-view-grid MatcIcon45";
} else {
return "mdi mdi-border-all-variant MatcIcon45"; // return "mdi mdi mdi-border-all-variant MatcIcon45";
return "mdi mdi-view-grid-outline MatcIcon45"; // return "mdi mdi mdi-border-all-variant MatcIcon45";
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/canvas/toolbar/components/CreateButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import QIcon from 'page/QIcon'
import {wrapIcon} from 'page/QIconUtil'
import QSS from 'core/qss/QSS'
import _Tooltip from 'common/_Tooltip'
import PerformanceMonitor from '../../../core/PerformanceMonitor'
export default {
name: 'CreateButton2',
Expand Down Expand Up @@ -665,6 +666,7 @@ export default {
renderIcons (query){
this.renderFactory.cleanUp();
PerformanceMonitor.start("CreateButton.renderIcons()")
if (!query) {
this.cleanUpTempListener();
}
Expand Down Expand Up @@ -692,6 +694,7 @@ export default {
this.iconCntr.innerHTML="";
}
this.iconCntr.appendChild(cntr);
PerformanceMonitor.end("CreateButton.renderIcons()")
this.scrollToTop()
},
Expand Down
7 changes: 5 additions & 2 deletions src/canvas/toolbar/components/TemplateButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<div class=" MatcToolbarArrowDropDown MatcToolbarDropDownButton" v-if="!hasTemplate" @click="onCreate">
<div class="MatcToolbarItem MatcToolbarPrimaryItem" type="button">
<label class="">
<QIcon icon="Component" />
<QIcon :icon="icon" />
</label>
</div>
</div>
<ArrowDropDown v-else @select="onSelect" :options="options" icon="Component" css="MatcToolbarPrimaryItem"></ArrowDropDown>
<ArrowDropDown v-else @select="onSelect" :options="options" :icon="icon" css="MatcToolbarPrimaryItem"></ArrowDropDown>
</template>
<script>
import DojoWidget from 'dojo/DojoWidget'
Expand All @@ -21,6 +21,7 @@ export default {
mixins: [Util, DojoWidget,_Tooltip],
data: function () {
return {
icon: 'Component',
widget: null,
options: []
}
Expand Down Expand Up @@ -48,8 +49,10 @@ export default {
},
setWidget(widget) {
this.widget = widget
this.icon = 'Component'
if (widget.template) {
if (widget.isRootTemplate) {
this.icon = "ComponentRoot"
this.options = [
{ value: "update", label: "Update all instances", icon: "ComponentUpdate" }, // show only when needed???
{ value: "remove", label: "Unlink Component", icon: "ComponentUnlink" }
Expand Down
7 changes: 7 additions & 0 deletions src/page/QIconsSVG.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ export const icons = {
<path d="M9 6l3 3l3 -3l-3 -3z"></path>
<path d="M9 18l3 3l3 -3l-3 -3z"></path>
`,
'ComponentRoot': `
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M3 12l3 3l3 -3l-3 -3z" fill="currentColor"></path>
<path d="M15 12l3 3l3 -3l-3 -3z" fill="currentColor"></path>
<path d="M9 6l3 3l3 -3l-3 -3z" fill="currentColor"></path>
<path d="M9 18l3 3l3 -3l-3 -3z" fill="currentColor"></path>
`,
'AddWidget': `
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"></path>
Expand Down

0 comments on commit eefa113

Please sign in to comment.