mirror of
https://github.com/monero-project/monero-gui
synced 2025-03-26 04:22:43 +01:00
This commit is contained in:
parent
43c7920233
commit
d69870717f
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 3.1.2, 2014-07-22T17:23:59. -->
|
<!-- Written by QtCreator 3.1.2, 2014-07-23T12:38:50. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
@ -179,22 +179,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rectangle {
|
|
||||||
// anchors.left: parent.left
|
|
||||||
// anchors.bottom: parent.bottom
|
|
||||||
// height: 3; width: 3
|
|
||||||
// color: "#FFFFFF"
|
|
||||||
// visible: datePicker.expanded
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Rectangle {
|
|
||||||
// anchors.right: parent.right
|
|
||||||
// anchors.bottom: parent.bottom
|
|
||||||
// height: 3; width: 3
|
|
||||||
// color: "#FFFFFF"
|
|
||||||
// visible: datePicker.expanded
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@ -223,20 +207,6 @@ Item {
|
|||||||
height: 1
|
height: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rectangle {
|
|
||||||
// anchors.left: parent.left
|
|
||||||
// anchors.top: parent.top
|
|
||||||
// height: 3; width: 3
|
|
||||||
// color: "#FFFFFF"
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Rectangle {
|
|
||||||
// anchors.right: parent.right
|
|
||||||
// anchors.top: parent.top
|
|
||||||
// height: 3; width: 3
|
|
||||||
// color: "#FFFFFF"
|
|
||||||
// }
|
|
||||||
|
|
||||||
Calendar {
|
Calendar {
|
||||||
id: calendar
|
id: calendar
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -1,29 +1,56 @@
|
|||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
|
||||||
Rectangle {
|
Item {
|
||||||
|
id: scrollItem
|
||||||
property var flickable
|
property var flickable
|
||||||
property int yPos: 0
|
width: 15
|
||||||
|
z: 1
|
||||||
|
|
||||||
function flickableContentYChanged() {
|
function flickableContentYChanged() {
|
||||||
if(flickable === undefined)
|
if(flickable === undefined)
|
||||||
return
|
return
|
||||||
|
|
||||||
var t = flickable.height - height
|
var t = flickable.height - scroll.height
|
||||||
y = (flickable.contentY / (flickable.contentHeight - flickable.height)) * t + yPos
|
scroll.y = (flickable.contentY / (flickable.contentHeight - flickable.height)) * t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: scrollArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: scroll
|
||||||
|
|
||||||
width: 15
|
width: 15
|
||||||
height: {
|
height: {
|
||||||
var t = (flickable.height * flickable.height) / flickable.contentHeight
|
var t = (flickable.height * flickable.height) / flickable.contentHeight
|
||||||
return t < 20 ? 20 : t
|
return t < 20 ? 20 : t
|
||||||
}
|
}
|
||||||
z: 1; y: yPos
|
y: 0; x: 0
|
||||||
color: "#DBDBDB"
|
color: "#DBDBDB"
|
||||||
anchors.right: flickable.right
|
opacity: flickable.moving || handleArea.pressed || scrollArea.containsMouse ? 0.5 : 0
|
||||||
opacity: flickable.moving ? 0.5 : 0
|
|
||||||
visible: flickable.contentHeight > flickable.height
|
visible: flickable.contentHeight > flickable.height
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
NumberAnimation { duration: 100; 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
BIN
images/resize.png
Normal file
BIN
images/resize.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 245 B |
BIN
images/resizeHovered.png
Normal file
BIN
images/resizeHovered.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 233 B |
84
main.qml
84
main.qml
@ -86,7 +86,6 @@ ApplicationWindow {
|
|||||||
height: 800
|
height: 800
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
flags: Qt.FramelessWindowHint | Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint
|
flags: Qt.FramelessWindowHint | Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint
|
||||||
onVisibilityChanged: visible = visibility !== Window.Minimized
|
|
||||||
onWidthChanged: x -= 0
|
onWidthChanged: x -= 0
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
@ -263,6 +262,46 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property int maxWidth: leftPanel.width + 655 + rightPanel.width
|
property int maxWidth: leftPanel.width + 655 + rightPanel.width
|
||||||
|
property int maxHeight: 700
|
||||||
|
MouseArea {
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
height: 48
|
||||||
|
width: 48
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: parent.containsMouse || parent.pressed ? "#4A4949" : "transparent"
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
source: parent.containsMouse || parent.pressed ? "images/resizeHovered.png" :
|
||||||
|
"images/resize.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
property int previousX: 0
|
||||||
|
property int previousY: 0
|
||||||
|
onPressed: {
|
||||||
|
previousX = mouseX
|
||||||
|
previousY = mouseY
|
||||||
|
}
|
||||||
|
|
||||||
|
onPositionChanged: {
|
||||||
|
if(!pressed) return
|
||||||
|
var dx = previousX - mouseX
|
||||||
|
var dy = previousY - mouseY
|
||||||
|
|
||||||
|
if(appWindow.width - dx > parent.maxWidth)
|
||||||
|
appWindow.width -= dx
|
||||||
|
else appWindow.width = parent.maxWidth
|
||||||
|
|
||||||
|
if(appWindow.height - dy > parent.maxHeight)
|
||||||
|
appWindow.height -= dy
|
||||||
|
else appWindow.height = parent.maxHeight
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// MouseArea {
|
// MouseArea {
|
||||||
// anchors.top: parent.top
|
// anchors.top: parent.top
|
||||||
@ -280,49 +319,6 @@ ApplicationWindow {
|
|||||||
// appWindow.width -= diff
|
// appWindow.width -= diff
|
||||||
// else appWindow.width = parent.maxWidth
|
// else appWindow.width = parent.maxWidth
|
||||||
// }
|
// }
|
||||||
// }
|
|
||||||
|
|
||||||
// MouseArea {
|
|
||||||
// anchors.left: parent.left
|
|
||||||
// anchors.top: parent.top
|
|
||||||
// anchors.bottom: parent.bottom
|
|
||||||
// anchors.topMargin: 30
|
|
||||||
// anchors.bottomMargin: 3
|
|
||||||
// cursorShape: Qt.SizeHorCursor
|
|
||||||
// width: 3
|
|
||||||
// property int previousX: 0
|
|
||||||
// property int maximumX: 0
|
|
||||||
// onPressed: {
|
|
||||||
// var diff = appWindow.width - parent.maxWidth
|
|
||||||
// maximumX = appWindow.x + diff
|
|
||||||
// previousX = mouseX
|
|
||||||
// }
|
|
||||||
// onPositionChanged: {
|
|
||||||
// var diff = previousX - mouseX
|
|
||||||
// if(appWindow.x + diff < maximumX) {
|
|
||||||
// appWindow.width += diff
|
|
||||||
// appWindow.x -= diff
|
|
||||||
// } else {
|
|
||||||
// appWindow.width = parent.maxWidth
|
|
||||||
// appWindow.x = maximumX
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// MouseArea {
|
|
||||||
// anchors.left: parent.left
|
|
||||||
// anchors.right: parent.right
|
|
||||||
// anchors.bottom: parent.bottom
|
|
||||||
// anchors.leftMargin: 3
|
|
||||||
// anchors.rightMargin: 3
|
|
||||||
// height: 3
|
|
||||||
// cursorShape: Qt.SizeVerCursor
|
|
||||||
// property int previousY: 0
|
|
||||||
// onPressed: previousY = mouseY
|
|
||||||
// onPositionChanged: {
|
|
||||||
// var diff = previousY - mouseY
|
|
||||||
// appWindow.height -= diff
|
|
||||||
// }
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
TitleBar {
|
TitleBar {
|
||||||
|
@ -178,9 +178,11 @@ Rectangle {
|
|||||||
|
|
||||||
Scroll {
|
Scroll {
|
||||||
id: flickableScroll
|
id: flickableScroll
|
||||||
|
anchors.right: table.right
|
||||||
anchors.rightMargin: -14
|
anchors.rightMargin: -14
|
||||||
|
anchors.top: table.top
|
||||||
|
anchors.bottom: table.bottom
|
||||||
flickable: table
|
flickable: table
|
||||||
yPos: table.y
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddressBookTable {
|
AddressBookTable {
|
||||||
|
@ -130,9 +130,11 @@ Rectangle {
|
|||||||
|
|
||||||
Scroll {
|
Scroll {
|
||||||
id: flickableScroll
|
id: flickableScroll
|
||||||
|
anchors.right: table.right
|
||||||
anchors.rightMargin: -14
|
anchors.rightMargin: -14
|
||||||
|
anchors.top: table.top
|
||||||
|
anchors.bottom: table.bottom
|
||||||
flickable: table
|
flickable: table
|
||||||
yPos: table.y
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DashboardTable {
|
DashboardTable {
|
||||||
|
@ -319,9 +319,11 @@ Rectangle {
|
|||||||
|
|
||||||
Scroll {
|
Scroll {
|
||||||
id: flickableScroll
|
id: flickableScroll
|
||||||
|
anchors.right: table.right
|
||||||
anchors.rightMargin: -14
|
anchors.rightMargin: -14
|
||||||
|
anchors.top: table.top
|
||||||
|
anchors.bottom: table.bottom
|
||||||
flickable: table
|
flickable: table
|
||||||
yPos: table.y
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HistoryTable {
|
HistoryTable {
|
||||||
|
2
qml.qrc
2
qml.qrc
@ -78,5 +78,7 @@
|
|||||||
<file>images/moneroLogo2.png</file>
|
<file>images/moneroLogo2.png</file>
|
||||||
<file>components/PrivacyLevelSmall.qml</file>
|
<file>components/PrivacyLevelSmall.qml</file>
|
||||||
<file>images/checkedVioletIcon.png</file>
|
<file>images/checkedVioletIcon.png</file>
|
||||||
|
<file>images/resize.png</file>
|
||||||
|
<file>images/resizeHovered.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -75,9 +75,11 @@ Item {
|
|||||||
|
|
||||||
Scroll {
|
Scroll {
|
||||||
id: flickableScroll
|
id: flickableScroll
|
||||||
|
anchors.right: listView.right
|
||||||
anchors.rightMargin: -14
|
anchors.rightMargin: -14
|
||||||
|
anchors.top: listView.top
|
||||||
|
anchors.bottom: listView.bottom
|
||||||
flickable: listView
|
flickable: listView
|
||||||
yPos: listView.y
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user