48 lines
1.1 KiB
QML
48 lines
1.1 KiB
QML
import QtQuick 2.7
|
|
|
|
import QtQuick.Controls 2.13
|
|
import QtQuick.Controls.Styles 1.4
|
|
import QtGraphicalEffects 1.12
|
|
import "." as Widgets
|
|
import "../theme"
|
|
|
|
|
|
// ButtonTextField integrates a text field and a button
|
|
TextField {
|
|
color: Theme.mainTextColor
|
|
font.pixelSize: 10 * gcd.themeScale
|
|
width: parent.width - 20
|
|
property string icon
|
|
property string button_text
|
|
signal clicked
|
|
smooth: true
|
|
|
|
background: Rectangle {
|
|
radius: 10
|
|
color: Theme.backgroundMainColor
|
|
border.color: Theme.backgroundMainColor
|
|
layer.enabled: true
|
|
layer.effect: DropShadow {
|
|
transparentBorder: true
|
|
horizontalOffset: 4
|
|
verticalOffset: 4
|
|
samples:10
|
|
color: Theme.dropShadowColor
|
|
}
|
|
}
|
|
|
|
Widgets.Button {
|
|
icon: ""
|
|
text: button_text
|
|
anchors { top: parent.top; right: parent.right }
|
|
override_radius: 10
|
|
height: parent.height; width: parent.height * 4
|
|
|
|
onClicked: {
|
|
parent.focus = true;
|
|
parent.clicked();
|
|
}
|
|
}
|
|
|
|
}
|