Svg icons, dns ui fix
This commit is contained in:
parent
6d1c9edc24
commit
ac6000a2ae
30 changed files with 155 additions and 25 deletions
|
@ -8,10 +8,12 @@ BasicButtonType {
|
|||
background: Item {}
|
||||
contentItem: Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
source: root.icon.source
|
||||
SvgImageType {
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
svg.source: root.icon.source
|
||||
width: 25
|
||||
height: 25
|
||||
}
|
||||
Text {
|
||||
id: textItem
|
||||
|
|
16
client/ui/qml/Controls/SvgButtonType.qml
Normal file
16
client/ui/qml/Controls/SvgButtonType.qml
Normal file
|
@ -0,0 +1,16 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import "."
|
||||
|
||||
BasicButtonType {
|
||||
id: root
|
||||
icon.color: "#181922"
|
||||
|
||||
background: Item {}
|
||||
contentItem: SvgImageType {
|
||||
svg.source: icon.source
|
||||
color: icon.color
|
||||
anchors.fill: parent
|
||||
anchors.margins: parent.containsMouse ? 0 : 1
|
||||
}
|
||||
}
|
23
client/ui/qml/Controls/SvgImageType.qml
Normal file
23
client/ui/qml/Controls/SvgImageType.qml
Normal file
|
@ -0,0 +1,23 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtGraphicalEffects 1.15
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property color color: "#181922"
|
||||
property alias svg: image
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
id: image
|
||||
sourceSize: Qt.size(root.width, root.height)
|
||||
|
||||
antialiasing: true
|
||||
visible: false
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
anchors.fill: image
|
||||
source: image
|
||||
color: root.color
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue