mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
Improved appearance of toolbar groups
This commit is contained in:
parent
20ca3984a4
commit
1bf1cb479e
4 changed files with 26 additions and 22 deletions
|
|
@ -26,7 +26,7 @@
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
&:hover {
|
&:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: #333;
|
background-color: hsl(203, 5%, 29%);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
&.disabled:hover {
|
&.disabled:hover {
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
background-color: #888;
|
background-color: rgb(44, 44, 44);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,6 +59,12 @@
|
||||||
|
|
||||||
.group {
|
.group {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
border: rgb(212, 12, 12);
|
||||||
|
border-width: 5px;
|
||||||
|
background-color: rgb(44, 44, 44);
|
||||||
|
margin: 3px;
|
||||||
|
padding: 2px;
|
||||||
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,25 +65,25 @@ export const ModelerWorkspace: WorkbenchConfig = {
|
||||||
],
|
],
|
||||||
ui: {
|
ui: {
|
||||||
toolbar: [
|
toolbar: [
|
||||||
['DATUM_CREATE', 'PLANE', 'EditFace'], "-",
|
['DATUM_CREATE', 'PLANE', 'EditFace'],
|
||||||
|
|
||||||
["EXTRUDE", "CUT", "REVOLVE", "LOFT", "SWEEP"], "-",
|
["EXTRUDE", "CUT", "REVOLVE", "LOFT", "SWEEP"],
|
||||||
|
|
||||||
["UNION", "SUBTRACT", "INTERSECT"], "-",
|
["UNION", "SUBTRACT", "INTERSECT"],
|
||||||
|
|
||||||
["SHELL_TOOL", "FILLET_TOOL", "SCALE_BODY", "DEFEATURE_REMOVE_FACE"], "-",
|
["SHELL_TOOL", "FILLET_TOOL", "SCALE_BODY", "DEFEATURE_REMOVE_FACE"],
|
||||||
|
|
||||||
["MIRROR_BODY", "PATTERN_LINEAR", "PATTERN_RADIAL", "MOVE_BODY"] , "-",
|
["MIRROR_BODY", "PATTERN_LINEAR", "PATTERN_RADIAL", "MOVE_BODY"] ,
|
||||||
|
|
||||||
["CYLINDER", "BOX", "CONE", "SPHERE", "TORUS"], "-",
|
["CYLINDER", "BOX", "CONE", "SPHERE", "TORUS"],
|
||||||
|
|
||||||
["HOLE_TOOL"], "-",
|
["HOLE_TOOL"],
|
||||||
|
|
||||||
["IMPORT_MODEL", "DELETE_BODY"], "-",
|
["IMPORT_MODEL", "DELETE_BODY"],
|
||||||
|
|
||||||
["WIRE_LINE"], "-",
|
["WIRE_LINE"],
|
||||||
|
|
||||||
['EXPORT_BREP', 'GET_INFO'], "-",
|
['EXPORT_BREP', 'GET_INFO'],
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,13 @@ export const SheetMetalWorkspace: WorkbenchConfig = {
|
||||||
actions: [],
|
actions: [],
|
||||||
ui: {
|
ui: {
|
||||||
toolbar: [
|
toolbar: [
|
||||||
'DATUM_CREATE', 'PLANE', 'EditFace', '-',
|
['DATUM_CREATE', 'PLANE', 'EditFace',],
|
||||||
"EXTRUDE", "-",
|
["SM_TAB","SM_FLANGE", "EXTRUDE"],
|
||||||
"BOOLEAN", "-",
|
["BOOLEAN",],
|
||||||
"FILLET_TOOL", "MIRROR_BODY", "-",
|
["FILLET_TOOL", ],
|
||||||
"HOLE_TOOL", "-",
|
["MIRROR_BODY", "PATTERN_LINEAR", "PATTERN_RADIAL", "MOVE_BODY"] ,
|
||||||
"SM_TAB","SM_FLANGE"
|
["HOLE_TOOL",],
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
icon: GiFoldedPaper
|
icon: GiFoldedPaper
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,7 @@ export function ToolbarActionButtons({actions, showTitles, size}) {
|
||||||
} else if (actionRef === '|') {
|
} else if (actionRef === '|') {
|
||||||
return <ToolbarBraker key={'ToolbarBraker' + i} />;
|
return <ToolbarBraker key={'ToolbarBraker' + i} />;
|
||||||
} else if (Array.isArray(actionRef)) {
|
} else if (Array.isArray(actionRef)) {
|
||||||
return <div key={'ToolbarGroup' + i}>
|
return <ToolbarGroup><ToolbarActionButtons actions={actionRef} showTitles={showTitles} size={size} /></ToolbarGroup>;
|
||||||
<ToolbarGroup><ToolbarActionButtons actions={actionRef.slice(0, actionRef.length / 2)} showTitles={showTitles} size={size} /></ToolbarGroup>
|
|
||||||
<ToolbarGroup><ToolbarActionButtons actions={actionRef.slice(actionRef.length / 2, actionRef.length)} showTitles={showTitles} size={size} /></ToolbarGroup>
|
|
||||||
</div>;
|
|
||||||
}
|
}
|
||||||
const [id, overrides] = toIdAndOverrides(actionRef);
|
const [id, overrides] = toIdAndOverrides(actionRef);
|
||||||
return <ConnectedActionButton actionId={id} key={id} size={size} {...overrides} noLabel={!showTitles}/>
|
return <ConnectedActionButton actionId={id} key={id} size={size} {...overrides} noLabel={!showTitles}/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue