Warning, /education/gcompris/src/activities/programmingMaze/HeaderArea.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - HeaderArea.qml 0002 * 0003 * SPDX-FileCopyrightText: 2018 Aman Kumar Gupta <gupta2140@gmail.com> 0004 * 0005 * Authors: 0006 * Aman Kumar Gupta <gupta2140@gmail.com> 0007 * Timothée Giet <animtim@gcompris.net> (Layout and graphics rework) 0008 * 0009 * SPDX-License-Identifier: GPL-3.0-or-later 0010 */ 0011 import QtQuick 2.12 0012 import GCompris 1.0 0013 import "../../core" 0014 0015 Rectangle { 0016 id: header 0017 width: background.width * 0.4 0018 height: background.height / 10 0019 radius: 8 * ApplicationInfo.ratio 0020 border.width: 2 * ApplicationInfo.ratio 0021 border.color: "#a6d8ea" 0022 color: "#ffffff" 0023 opacity: headerOpacity 0024 0025 property real headerOpacity 0026 property string headerText 0027 property string headerIcon: "" 0028 0029 signal clicked 0030 0031 GCText { 0032 id: textItem 0033 horizontalAlignment: Text.AlignHCenter 0034 verticalAlignment: Text.AlignVCenter 0035 anchors.centerIn: parent 0036 anchors.horizontalCenterOffset: -iconImage.width * 0.5 0037 width: parent.width - iconImage.width 0038 height: parent.height 0039 fontSizeMode: Font.DemiBold 0040 minimumPointSize: 7 0041 fontSize: mediumSize 0042 wrapMode: Text.WordWrap 0043 color: "#2e2f2f" 0044 text: header.headerText 0045 } 0046 0047 Image { 0048 id: iconImage 0049 anchors.centerIn: parent 0050 anchors.horizontalCenterOffset: textItem.contentWidth * 0.5 0051 height: header.headerIcon === "" ? 0 : header.height * 0.6 0052 width: height 0053 sourceSize.height: height 0054 source: header.headerIcon === "" ? "qrc:/gcompris/src/core/resource/empty.svg" : 0055 "qrc:/gcompris/src/activities/programmingMaze/resource/" + header.headerIcon + ".svg" 0056 } 0057 0058 MouseArea { 0059 anchors.fill: parent 0060 onClicked: header.clicked() 0061 } 0062 }