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;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
background-color: #333;
|
||||
background-color: hsl(203, 5%, 29%);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
&.disabled:hover {
|
||||
color: #aaa;
|
||||
background-color: #888;
|
||||
background-color: rgb(44, 44, 44);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -59,6 +59,12 @@
|
|||
|
||||
.group {
|
||||
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: {
|
||||
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: [],
|
||||
ui: {
|
||||
toolbar: [
|
||||
'DATUM_CREATE', 'PLANE', 'EditFace', '-',
|
||||
"EXTRUDE", "-",
|
||||
"BOOLEAN", "-",
|
||||
"FILLET_TOOL", "MIRROR_BODY", "-",
|
||||
"HOLE_TOOL", "-",
|
||||
"SM_TAB","SM_FLANGE"
|
||||
['DATUM_CREATE', 'PLANE', 'EditFace',],
|
||||
["SM_TAB","SM_FLANGE", "EXTRUDE"],
|
||||
["BOOLEAN",],
|
||||
["FILLET_TOOL", ],
|
||||
["MIRROR_BODY", "PATTERN_LINEAR", "PATTERN_RADIAL", "MOVE_BODY"] ,
|
||||
["HOLE_TOOL",],
|
||||
|
||||
]
|
||||
},
|
||||
icon: GiFoldedPaper
|
||||
|
|
|
|||
|
|
@ -24,10 +24,7 @@ export function ToolbarActionButtons({actions, showTitles, size}) {
|
|||
} else if (actionRef === '|') {
|
||||
return <ToolbarBraker key={'ToolbarBraker' + i} />;
|
||||
} else if (Array.isArray(actionRef)) {
|
||||
return <div key={'ToolbarGroup' + i}>
|
||||
<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>;
|
||||
return <ToolbarGroup><ToolbarActionButtons actions={actionRef} showTitles={showTitles} size={size} /></ToolbarGroup>;
|
||||
}
|
||||
const [id, overrides] = toIdAndOverrides(actionRef);
|
||||
return <ConnectedActionButton actionId={id} key={id} size={size} {...overrides} noLabel={!showTitles}/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue