We have moved to https://dokuwiki.librecad.org/
Lots of content was already moved to the new wiki, but there is still work to do. If you want to contribute, please register a new account at https://dokuwiki.librecad.org/
This wiki will be kept for a while to keep search engine results valid. Moved sites may be deleted here in future.
User Interface
Contents
Moving and resizing widgets
Toolbars and dock widgets can be dragged and dropped to the
top, bottom, left or right of the main window.
Drag the left edge of a horizontal toolbar,
or the top edge of a vertical toolbar.
Drag the title bar of a dock widget.
Widgets can also be resized by dragging their edges.
Dock Areas
Dock widgets (e.g. command line or layer list)
can be moved and docked at the top, bottom, left or right.
You can now show and hide all the dock widgets
in a specific dock area. You can also toggle
the visibility of all floating dock widgets
(those which are not currently docked).
Custom Widgets
Toolbar Creator
To create a new toolbar:
- input the name
- double-click on an action to add it
- drag and drop to arrange actions
- press create
To edit an existing toolbar:
- select the toolbar from the drop down menu
- double-click to remove actions
- drag and drop to arrange actions
- press create
To delete an existing toolbar:
- select the toolbar from the drop down menu
- press destroy
Menu Creator
This widget creates menus that can be triggered by
right-click, double-click, Ctrl+right-click and Shift+right-click
in the drawing area.
To create a new menu:
- input the name
- double-click on an action to add it
- drag and drop to arrange actions
- press create
To edit an existing menu:
- select the menu from the drop down menu
- double-click to remove actions
- drag and drop to arrange actions
- press update
To assign a menu:
- press assign
- select the desired activator(s)
- press save
To remove assignment:
- press assign
- deselect the undesired activator(s)
- press save
To delete an existing menu:
- select the menu from the drop down menu
- press destroy
Command-line
Since 2.1.0:
- Command-line output is automatically copied when highlighted.
- Keycode mode was reintroduced as a toggle in Application Preferences -> Defaults (requires restart)
Keycode mode automatically accepts 2 character commands. In other words, you don't need to press enter.
Since 2.2.0:
- A new button with a drop-down menu has been added to the command-line
- Keycode mode was rewritten and the toggle is now accessed by the new command-line button.
Toggling keycode mode no longer requires restarting LibreCAD. If a 2 character command is not recognized, you can continue with a longer command.
- Spacebar now accepts commands like Enter.
- The 'cal' command now toggles a calculator mode.
- Multi-command input can be separated by semicolons: ci;0,0;10
- Command files (command input separated by newlines) can be loaded from the new command-line button
- Multi-command input can be assigned to a variable; values can also contain variables (they are read recursively)
a=ci;0,0;10 b=ci;10,0;10 c=\a;\b;kill \c
- A variable file can be set to load at startup via Application Preferences -> Paths -> Variable File
- Relative coordinates such as @10,20 can also be written as 10..20 (allowing for keypad input)
Pen Wizard
New in 2.2.0 (it is not connected with the pen toolbar)
This widget allows you to:
- maintain a list of favorite colors
- select a color via the drop-down list or the button on its right
- add the color by pressing the button with the tooltip "Add to favorites"
- drag-and-drop colors to arrange them
- change the active pen color
- double-click a favorite
- change the color of all selected objects
- right-click a favorite and choose "Apply to selected"
- select all objects of a specific color
- right-click a favorite and choose "Select objects"
Appearance
Styles
In “Widget Options” you can choose a style;
the style list is dependent on your operating system and the version of Qt used to build LibreCAD.
For example on Windows 7 and using Qt 5 the list is: ("Windows", "WindowsXP", "WindowsVista", "Fusion")
http://blog.qt.io/blog/2012/10/30/cleaning-up-styles-in-qt5-and-adding-fusion/
Style Sheets
You can modify any style with a “Style Sheet”. http://doc.qt.io/qt-5/stylesheet.html
It is recommended that you use the “Fusion” style (Qt 5) as a base, because it is intended to be a cross platform style.
After you set a style sheet you can edit it & save and then switch back to LibreCAD and use “Reload Style Sheet” (Ctrl+T).
Tips:
- Play around with the example below for an easy start.
- Look at the examples for “Color” and “Gradient” in the list of property types.
- Check out the widget specific examples at: http://doc.qt.io/qt-5/stylesheet-examples.html
You can ask for help on the LibreCAD forum or any Qt forum.
Here is an editor with qss syntax highlighting and a preview area: https://sourceforge.net/projects/qsseditor/
Examples
A style sheet can be as simple as: QMenu { font-size: 16px; }
Save this as alpha.qss or alpha.txt, and then choose it in “Widget Options”:
/* alpha.qss v.01 a modification of the Fusion style */ /* Layer List */ QTableView { selection-background-color: #ccffcc; selection-color: Blue; font-size: 16px; font-family: "Arial"; } QMenu { padding: 4px; font-size: 16px; } QMenu::item { padding: 2px 25px 2px 20px; border: 1px solid transparent; /* reserve space for selection border */ } QMenu::item:selected { border-color: darkblue; background: rgba(240, 255, 255, 150); } QMenu::icon:selected { border-color: darkblue; background: rgba(255, 255, 255, 255); } QToolBar { background-color: rgb(230, 230, 230); spacing: 3px; padding: 4px; } QToolButton { background-color: #eeeeee; border-style: outset; border-width: 2px; border-radius: 2px; border-color: beige; font: 12px; padding: 2px; } QToolButton:checked { border-color: grey; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #dadbde, stop: 1 #f6f7fa); } QToolButton:hover { border-color: grey; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #dadbde, stop: 1 #f6f7fa); } QStatusBar { background-color: azure;} QMenuBar { background-color: #fefefe; } QTextEdit { background-color: honeydew; } QToolTip { background-color: white; }