mirror of
https://github.com/stemoretti/BaseUI.git
synced 2025-07-18 21:14:25 -04:00
Heavy changes
This commit is contained in:
45
qml/PopupInfo.qml
Normal file
45
qml/PopupInfo.qml
Normal file
@ -0,0 +1,45 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
|
||||
Dialog {
|
||||
id: root
|
||||
|
||||
property alias text: popupLabel.text
|
||||
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
|
||||
modal: true
|
||||
dim: true
|
||||
|
||||
closePolicy: Popup.CloseOnEscape
|
||||
|
||||
contentItem: LabelSubheading {
|
||||
id: popupLabel
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
topPadding: 20
|
||||
leftPadding: 8
|
||||
rightPadding: 8
|
||||
color: Style.popupTextColor
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.WordWrap
|
||||
linkColor: Style.isDarkTheme ? "lightblue" : "blue"
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
}
|
||||
|
||||
footer: DialogButtonBox {
|
||||
alignment: Qt.AlignHCenter
|
||||
standardButtons: DialogButtonBox.Ok
|
||||
|
||||
onAccepted: root.close()
|
||||
|
||||
ButtonFlat {
|
||||
text: "OK"
|
||||
textColor: Style.accentColor
|
||||
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user