1
mirror of https://github.com/monero-project/monero-gui synced 2024-11-28 09:31:37 +01:00

misc: remove unused components

This commit is contained in:
thotbot 2019-12-21 15:13:23 +00:00
parent 500c7ec82e
commit 3f4f6f01dc
5 changed files with 0 additions and 322 deletions

View File

@ -1,218 +0,0 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.2
import "." as MoneroComponents
import "effects/" as MoneroEffects
import "../js/Windows.js" as Windows
import "../js/Utils.js" as Utils
Window {
id: root
modality: Qt.ApplicationModal
color: "black"
flags: Windows.flags
property alias text: dialogContent.text
property alias content: root.text
property alias textArea: dialogContent
property var icon
// same signals as Dialog has
signal accepted()
signal rejected()
onClosing: {
}
function open() {
show();
}
// TODO: implement without hardcoding sizes
width: 480
height: 280
// background
MoneroEffects.GradientBackground {
anchors.fill: parent
fallBackColor: MoneroComponents.Style.middlePanelBackgroundColor
initialStartColor: MoneroComponents.Style.middlePanelBackgroundGradientStart
initialStopColor: MoneroComponents.Style.middlePanelBackgroundGradientStop
blackColorStart: MoneroComponents.Style._b_middlePanelBackgroundGradientStart
blackColorStop: MoneroComponents.Style._b_middlePanelBackgroundGradientStop
whiteColorStart: MoneroComponents.Style._w_middlePanelBackgroundGradientStart
whiteColorStop: MoneroComponents.Style._w_middlePanelBackgroundGradientStop
start: Qt.point(0, 0)
end: Qt.point(height, width)
}
// Make window draggable
MouseArea {
anchors.fill: parent
property point lastMousePos: Qt.point(0, 0)
onPressed: { lastMousePos = Qt.point(mouseX, mouseY); }
onMouseXChanged: root.x += (mouseX - lastMousePos.x)
onMouseYChanged: root.y += (mouseY - lastMousePos.y)
}
ColumnLayout {
id: mainLayout
anchors.fill: parent
anchors.topMargin: 20
anchors.margins: 35
spacing: 20
Item {
Layout.fillHeight: true
Layout.fillWidth: true
Rectangle {
anchors.fill: parent
color: "transparent"
border.color: MoneroComponents.Style.inputBorderColorActive
border.width: 1
radius: 4
}
Flickable {
id: flickable
anchors.fill: parent
TextArea.flickable: TextArea {
id : dialogContent
textFormat: TextEdit.RichText
selectByMouse: true
selectByKeyboard: true
font.family: MoneroComponents.Style.defaultFontColor
font.pixelSize: 14
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
wrapMode: TextEdit.Wrap
readOnly: true
function logCommand(msg){
msg = log_color(msg, MoneroComponents.Style.blackTheme ? "lime" : "#009100");
textArea.append(msg);
}
function logMessage(msg){
msg = msg.trim();
var color = MoneroComponents.Style.defaultFontColor;
if(msg.toLowerCase().indexOf('error') >= 0){
color = MoneroComponents.Style.errorColor;
} else if (msg.toLowerCase().indexOf('warning') >= 0){
color = MoneroComponents.Style.warningColor;
}
// format multi-lines
if(msg.split("\n").length >= 2){
msg = msg.split("\n").join('<br>');
}
log(msg, color);
}
function log_color(msg, color){
return "<span style='color: " + color + ";' >" + msg + "</span>";
}
function log(msg, color){
var timestamp = Utils.formatDate(new Date(), {
weekday: undefined,
month: "numeric",
timeZoneName: undefined
});
var _timestamp = log_color("[" + timestamp + "]", "#FFFFFF");
var _msg = log_color(msg, color);
textArea.append(_timestamp + " " + _msg);
// scroll to bottom
//if(flickable.contentHeight > content.height){
// flickable.contentY = flickable.contentHeight + 20;
//}
}
}
ScrollBar.vertical: ScrollBar {}
}
}
RowLayout {
Layout.fillWidth: true
MoneroComponents.LineEdit {
id: sendCommandText
Layout.fillWidth: true
placeholderText: qsTr("command + enter (e.g help)") + translationManager.emptyString
onAccepted: {
if(text.length > 0) {
textArea.logCommand(">>> " + text)
daemonManager.sendCommandAsync(text.split(" "), currentWallet.nettype, function(result) {
if (!result) {
appWindow.showStatusMessage(qsTr("Failed to send command"), 3);
}
});
}
text = ""
}
}
}
}
// window borders
Rectangle {
anchors.bottom: parent.bottom
anchors.top: parent.top
anchors.left: parent.left
width:1
color: "#2F2F2F"
z: 2
}
Rectangle {
anchors.bottom: parent.bottom
anchors.top: parent.top
anchors.right: parent.right
width:1
color: "#2F2F2F"
z: 2
}
Rectangle {
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.left: parent.left
height:1
color: "#2F2F2F"
z: 2
}
}

