David 10 years ago
parent
commit
805be0a50f
1 changed files with 26 additions and 6 deletions
  1. 26 6
      main.qml

+ 26 - 6
main.qml

@@ -7,8 +7,8 @@ import "./simplify.js" as Simplify
 ApplicationWindow {
     id: aw
     visible: true
-    width: 800
-    height: 480
+    width: 1280
+    height: 720
     color: "#fffffe"
 
     WebSocket {
@@ -196,7 +196,7 @@ ApplicationWindow {
                                           canvas.height)
                         }
                         ctx.lineCap = 'square'
-                        ctx.lineWidth = 3
+                        ctx.lineWidth = 4
                         ctx.strokeStyle = "#000000"
 
 
@@ -281,6 +281,7 @@ ApplicationWindow {
 
                 }
                 Column {
+                    id: column1
                     width: parent.width
                     height: parent.height/2
 
@@ -289,7 +290,14 @@ ApplicationWindow {
                         height: 70
                         id: color1
                         text: qsTr("Rojo")
-                        onClicked: canvas.curColor="#ff0000"
+                        checked: true
+                        checkable: true
+                        onClicked: {
+                            color2.checked=false
+                            color3.checked=false
+                            checked=true
+                            canvas.curColor="#ff0000"
+                        }
                     }
 
                     Button {
@@ -297,7 +305,13 @@ ApplicationWindow {
                         width: parent.width
                         id: color2
                         text: qsTr("Verde")
-                        onClicked: canvas.curColor="#00ff00"
+                        checkable: true
+                        onClicked: {
+                            color1.checked=false
+                            color3.checked=false
+                            checked=true
+                            canvas.curColor="#00ff00"
+                        }
                     }
 
                     Button {
@@ -305,7 +319,13 @@ ApplicationWindow {
                         width: parent.width
                         id: color3
                         text: qsTr("Azul")
-                        onClicked: canvas.curColor="#0000ff"
+                        checkable: true
+                        onClicked: {
+                            color1.checked=false
+                            color2.checked=false
+                            checked=true
+                            canvas.curColor="#0000ff"
+                        }
                     }
 
                 }