Commit feaca83a authored by Sebastian Gottfried's avatar Sebastian Gottfried
Browse files

Qt5: Port TrainingScreenToolbar.qml

parent 4d7e7643
/*
* Copyright 2012 Sebastian Gottfried <sebastiangottfried@web.de>
* Copyright 2015 Sebastian Gottfried <sebastiangottfried@web.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
......@@ -15,9 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 1.1
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.plasma.components 0.1 as PlasmaComponents
import QtQuick 2.4
import QtQuick.Controls 1.3
import org.kde.kquickcontrolsaddons 2.0
Rectangle {
id: item
......@@ -31,7 +32,7 @@ Rectangle {
function showMessage(msg, iconSource) {
item.state = "hidden";
label.text = msg
icon.source = iconSource || ""
icon.icon = iconSource || ""
item.state = "normal"
}
......@@ -62,16 +63,14 @@ Rectangle {
width: icon.width + spacing + label.width
spacing: icon.valid? 3: 0
PlasmaCore.IconItem {
QIconItem {
id: icon
width: height
height: valid? label.height: 0
}
PlasmaComponents.Label {
Label {
id: label
height: paintedHeight
smooth: true
color: "#000000"
}
}
......
......@@ -127,7 +127,7 @@ FocusScope {
spacing: 0
BorderImage {
Layout.fillWidth: true
Layout.preferredHeight: 29
Layout.preferredHeight: 41
border {
top: 1
bottom: 1
......@@ -136,15 +136,15 @@ FocusScope {
source: utils.findImage("trainingscreen-toolbar.png")
horizontalTileMode: BorderImage.Repeat
verticalTileMode: BorderImage.Repeat
/*
TrainingScreenToolbar {
id: toolbar
anchors.fill: parent
trainingStarted: screen.trainingStarted
trainingFinished: screen.trainingFinished
stats: stats
menuOverlayItem: menuOverlay
}
*/
}
BorderImage {
......
/*
* Copyright 2012 Sebastian Gottfried <sebastiangottfried@web.de>
* Copyright 2015 Sebastian Gottfried <sebastiangottfried@web.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
......@@ -15,9 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 1.1
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.plasma.components 0.1 as PlasmaComponents
import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Layouts 1.1
import ktouch 1.0
Item {
......@@ -52,12 +53,6 @@ Item {
onTimeIsRunningChanged: setMessage()
}
PlasmaCore.FrameSvgItem {
anchors.fill: parent
imagePath: findImage("trainingscreen.svgz")
prefix: "toolbar"
}
Row {
anchors {
verticalCenter: parent.verticalCenter
......@@ -71,9 +66,9 @@ Item {
spacing: 3
height: menuButton.height
PlasmaComponents.ToolButton {
ToolButton {
id: menuButton
iconSource: "go-home"
iconName: "go-home"
onClicked: item.menuOverlayItem.show()
}
......
Supports Markdown
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