[vlmc-devel] Add PropertyButton.qml
Yikai Lu
git at videolan.org
Mon Jul 18 15:39:58 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Mon Jul 18 22:11:53 2016 +0900| [1cabad61b8aed766c24e4777faad03f6cb7a1bf2] | committer: Yikai Lu
Add PropertyButton.qml
> https://code.videolan.org/videolan/vlmc/commit/1cabad61b8aed766c24e4777faad03f6cb7a1bf2
---
src/Gui/timeline/PropertyButton.qml | 27 +++++++++++++++++++++++++++
src/Gui/timeline/resources-timeline.qrc | 1 +
2 files changed, 28 insertions(+)
diff --git a/src/Gui/timeline/PropertyButton.qml b/src/Gui/timeline/PropertyButton.qml
new file mode 100644
index 0000000..d7fd85e
--- /dev/null
+++ b/src/Gui/timeline/PropertyButton.qml
@@ -0,0 +1,27 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 20
+ height: 20
+ color: mouseArea.containsMouse ? "#44FFFFFF" : selected ? "#AA000000" : "transparent"
+ radius: 2
+
+ property alias text: _text.text
+ property bool selected: false
+
+ Text {
+ id: _text
+ color: "#EEEEEE"
+ anchors.centerIn: parent
+ }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ hoverEnabled: true
+
+ onPressed: {
+ selected = !selected;
+ }
+ }
+}
diff --git a/src/Gui/timeline/resources-timeline.qrc b/src/Gui/timeline/resources-timeline.qrc
index 2f79544..70470fc 100644
--- a/src/Gui/timeline/resources-timeline.qrc
+++ b/src/Gui/timeline/resources-timeline.qrc
@@ -7,5 +7,6 @@
<file>Cursor.qml</file>
<file>Clip.qml</file>
<file>ClipContextMenu.qml</file>
+ <file>PropertyButton.qml</file>
</qresource>
</RCC>
More information about the Vlmc-devel
mailing list