Commit 2afe7cac authored by Aleksi Suomalainen's avatar Aleksi Suomalainen Committed by GitHub

Merge pull request #30 from neochapay/master

Update buttonRow component
parents da72638a 8b5fc701
*.pro.user *.pro.user
*.pyc *.pyc
.directory
*.o
*.so
moc_*
qrc_*
examples/touch/touch_nemo
Makefile
installroot/
RPMS/
\ No newline at end of file
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
import QtQuick 2.1 import QtQuick 2.1
import QtQuick.Controls 1.0 import QtQuick.Controls 1.0
import QtQuick.Controls.Styles.Nemo 1.0
Button { Button {
id: butt id: butt
...@@ -42,6 +44,8 @@ Button { ...@@ -42,6 +44,8 @@ Button {
pressY = mouse.y pressY = mouse.y
} }
} }
style: ButtonStyle{}
} }
...@@ -34,7 +34,7 @@ import QtQuick.Controls.Styles.Nemo 1.0 ...@@ -34,7 +34,7 @@ import QtQuick.Controls.Styles.Nemo 1.0
Rectangle { Rectangle {
id: main id: main
width: 440 width: childrenRect.width
color: "#313131" color: "#313131"
height: 40 height: 40
property ListModel model: ListModel {} property ListModel model: ListModel {}
...@@ -55,7 +55,9 @@ Rectangle { ...@@ -55,7 +55,9 @@ Rectangle {
Rectangle { Rectangle {
property bool active: false property bool active: false
height: 50 height: 50
width: 20*name.length y: -5
width: text.width+(text.width/name.length*2)
color: "transparent" color: "transparent"
MouseArea { MouseArea {
enabled: main.enabled enabled: main.enabled
...@@ -77,6 +79,10 @@ Rectangle { ...@@ -77,6 +79,10 @@ Rectangle {
Label { Label {
id: text id: text
text: name text: name
anchors.horizontalCenter: parent.horizontalCenter
Component.onCompleted: {
width = paintedWidth
}
} }
} }
} }
......
import QtQuick 2.1 import QtQuick 2.1
import QtQuick.Controls 1.0 import QtQuick.Controls 1.0
import QtQuick.Controls.Styles.Nemo 1.0
CheckBox { CheckBox {
style: CheckBoxStyle{}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment