aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authormarcin <z.krzysztoff7@gmail.com>2014-07-19 16:07:40 +0200
committermarcin <z.krzysztoff7@gmail.com>2014-07-19 16:07:40 +0200
commit1eb08fe26aa99efbb92487f210bbcde6f7b2ce12 (patch)
tree41e0300f780e82fc48a88cd5c172ff0eeb3a6a1c /components
parentce7e7fd38ac96b80f560e1a820e09b1c69d791c6 (diff)
downloadmonzero-gui-1eb08fe26aa99efbb92487f210bbcde6f7b2ce12.tar.gz
monzero-gui-1eb08fe26aa99efbb92487f210bbcde6f7b2ce12.tar.xz
monzero-gui-1eb08fe26aa99efbb92487f210bbcde6f7b2ce12.zip
simplified window v1
Diffstat (limited to 'components')
-rw-r--r--components/Input.qml1
-rw-r--r--components/LineEdit.qml2
-rw-r--r--components/StandardButton.qml4
-rw-r--r--components/TitleBar.qml39
4 files changed, 38 insertions, 8 deletions
diff --git a/components/Input.qml b/components/Input.qml
index 98acf532..f71007f6 100644
--- a/components/Input.qml
+++ b/components/Input.qml
@@ -4,7 +4,6 @@ import QtQuick 2.2
TextField {
font.family: "Arial"
- font.pixelSize: 18
style: TextFieldStyle {
textColor: "#3F3F3F"
diff --git a/components/LineEdit.qml b/components/LineEdit.qml
index d0bec01b..a342ab8d 100644
--- a/components/LineEdit.qml
+++ b/components/LineEdit.qml
@@ -3,6 +3,7 @@ import QtQuick 2.0
Item {
property alias placeholderText: input.placeholderText
property alias text: input.text
+ property int fontSize: 18
height: 37
Rectangle {
@@ -24,5 +25,6 @@ Item {
anchors.fill: parent
anchors.leftMargin: 4
anchors.rightMargin: 4
+ font.pixelSize: parent.fontSize
}
}
diff --git a/components/StandardButton.qml b/components/StandardButton.qml
index b7e452f5..9a164b8b 100644
--- a/components/StandardButton.qml
+++ b/components/StandardButton.qml
@@ -1,6 +1,7 @@
import QtQuick 2.0
Item {
+ id: button
height: 37
property string shadowPressedColor
property string shadowReleasedColor
@@ -8,6 +9,7 @@ Item {
property string releasedColor
property string icon: ""
property string textColor: "#FFFFFF"
+ property int fontSize: 12
property alias text: label.text
signal clicked()
@@ -39,7 +41,7 @@ Item {
font.family: "Arial"
font.bold: true
font.letterSpacing: -1
- font.pixelSize: 12
+ font.pixelSize: button.fontSize
color: parent.textColor
visible: parent.icon === ""
}
diff --git a/components/TitleBar.qml b/components/TitleBar.qml
index 82d9610e..e18d1a86 100644
--- a/components/TitleBar.qml
+++ b/components/TitleBar.qml
@@ -8,6 +8,8 @@ Rectangle {
y: -height
property int mouseX: 0
property int mouseY: 0
+ property alias maximizeButtonVisible: maximizeButton.visible
+ signal goToBasicVersion(bool yes)
Text {
anchors.centerIn: parent
@@ -21,6 +23,32 @@ Rectangle {
Behavior on y {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
+
+ Rectangle {
+ id: goToBasicVersionButton
+ property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width
+ property bool checked: false
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ width: height
+ color: containsMouse || checked ? "#FFE00A" : "#000000"
+
+ Image {
+ anchors.centerIn: parent
+ rotation: parent.checked ? 180 : 0
+ source: parent.containsMouse || parent.checked ? "../images/goToBasicVersionHovered.png" :
+ "../images/gotoBasicVersion.png"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ parent.checked = !parent.checked
+ titleBar.goToBasicVersion(parent.checked)
+ }
+ }
+ }
Row {
id: row
@@ -69,17 +97,17 @@ Rectangle {
}
Rectangle {
+ id: maximizeButton
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width
anchors.top: parent.top
anchors.bottom: parent.bottom
width: height
color: containsMouse ? "#FF6C3C" : "#000000"
- property bool checked: false
Image {
anchors.centerIn: parent
- source: parent.checked ? "../images/backToWindowIcon.png" :
- "../images/maximizeIcon.png"
+ source: appWindow.visibility === Window.FullScreen ? "../images/backToWindowIcon.png" :
+ "../images/maximizeIcon.png"
}
@@ -87,9 +115,8 @@ Rectangle {
id: maximizeArea
anchors.fill: parent
onClicked: {
- parent.checked = !parent.checked
- appWindow.visibility = parent.checked ? Window.FullScreen :
- Window.Windowed
+ appWindow.visibility = appWindow.visibility !== Window.FullScreen ? Window.FullScreen :
+ Window.Windowed
}
}
}