#10: Karabo Scene¶
A number of features have been added in Karabo 2.8.0 to help ease scene development:
Scene Grid
Selection Indicators
Snap to Grid
Scene Grid¶
The scene Design Mode is now displayed with grid. This can be used as guide for aligning scene items. It has a preset dimension of 10 px x 10 px.
![Scene grid](_images/scene_grid.png)
Scene grid as shown in the Design Mode¶
Selection Indicators¶
Hovering an item¶
Hovering the mouse cursor on the scene Design Mode will now show an indicator of the current hovered item, which is a blue rectangle that denotes the item boundaries. This aims to make the selection of scene items easier.
![Hovering the Icon Command widgets](_images/scene_hover.gif)
Hovering the Icon Command widgets¶
Note that this respects the object arrangement, which determines which are in the front or the back. This arrangement can be modified by the “Bring selected items to front” and “Bring selected items to back” tool buttons.
![Hovering stacked widgets will indicate the widget at the front](_images/scene_hover_front.gif)
The two icon command widgets are stacked at some area, and hovering on that point will indicate the widget at the front, which is the widget with the “Play” icon.¶
Selecting a scene item¶
Selecting a single item can be done by clicking the desired object. The hover rectangle will turn into a selection rectangle, which is displayed as a dashed rectangle with eight handles around it. The selected item can be moved by hovering the mouse inside the selection and dragging to the desired location. It can also be resized by dragging the edge of the selection rectangle to the desired size.
![Selecting, moving, and resizing an Icon Command widget](_images/scene_select_single.gif)
Selecting, moving, and resizing a widget¶
Selecting multiple items¶
Selecting multiple objects can be done by dragging an area which contains the desired items. These items can be moved together by hovering the mouse inside the selection and dragging to the desired location. On the other hand, multiple items cannot be resized together, and is indicated by the grayed out handles of the selection rectangle.
![Selecting and moving multiple widgets at the same time](_images/scene_select_multiple.gif)
Selecting and moving multiple widgets at the same time¶
Snap to Grid¶
Scene objects also now snap to the nearest grid location when they are moved or resized via dragging.
![Moving and resizing a widget snaps to the grid](_images/scene_snap_grid.gif)
Moving and resizing a widget snaps to the grid¶
This behavior is enabled by default, but it can be disabled and re-enabled with the “Snap to Grid” tool button.
![Toggling the Snap to Grid behavior](_images/scene_snap_toggle.gif)
Toggling the Snap to Grid behavior¶