Interface Customization: Difference between revisions

From FreeCAD Documentation
(removed duplicate tag)
mNo edit summary
 
(139 intermediate revisions by 11 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:15-->
<!--T:15-->
{{Docnav
{{docnav|Import Export Preference|Property editor}}
|[[Tutorials|Tutorials]]
|[[Preferences_Editor|Preferences Editor]]
}}

</translate>
{{TOCright}}
<translate>

==Introduction== <!--T:20-->


<!--T:1-->
<!--T:1-->
Since FreeCAD interface is based on the modern [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt] toolkit, it has a state-of-the-art organization. Widgets, menus, toolbars and other tools can be modified, moved, shared between workbenches, keyboard shortcuts can be set, modified, and macros can be recorded and played. The customization window is accessed from the {{MenuCommand|Tools Customize}} menu:
The FreeCAD interface is based on the modern [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt] toolkit and has a state-of-the-art organization. Some aspects of the interface can be customized. You can, for example, add custom toolbars, with tools from several workbenches or tools defined in macros, and you can create you own keyboard shortcuts. But the menus and default toolbars that come with FreeCAD and its workbenches cannot be changed.


<!--T:121-->
{{Version|0.21}}: The Workbenches tab is no longer available. Its functionality has been moved to the [[Preferences_Editor#Available_Workbenches|Available Workbenches]] tab in the Workbenches section of the [[Preferences_Editor|Preferences Editor]].

</translate>
[[Image:Std_DlgCustomize_tab_Toolbars.png]]
<translate>
<!--T:2-->
<!--T:2-->
{{Caption|The Customize dialog box}}
[[Image:Screenshot-customize.jpg]]

==Usage== <!--T:23-->

<!--T:24-->
# The commands available in the Customize dialog box depend on the workbenches that have been loaded in the current FreeCAD session. So you should first load all workbenches whose commands you want to have access to.
# There are several ways to invoke the [[Image:Std_DlgCustomize.svg|16px]] [[Std_DlgCustomize|Std DlgCustomize]] command:
#* Select the {{MenuCommand|Tools → [[Image:Std_DlgCustomize.svg|16px]] Customize...}} option from the menu.
#* Right-click a toolbar area and choose {{MenuCommand|[[Image:Std_DlgCustomize.svg|16px]] Customize...}} from the context menu.
# The Customize dialog box opens. For more information see [[#Options|Options]].
# The {{Button|Help}} button starts the [[Image:Std_WhatsThis.svg|16px]] [[Std_WhatsThis|Std WhatsThis]] command.
# Press the {{Button|Close}} button to close the dialog box.

==Options== <!--T:40-->

<!--T:41-->
In the Customize dialog box the following tabs are available:

===Keyboard=== <!--T:48-->

</translate>
[[Image:Std_DlgCustomize_tab_Keyboard.png]]
<translate>
<!--T:49-->
{{Caption|The Keyboard tab}}

<!--T:50-->
On this tab custom keyboard shortcuts can be defined. Shortcuts for macro commands can be defined on the [[#Macros|Macros]] tab.

====Search==== <!--T:122-->

<!--T:123-->
You can search for commands by entering at least 3 characters of their menu text or name in the search field. The search is case-insensitive.

<!--T:124-->
It is also possible to search for shortcuts:
* In the search field special keys in shortcuts must be entered as strings. For example to search for commands that use {{KEY|Ctrl}} in their shortcut enter {{Value|ctrl}} (4 letters).
* Add parenthesis to search for single character shortcuts, for example: {{Value|(c)}}.
* Add a comma and space between the characters of multi-character shortcuts, for example: {{Value|g, b, b}}.

====Add a shortcut==== <!--T:51-->

<!--T:52-->
# Select a command category from the '''Category''' dropdown list.
# Select a command from the '''Commands''' panel.
#* Optionally click the {{Value|Command}}, {{Value|Shortcut}} or {{Value|Default}} column headings to reorder the list.
#* Optionally drag the splitter to the right of the panel to resize it.
# The '''Current shortcut''' box displays the current short cut, if available.
# Enter a new shortcut in the '''New shortcut''' input box. Shortcuts can be up to 4 inputs long. Each input is either a single character, a combination of one or more special keys or a combination of one or more special keys and a character. Use {{KEY|Backspace}} to correct mistakes.
# Other active commands (see [[#Notes|Notes]]) that already use the shortcut will be listed in the '''Shortcut priority list'''.
# Press the {{Button|Assign}} button to assign the new shortcut.
# If the '''Shortcut priority list''' contains more than one command: optionally change its order by selecting individual commands and pressing the {{Button|Up}} button or the {{Button|Down}} button. If active commands share the same shortcut, the shortcut will trigger the one that is highest in the list.

====Remove a shortcut==== <!--T:125-->

<!--T:126-->
# Select a command category from the '''Category''' dropdown list.
# Select a command from the '''Commands''' panel.
# Press the {{Button|Clear}} button.

====Restore a default shortcut==== <!--T:127-->

<!--T:54-->
# Select a command category from the '''Category''' dropdown list.
# Select a command from the '''Commands''' panel.
# Press the {{Button|Reset}} button.

====Restore all default shortcuts==== <!--T:128-->

<!--T:56-->
# Press the {{Button|Reset All}} button.

====Notes==== <!--T:129-->

<!--T:58-->
* Shortcuts only work for active commands. Active commands are commands that appear in the standard menu, or in the menu of the active workbench, or commands that appear in a ''visible'' toolbar.

</translate>{{Top}}<translate>

===Toolbars=== <!--T:74-->

</translate>
[[Image:Std_DlgCustomize_tab_Toolbars.png]]
<translate>
<!--T:75-->
{{Caption|The Toolbars tab}}

<!--T:76-->
On this tab custom toolbars can be created and modified.

====Search==== <!--T:130-->

<!--T:131-->
See [[#Search|Keyboard]].

====Select the workbench==== <!--T:77-->

<!--T:78-->
# In the dropdown list on the right select the workbench whose custom toolbars you want to modify. The {{Value|Global}} option is there for custom toolbars that should be available in all workbenches.

====Create a toolbar==== <!--T:79-->

<!--T:80-->
# Press the {{Button|New...}} button.
# Enter a name in the dialog box that opens.
# Press the {{Button|OK}} button.
# The new toolbar will appear in the panel on the right.

====Rename a toolbar==== <!--T:81-->

<!--T:82-->
# Select a toolbar in the panel on the right.
# Press the {{Button|Rename...}} button.
# Enter a new name in the dialog box that opens.
# Press the {{Button|OK}} button.

====Delete a toolbar==== <!--T:83-->

<!--T:84-->
# Select a toolbar in the panel on the right.
# Press the {{Button|Delete}} button.

====Disable a toolbar==== <!--T:85-->

<!--T:86-->
# Uncheck the checkbox in front of the toolbar name in the panel on the right.
# A disabled toolbar will be invisible in the FreeCAD interface.

====Add a command==== <!--T:87-->

<!--T:88-->
# At least one custom toolbar is required. See [[#Create_a_toolbar|Create a toolbar]].
# Select the correct toolbar in the panel on the right. If no toolbar is selected, the command will be added to the first toolbar in the list.
# Select a command category from the '''Category''' dropdown list. Macro commands that have been set up on the [[#Macros|Macros]] tab appear in the {{Value|Macros}} category.
# Select a command from the '''Commands''' panel, or select {{Value|<Separator>}} to add a separator (a line between two toolbar buttons).
#* Optionally drag the splitter to the right of the panel to resize it.
# Press {{Button|[[Image:Button_right.svg|16px]]}} button.

====Remove a command==== <!--T:89-->

<!--T:90-->
# If required, expand the toolbar in the panel on the right.
# Select a command.
# Press {{Button|[[Image:Button_left.svg|16px]]}} button.

====Change a command position==== <!--T:91-->

<!--T:92-->
# If required, expand the toolbar in the panel on the right.
# Select a command.
# Press the {{Button|[[Image:Button_up.svg|16px]]}} button or the {{Button|[[Image:Button_down.svg|16px]]}} button.
# Optionally repeat this until the command is in the correct position.

====Notes==== <!--T:132-->

<!--T:94-->
* Toolbars belonging to the current workbench are updated immediately, but after disabling/re-enabling a toolbar a workbench change is required (switch to a different workbench and then switch back).
* To update global toolbars a workbench change (if commands have been added or removed) or a restart (if the order of a toolbar has changed or a toolbar was renamed) is required.

</translate>{{Top}}<translate>

===Macros=== <!--T:96-->

</translate>
[[Image:Std_DlgCustomize_tab_Macros.png]]
<translate>
<!--T:97-->
{{Caption|The Macros tab}}

<!--T:133-->
On this tab macro commands can be set up. Once set up, they can be added to custom toolbars. Macros installed with the [[Image:Std_AddonMgr.svg|16px]] [[Std_AddonMgr|Addon Manager]] are set up automatically, and added to a {{Value|Global}} toolbar (see [[#Toolbars|Toolbars]]), if you confirm the '''Add button''' popup during the installation process.

<!--T:134-->
If you want to use a macro downloaded from a different source you will have to install it manually. See [[How_to_install_macros|How to install macros]] for more information. Note that FreeCAD uses a dedicated folder for macros and only macros in that folder can be set up. Use the [[Image:Std_DlgMacroExecute.svg|16px]] [[Std_DlgMacroExecute|Std DlgMacroExecute]] command to find this folder on your system.

====Add a macro command==== <!--T:100-->

<!--T:101-->
# In the '''Macro''' dropdown list select a macro.
# Enter a '''Menu text'''. This will be the name used to identify the macro command and will also appear in the toolbar if there is no icon.
# Optionally enter a '''Tool tip'''. This text will appear near the location of the mouse when you hover the toolbar icon.
# Optionally enter a '''Status text'''. This text will appear in the [[Status_bar|status bar]] when you hover the toolbar icon.
# Optionally enter the wiki page for the macro, if available, in the '''What's this''' input box. Enter the page name, not the full URL.
# Optionally enter a shortcut in the '''Accelerator''' input box. See [[#Keyboard|Keyboard]] for more information.
# To add an icon:
## Press the '''Pixmap''' {{Button|...}} button.
## The '''Choose Icon''' dialog box opens.
## If required press the {{Button|Icon folders...}} button to add an icon folder.
## Select an icon from the panel. The '''Choose Icon''' dialog box closes automatically.
# Press the {{Button|Add}} button.
# The macro command appears in the panel on the left.
# The macro command can now be selected on the [[#Toolbars|Toolbars]] tab.

====Remove a macro command==== <!--T:102-->

<!--T:103-->
# Select the macro command in the panel on the left.
# Press the {{Button|Remove}} button.

====Change a macro command==== <!--T:104-->

<!--T:105-->
# Double-click the macro command in the panel on the left.
# Make the required changes. Note that you cannot remove the icon, you can only replace it.
# Press the {{Button|Replace}} button.

</translate>{{Top}}<translate>


==Customization tabs== <!--T:3-->
===Spaceball Motion=== <!--T:107-->
The '''Commands''' tab lets you browse all available FreeCAD commands, organized by their category.


<!--T:4-->
<!--T:108-->
This tab is blank if no Spaceball is detected. See: [[3Dconnexion_input_devices|3Dconnexion input devices]].
In '''Keyboard''', you can see the keyboard shortcuts associated with every FreeCAD command, and if you want, modify or assign new shortcut to any command. This is where to come if you use a particular workbench often, and would like to speed up its use by using the keyboard.


</translate>{{Top}}<translate>
<!--T:5-->
The '''Toolbars''' and '''Toolbox bars''' tabs let you modify existing toolbars, or create your own custom toolbars.


===Spaceball Buttons=== <!--T:110-->
Under the tab '''Worksbenches''' ('''Workbenches''') the workbenches existing in FreeCAD are listed, on the left the currently passive, on the right the currently active workspaces. The status can be changed with the horizontal arrows.


<!--T:111-->
[[Image:UserdefSymbstrip.jpg]]
This tab is blank if no Spaceball is detected. See: [[3Dconnexion_input_devices|3Dconnexion input devices]].


</translate>{{Top}}<translate>
Under the tab '''Toolbars''' ('''Toolbars''') on the left are the same command categories as under the map '''Commands'''. After clicking on a category the corresponding commands appear, which can be copied to the right side. Before you do this, select an active workspace to which you want to add an individual toolbar. First select a name for this toolbar with '''New''' ('''New...''') before copying commands over to it. When this workspace is called later, this bar must be activated: '''View -> Toolbars'''.


==Themes== <!--T:116-->
Remark: If "Global" (instead of a workspace) is selected on the right, the added toolbar can be activated in each workspace.


<!--T:117-->
FreeCAD supports complete theming of the interface, via .qss stylesheets. The [https://doc.qt.io/qt-5/stylesheet-syntax.html qss format] is very similar to the [https://en.wikipedia.org/wiki/CSS css format] used in web pages, it basically adds methods to reference the different widgets and elements of the Qt interface. You can change the default theme (which simply takes the style defined by your desktop system) by selecting a '''style sheet''' in the [[Preferences_Editor#General|FreeCAD preferences]].


<!--T:6-->
<!--T:119-->
You can also create your own theme if you are not satisfied with the themes that are bundled with FreeCAD, for example by editing an [https://github.com/FreeCAD/FreeCAD/tree/master/src/Gui/Stylesheets existing style sheet]. Your new style must be placed in a specific folder for it to be found by FreeCAD:
The '''Macros''' tab lets you manage your saved [[Macros]].
* {{FileName|%APPDATA%/FreeCAD/Gui/Stylesheets}} (on Windows). The {{FileName|%APPDATA%}} folder can be retrieved by entering {{Incode|App.getUserAppDataDir()}} in the [[Python_console|Python console]].
* {{FileName|$HOME/.FreeCAD/Gui/Stylesheets}} (on Linux).
* {{FileName|$HOME/Library/Application Support/FreeCAD/Gui/Stylesheets}} (on macOS).


</translate>{{Top}}<translate>
<!--T:9-->
Create your Toolbars for your macro [[Customize_Toolbars|Customize Toolbars]]


<!--T:10-->
==Addons== <!--T:25-->
Since FreeCAD 0.16 a new tool is available that lets you manage your workbenches.


<!--T:11-->
<!--T:26-->
Addons from the [[Image:Std_AddonMgr.svg|16px]] [[Std_AddonMgr|Addon Manager]] offer yet another way to customize the user interface. Several [[Preference_Packs|Preference Packs]] to change the [[#Themes|theme]] are available.
[[Image:CustomizeWorkbenches.png]]


==Example== <!--T:12-->
<!--T:135-->
In the Workbenches category of the Addon Manager some addons by user triplus can be found:
For an example workflow lets suppose we want to have the "Measure Linear" tool also show up in a custom toolbar in the [[Draft Workbench]].
* https://github.com/triplus/CubeMenu (for {{VersionMinus|0.20}})
* in FreeCAD choose {{MenuCommand|Tools → Customize}} from the top menu
* https://github.com/triplus/Glass.
* select the "Toolbars" tab
* https://github.com/triplus/IconThemes
* on the left side choose "Part" in the pull down menu
* https://github.com/triplus/Launcher
* on the left side in the lower window scroll down to the "Measure Linear" entry and select it
* https://github.com/triplus/PieMenu
* on the right side choose "Draft" in the pull down menu
* https://github.com/triplus/RemBench
* click on {{button|New...}} to create a new toolbar and choose a name for it
* https://github.com/triplus/ShortCuts
* now select your destination toolbar in the right lower window (only needed if you have more than one toolbar)
* by clicking on the blue "Arrow right" (top icon in the middle row) you will add your selected entry to the selected toolbar


</translate>{{Top}}<translate>
===Remarks=== <!--T:13-->
When selecting "Global" in the pull down menu on the right side you will create a toolbar which will be visible in all workbenches.


<!--T:14-->
For adding an installed macro to a toolbar you must
* select "Macros" in the pull down menu on the left side
* have assigned menu text, icon (Pixmap) and so on using the {{MenuCommand|Tools → Customize → Macros}} menu


<!--T:7-->
<!--T:7-->
{{Docnav
{{docnav|Import Export Preference|Property editor}}
|[[Tutorials|Tutorials]]
|[[Preferences_Editor|Preferences Editor]]
}}


<!--T:8-->
{{Std Base}}
{{Interface}}
{{Userdocnavi}}
</translate>
</translate>
{{Std Base navi{{#translation:}}}}
{{Interface navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 06:51, 24 August 2023

Introduction

The FreeCAD interface is based on the modern Qt toolkit and has a state-of-the-art organization. Some aspects of the interface can be customized. You can, for example, add custom toolbars, with tools from several workbenches or tools defined in macros, and you can create you own keyboard shortcuts. But the menus and default toolbars that come with FreeCAD and its workbenches cannot be changed.

introduced in version 0.21: The Workbenches tab is no longer available. Its functionality has been moved to the Available Workbenches tab in the Workbenches section of the Preferences Editor.

The Customize dialog box

Usage

  1. The commands available in the Customize dialog box depend on the workbenches that have been loaded in the current FreeCAD session. So you should first load all workbenches whose commands you want to have access to.
  2. There are several ways to invoke the Std DlgCustomize command:
    • Select the Tools → Customize... option from the menu.
    • Right-click a toolbar area and choose Customize... from the context menu.
  3. The Customize dialog box opens. For more information see Options.
  4. The Help button starts the Std WhatsThis command.
  5. Press the Close button to close the dialog box.

Options

In the Customize dialog box the following tabs are available:

Keyboard

The Keyboard tab

On this tab custom keyboard shortcuts can be defined. Shortcuts for macro commands can be defined on the Macros tab.

Search

You can search for commands by entering at least 3 characters of their menu text or name in the search field. The search is case-insensitive.

It is also possible to search for shortcuts:

  • In the search field special keys in shortcuts must be entered as strings. For example to search for commands that use Ctrl in their shortcut enter ctrl (4 letters).
  • Add parenthesis to search for single character shortcuts, for example: (c).
  • Add a comma and space between the characters of multi-character shortcuts, for example: g, b, b.

Add a shortcut

  1. Select a command category from the Category dropdown list.
  2. Select a command from the Commands panel.
    • Optionally click the Command, Shortcut or Default column headings to reorder the list.
    • Optionally drag the splitter to the right of the panel to resize it.
  3. The Current shortcut box displays the current short cut, if available.
  4. Enter a new shortcut in the New shortcut input box. Shortcuts can be up to 4 inputs long. Each input is either a single character, a combination of one or more special keys or a combination of one or more special keys and a character. Use Backspace to correct mistakes.
  5. Other active commands (see Notes) that already use the shortcut will be listed in the Shortcut priority list.
  6. Press the Assign button to assign the new shortcut.
  7. If the Shortcut priority list contains more than one command: optionally change its order by selecting individual commands and pressing the Up button or the Down button. If active commands share the same shortcut, the shortcut will trigger the one that is highest in the list.

Remove a shortcut

  1. Select a command category from the Category dropdown list.
  2. Select a command from the Commands panel.
  3. Press the Clear button.

Restore a default shortcut

  1. Select a command category from the Category dropdown list.
  2. Select a command from the Commands panel.
  3. Press the Reset button.

Restore all default shortcuts

  1. Press the Reset All button.

Notes

  • Shortcuts only work for active commands. Active commands are commands that appear in the standard menu, or in the menu of the active workbench, or commands that appear in a visible toolbar.

Top

Toolbars

The Toolbars tab

On this tab custom toolbars can be created and modified.

Search

See Keyboard.

Select the workbench

  1. In the dropdown list on the right select the workbench whose custom toolbars you want to modify. The Global option is there for custom toolbars that should be available in all workbenches.

Create a toolbar

  1. Press the New... button.
  2. Enter a name in the dialog box that opens.
  3. Press the OK button.
  4. The new toolbar will appear in the panel on the right.

Rename a toolbar

  1. Select a toolbar in the panel on the right.
  2. Press the Rename... button.
  3. Enter a new name in the dialog box that opens.
  4. Press the OK button.

Delete a toolbar

  1. Select a toolbar in the panel on the right.
  2. Press the Delete button.

Disable a toolbar

  1. Uncheck the checkbox in front of the toolbar name in the panel on the right.
  2. A disabled toolbar will be invisible in the FreeCAD interface.

Add a command

  1. At least one custom toolbar is required. See Create a toolbar.
  2. Select the correct toolbar in the panel on the right. If no toolbar is selected, the command will be added to the first toolbar in the list.
  3. Select a command category from the Category dropdown list. Macro commands that have been set up on the Macros tab appear in the Macros category.
  4. Select a command from the Commands panel, or select <Separator> to add a separator (a line between two toolbar buttons).
    • Optionally drag the splitter to the right of the panel to resize it.
  5. Press button.

Remove a command

  1. If required, expand the toolbar in the panel on the right.
  2. Select a command.
  3. Press button.

Change a command position

  1. If required, expand the toolbar in the panel on the right.
  2. Select a command.
  3. Press the button or the button.
  4. Optionally repeat this until the command is in the correct position.

Notes

  • Toolbars belonging to the current workbench are updated immediately, but after disabling/re-enabling a toolbar a workbench change is required (switch to a different workbench and then switch back).
  • To update global toolbars a workbench change (if commands have been added or removed) or a restart (if the order of a toolbar has changed or a toolbar was renamed) is required.

Top

Macros

The Macros tab

On this tab macro commands can be set up. Once set up, they can be added to custom toolbars. Macros installed with the Addon Manager are set up automatically, and added to a Global toolbar (see Toolbars), if you confirm the Add button popup during the installation process.

If you want to use a macro downloaded from a different source you will have to install it manually. See How to install macros for more information. Note that FreeCAD uses a dedicated folder for macros and only macros in that folder can be set up. Use the Std DlgMacroExecute command to find this folder on your system.

Add a macro command

  1. In the Macro dropdown list select a macro.
  2. Enter a Menu text. This will be the name used to identify the macro command and will also appear in the toolbar if there is no icon.
  3. Optionally enter a Tool tip. This text will appear near the location of the mouse when you hover the toolbar icon.
  4. Optionally enter a Status text. This text will appear in the status bar when you hover the toolbar icon.
  5. Optionally enter the wiki page for the macro, if available, in the What's this input box. Enter the page name, not the full URL.
  6. Optionally enter a shortcut in the Accelerator input box. See Keyboard for more information.
  7. To add an icon:
    1. Press the Pixmap ... button.
    2. The Choose Icon dialog box opens.
    3. If required press the Icon folders... button to add an icon folder.
    4. Select an icon from the panel. The Choose Icon dialog box closes automatically.
  8. Press the Add button.
  9. The macro command appears in the panel on the left.
  10. The macro command can now be selected on the Toolbars tab.

Remove a macro command

  1. Select the macro command in the panel on the left.
  2. Press the Remove button.

Change a macro command

  1. Double-click the macro command in the panel on the left.
  2. Make the required changes. Note that you cannot remove the icon, you can only replace it.
  3. Press the Replace button.

Top

Spaceball Motion

This tab is blank if no Spaceball is detected. See: 3Dconnexion input devices.

Top

Spaceball Buttons

This tab is blank if no Spaceball is detected. See: 3Dconnexion input devices.

Top

Themes

FreeCAD supports complete theming of the interface, via .qss stylesheets. The qss format is very similar to the css format used in web pages, it basically adds methods to reference the different widgets and elements of the Qt interface. You can change the default theme (which simply takes the style defined by your desktop system) by selecting a style sheet in the FreeCAD preferences.

You can also create your own theme if you are not satisfied with the themes that are bundled with FreeCAD, for example by editing an existing style sheet. Your new style must be placed in a specific folder for it to be found by FreeCAD:

  • %APPDATA%/FreeCAD/Gui/Stylesheets (on Windows). The %APPDATA% folder can be retrieved by entering App.getUserAppDataDir() in the Python console.
  • $HOME/.FreeCAD/Gui/Stylesheets (on Linux).
  • $HOME/Library/Application Support/FreeCAD/Gui/Stylesheets (on macOS).

Top

Addons

Addons from the Addon Manager offer yet another way to customize the user interface. Several Preference Packs to change the theme are available.

In the Workbenches category of the Addon Manager some addons by user triplus can be found:

Top