mirror of
https://github.com/QRouland/UTPass.git
synced 2025-06-29 16:52:29 +00:00
Various improvement :)
This commit is contained in:
34
qml/styles/CustomBorder.qml
Normal file
34
qml/styles/CustomBorder.qml
Normal file
@ -0,0 +1,34 @@
|
||||
// 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
|
||||
}
|
||||
}
|
10
qml/styles/Theme.qml
Normal file
10
qml/styles/Theme.qml
Normal file
@ -0,0 +1,10 @@
|
||||
pragma Singleton
|
||||
import QtQuick 2.4
|
||||
|
||||
Item {
|
||||
readonly property color claret : "#77172A"
|
||||
readonly property color raisin_black : "#AE2B25"
|
||||
readonly property color steel_blue : "#462C98"
|
||||
readonly property color twilight_lavender : "#754888"
|
||||
readonly property color eerie_black : "#191716"
|
||||
}
|
2
qml/styles/qmldir
Normal file
2
qml/styles/qmldir
Normal file
@ -0,0 +1,2 @@
|
||||
CustomBorder 1.0 CustomBorder.qml
|
||||
singleton Theme 1.0 Theme.qml
|
Reference in New Issue
Block a user