Http Version - Initial Commit
This commit is contained in:
commit
026ea97284
1 changed files with 978 additions and 0 deletions
55
ConnectButton.qml
Normal file
55
ConnectButton.qml
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
property color accent_color: "#00000000"
|
||||
property color font_color: "#00000000"
|
||||
property int font_enlarged_text_size: 20
|
||||
property int font_normal_text_size: 16
|
||||
property string text: "Connect"
|
||||
signal connect;
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
shadowEnabled: true
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
font.pointSize: root.font_enlarged_text_size
|
||||
color: root.font_color
|
||||
text: root.text
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
radius: 5
|
||||
border {
|
||||
color: root.accent_color
|
||||
width: 0.5
|
||||
}
|
||||
MouseArea {
|
||||
id: settings_button_area
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
property color settings_rect_pressed_prev: "#00000000"
|
||||
property color settings_rect_entered_prev: "#00000000"
|
||||
onEntered: {
|
||||
settings_rect_entered_prev = root.color
|
||||
root.color = "#5A1F1F1F"
|
||||
}
|
||||
onExited: {
|
||||
root.color = settings_rect_entered_prev
|
||||
}
|
||||
onPressed: {
|
||||
settings_rect_pressed_prev = root.color
|
||||
root.color = "#5A1F4F1F"
|
||||
root.connect();
|
||||
}
|
||||
onReleased: {
|
||||
root.color = settings_rect_pressed_prev
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue