mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
commit
03f09865e8
2 changed files with 20 additions and 9 deletions
|
@ -29,13 +29,12 @@
|
||||||
|
|
||||||
import QtQml 2.0
|
import QtQml 2.0
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
// QtQuick.Controls 2.0 isn't stable enough yet. Needs more testing.
|
|
||||||
//import QtQuick.Controls 2.0
|
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import moneroComponents.Wallet 1.0
|
import moneroComponents.Wallet 1.0
|
||||||
|
|
||||||
|
import "components" as MoneroComponents
|
||||||
import "./pages"
|
import "./pages"
|
||||||
import "./pages/settings"
|
import "./pages/settings"
|
||||||
|
|
||||||
|
@ -184,12 +183,19 @@ Rectangle {
|
||||||
|
|
||||||
onFlickingChanged: {
|
onFlickingChanged: {
|
||||||
releaseFocus();
|
releaseFocus();
|
||||||
|
flickableScroll.flickableContentYChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disabled scrollbars, gives crash on startup on windows
|
MoneroComponents.Scroll {
|
||||||
// ScrollIndicator.vertical: ScrollIndicator { }
|
id: flickableScroll
|
||||||
// ScrollBar.vertical: ScrollBar { } // uncomment to test
|
parent: mainFlickable.parent
|
||||||
|
anchors.left: parent.right
|
||||||
|
anchors.leftMargin: 3
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
flickable: mainFlickable
|
||||||
|
scrollWidth: 6
|
||||||
|
}
|
||||||
// Views container
|
// Views container
|
||||||
StackView {
|
StackView {
|
||||||
id: stackView
|
id: stackView
|
||||||
|
|
|
@ -27,10 +27,14 @@
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import "." as MoneroComponents
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: scrollItem
|
id: scrollItem
|
||||||
property var flickable
|
property var flickable
|
||||||
|
property alias scrollColor: scroll.color
|
||||||
|
property alias scrollWidth: scroll.width
|
||||||
|
property alias scrollRadius: scroll.radius
|
||||||
width: 15
|
width: 15
|
||||||
z: 1
|
z: 1
|
||||||
|
|
||||||
|
@ -52,13 +56,14 @@ Item {
|
||||||
id: scroll
|
id: scroll
|
||||||
|
|
||||||
width: 4
|
width: 4
|
||||||
|
radius: width / 2
|
||||||
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 < 50 ? 50 : t
|
||||||
}
|
}
|
||||||
y: 0; x: 0
|
y: 0; x: 0
|
||||||
color: "#DBDBDB"
|
color: MoneroComponents.Style.orange
|
||||||
opacity: flickable.moving || handleArea.pressed || scrollArea.containsMouse ? 0.5 : 0
|
opacity: flickable.moving || handleArea.pressed || scrollArea.containsMouse ? 0.8 : 0
|
||||||
visible: flickable.contentHeight > flickable.height
|
visible: flickable.contentHeight > flickable.height
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
|
|
Loading…
Reference in a new issue