From 4ee2ff0688440213d0788083e9b1a3248fc7f72c Mon Sep 17 00:00:00 2001 From: SeeLook <seelook@gmail.com> Date: Sun, 5 Jan 2020 07:08:58 +0100 Subject: [PATCH] [Android] Alternate TipRect there Use border image instead shadow effect - due to animations --- src/nootka.qrc | 1 + src/qml/+android/shared/TipRect.qml | 35 +++++++++++++++++++++++++++++ src/qml/score/DelControl.qml | 3 ++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 src/qml/+android/shared/TipRect.qml diff --git a/src/nootka.qrc b/src/nootka.qrc index 972b85514..8207a9179 100644 --- a/src/nootka.qrc +++ b/src/nootka.qrc @@ -23,6 +23,7 @@ <file alias="InstrumentSelector.qml">qml/shared/InstrumentSelector.qml</file> <file alias="RhythmSelector.qml">qml/shared/RhythmSelector.qml</file> <file alias="TipRect.qml">qml/shared/TipRect.qml</file> + <file alias="+android/TipRect.qml">qml/+android/shared/TipRect.qml</file> <file alias="TcheckBox.qml">qml/shared/TcheckBox.qml</file> <file alias="TradioButton.qml">qml/shared/TradioButton.qml</file> <file alias="Transposition.qml">qml/shared/Transposition.qml</file> diff --git a/src/qml/+android/shared/TipRect.qml b/src/qml/+android/shared/TipRect.qml new file mode 100644 index 000000000..06b0d18ff --- /dev/null +++ b/src/qml/+android/shared/TipRect.qml @@ -0,0 +1,35 @@ +/** This file is part of Nootka (http://nootka.sf.net) * + * Copyright (C) 2017-2018 by Tomasz Bojczuk (seelook@gmail.com) * + * on the terms of GNU GPLv3 license (http://www.gnu.org/licenses) */ + +import QtQuick 2.9 +import QtGraphicalEffects 1.0 + + +Item { + property alias color: bg.color + property alias radius: bg.radius + property bool rised: true + property real shadowRadius: 0 + property color shadowColor: "transparent" + property alias border: bg.border + property int horizontalOffset: 0 + property int verticalOffset: 0 + + BorderImage { + x: -6; y: -6; width: parent.width + 12; height: parent.height + 12 + border { left: 12; right: 12; bottom: 12; top: 12 } + horizontalTileMode: BorderImage.Stretch + verticalTileMode: BorderImage.Stretch + source: Noo.pix("tipbg") + + Rectangle { + id: bg + x: 6; y: 6; width: parent.width - 12; height: parent.height - 12 + color: activPal.base + radius: 6 + clip: true + } + + } +} diff --git a/src/qml/score/DelControl.qml b/src/qml/score/DelControl.qml index e5a1fd283..1d280a964 100644 --- a/src/qml/score/DelControl.qml +++ b/src/qml/score/DelControl.qml @@ -50,8 +50,9 @@ ControlBase { TipRect { x: activeItem ? -activeItem.width * score.scale - width * 1.3: 0 - width: childrenRect.width; height: childrenRect.height + width: controlButt.width; height: controlButt.height ControlButton { + id: controlButt factor: delControl.factor font { family: "Nootka"; pixelSize: factor * 3 } text: "n" -- GitLab