[ui] add "Controls" module to centralize common UI components

* add FloatingPane control + use it in Viewer3D
This commit is contained in:
Yann Lanthony 2018-03-20 02:26:06 +01:00
parent 6ae591e981
commit d4c0a4975a
3 changed files with 30 additions and 8 deletions

View file

@ -0,0 +1,17 @@
import QtQuick 2.9
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
/**
* FloatingPane provides a Pane with a slightly transparent default background
* using palette.base as color. Useful to create floating toolbar/overlays.
*/
Pane {
id: root
property bool opaque: false
padding: 6
anchors.margins: 2
background: Rectangle { color: root.palette.base; opacity: opaque ? 1.0 : 0.7; radius: 1 }
}

View file

@ -0,0 +1,3 @@
module Controls
FloatingPane 1.0 FloatingPane.qml