1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-06-29 16:52:29 +00:00

Various improvement :)

This commit is contained in:
2019-03-15 17:53:40 +01:00
parent a017136f6a
commit bd2fa6922e
26 changed files with 393 additions and 85 deletions

View File

@ -1,34 +0,0 @@
// Author : Amit Tomar
// @ https://stackoverflow.com/questions/16534489/qml-control-border-width-and-color-on-any-one-side-of-rectangle-element#16562823
import QtQuick 2.4
Rectangle
{
property bool commonBorder : true
property int lBorderwidth : 1
property int rBorderwidth : 1
property int tBorderwidth : 1
property int bBorderwidth : 1
property int commonBorderWidth : 1
z : -1
property string borderColor : "white"
color: borderColor
anchors
{
left: parent.left
right: parent.right
top: parent.top
bottom: parent.bottom
topMargin : commonBorder ? -commonBorderWidth : -tBorderwidth
bottomMargin : commonBorder ? -commonBorderWidth : -bBorderwidth
leftMargin : commonBorder ? -commonBorderWidth : -lBorderwidth
rightMargin : commonBorder ? -commonBorderWidth : -rBorderwidth
}
}

View File

@ -1,9 +1,10 @@
import QtQuick 2.4
import Ubuntu.Components 1.3
import "../styles"
Component {
Rectangle {
width: page.width
width: parent.width
height: units.gu(5)
Text {
@ -19,7 +20,7 @@ Component {
width: units.gu(4)
height: units.gu(4)
name: fileIsDir ? "go-next" : "lock"
color: UbuntuColors.orange
color: Theme.raisin_black
}
MouseArea {

55
qml/components/Link.qml Normal file
View File

@ -0,0 +1,55 @@
import QtQuick 2.4
import Ubuntu.Components 1.3
import "../styles"
Item {
property string url
property string text
property bool commonBorder : true
property int lBorderwidth : 0
property int rBorderwidth : 0
property int tBorderwidth : 0
property int bBorderwidth : 0
property int commonBorderWidth : 0
property string borderColor : UbuntuColors.warmGrey
width: parent.width
height: units.gu(6)
Rectangle {
width: parent.width
height: parent.height
Text {
text: parent.parent.text
anchors.left: parent.left
anchors.leftMargin: units.gu(1)
anchors.verticalCenter: parent.verticalCenter
}
Icon {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
width: units.gu(4)
height: units.gu(4)
name: "go-next"
color: Theme.raisin_black
}
MouseArea {
anchors.fill: parent
onClicked: { Qt.openUrlExternally(parent.parent.url); }
}
CustomBorder {
id : cb
commonBorder: parent.parent.commonBorder
lBorderwidth: parent.parent.lBorderwidth
rBorderwidth: parent.parent.rBorderwidth
tBorderwidth: parent.parent.tBorderwidth
bBorderwidth: parent.parent.bBorderwidth
borderColor: parent.parent.borderColor
}
}
}

2
qml/components/qmldir Normal file
View File

@ -0,0 +1,2 @@
FileDir 1.0 FileDir.qml
Link 1.0 Link.qml