View File

@ -1,89 +0,0 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import "." as MoneroComponents
Item {
id: scrollItem
property var flickable
property alias scrollColor: scroll.color
property alias scrollWidth: scroll.width
property alias scrollRadius: scroll.radius
width: 15
z: 1
function flickableContentYChanged() {
if(flickable === undefined)
return
var t = flickable.height - scroll.height
scroll.y = (flickable.contentY / (flickable.contentHeight - flickable.height)) * t
}
MouseArea {
id: scrollArea
anchors.fill: parent
hoverEnabled: true
}
Rectangle {
id: scroll
width: 4
radius: width / 2
height: {
var t = (flickable.height * flickable.height) / flickable.contentHeight
return t < 50 ? 50 : t
}
y: 0; x: 0
color: MoneroComponents.Style.orange
opacity: flickable.moving || handleArea.pressed || scrollArea.containsMouse ? 0.8 : 0
visible: flickable.contentHeight > flickable.height
Behavior on opacity {
NumberAnimation { duration: 200; easing.type: Easing.InQuad }
}
MouseArea {
id: handleArea
anchors.fill: parent
drag.target: scroll
drag.axis: Drag.YAxis
drag.minimumY: 0
drag.maximumY: flickable.height - height
propagateComposedEvents: true
onPositionChanged: {
if(!pressed) return
var dy = scroll.y / (flickable.height - scroll.height)
flickable.contentY = (flickable.contentHeight - flickable.height) * dy
}
}
}
}

View File

@ -19,10 +19,8 @@ function setCustomWindowDecorations(custom) {
if (custom) {
appWindow.flags = flagsCustomDecorations;
daemonConsolePopup.flags = flagsCustomDecorations;
} else {
appWindow.flags = flags;
daemonConsolePopup.flags = flags;
}
// Reset window

View File

@ -2092,17 +2092,6 @@ ApplicationWindow {
console.log("walletMode: " + (mode === 0 ? "simple": mode === 1 ? "simple (bootstrap)" : "Advanced"));
}
// Daemon console
DaemonConsole {
id: daemonConsolePopup
height:500
width:800
title: qsTr("Daemon log") + translationManager.emptyString
onAccepted: {
close();
}
}
Rectangle {
id: inactiveOverlay
visible: blur.visible

View File

@ -26,7 +26,6 @@
<file>components/LineEdit.qml</file>
<file>components/TipItem.qml</file>
<file>images/tip.png</file>
<file>components/Scroll.qml</file>
<file>components/MenuButtonDivider.qml</file>
<file>images/moneroIcon.png</file>
<file>components/StandardDropdown.qml</file>
@ -103,7 +102,6 @@
<file>pages/Sign.qml</file>
<file>components/DaemonManagerDialog.qml</file>
<file>version.js</file>
<file>components/DaemonConsole.qml</file>
<file>components/QRCodeScanner.qml</file>
<file>components/Notifier.qml</file>
<file>components/TextBlock.qml</file>