add options to hide some tools in toolbar
See original GitHub issueWhen using the viewer with a small width, the toolbar might be too wide.
Hiding some tools will make it lighter, but in order to still be able to use them if necessary, I would suggest 3 states:
- hidden: the tool is not visible on the bar;
- visible: the tool is not visible on the bar;
- collapsed: the tool is moved in the More dropdown list;
I’m not sure what is the best way to do it. Maybe adding two more options that use tools identifiers in arrays:
const options = {
// ...
hide_tools: ['ortho', 'explode', 'axes0', 'pin_view'],
collapse_tools: ['axes', 'grid', 'transparent', 'black_edge', 'explode', 'help']
}
Issue Analytics
- State:
- Created a year ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Customize toolbars on Mac - Apple Support
Hide or show the toolbar: Choose View > Hide Toolbar or View > Show Toolbar. While working in full screen for some apps,...
Read more >Customize the Quick Access Toolbar - Microsoft Support
Customize the Quick Access Toolbar by using the Options command. You can add, remove, and change the order of the commands on the...
Read more >Toolbar for HIDDEN TOOLS? Check Out the Mr Hide ...
In this video, check out Mr Hide - an extension for SketchUp designed to give you quick access to the hidden or difficult...
Read more >can you hide the Toolbar Options (add and remove buttons)
On the ultratoolbarmanager - there is a Down arrow (highlighted it says toolbar options - and the text Add and remove buttons.
Read more >How do I hide a menu item in the actionbar? - android
So use onCreateOptionsMenu to create the menu and onPrepareOptionsMenu to change visibility etc. Share.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Given the analysis in https://github.com/roipoussiere/cadquery-vscode/issues/2 I will not further dig into this. 1.5.6 has the requested
trimUI
functionality, however your extension needs to deal with the asynchronism of DOM handling.I have added a function to the next release to selectively enable/disable elements in the tollbar:
Disable:
Enable:
Now you can easily go down to width of 400px
Since you have to create the viewer component in the web view of VS Code, you should be able to call this function, right?