RibbonPopupDialog: Redesign.
This commit is contained in:
parent
b5d873b23e
commit
c1f025c4d4
|
@ -12,6 +12,7 @@ RibbonPopup {
|
||||||
property string negativeText: "Negative"
|
property string negativeText: "Negative"
|
||||||
property string positiveText: "Positive"
|
property string positiveText: "Positive"
|
||||||
property bool dark_mode: RibbonTheme.dark_mode
|
property bool dark_mode: RibbonTheme.dark_mode
|
||||||
|
property int content_margins: 20
|
||||||
show_close_btn: false
|
show_close_btn: false
|
||||||
radius: 5
|
radius: 5
|
||||||
signal neutralClicked
|
signal neutralClicked
|
||||||
|
@ -19,7 +20,7 @@ RibbonPopup {
|
||||||
signal positiveClicked
|
signal positiveClicked
|
||||||
property int buttonFlags: RibbonPopupDialogType.NegativeButton | RibbonPopupDialogType.PositiveButton
|
property int buttonFlags: RibbonPopupDialogType.NegativeButton | RibbonPopupDialogType.PositiveButton
|
||||||
focus: true
|
focus: true
|
||||||
implicitWidth: 250
|
implicitWidth: 300
|
||||||
implicitHeight: text_title.height + text_message.height + layout_actions.height + layout_actions.anchors.topMargin + layout_actions.anchors.bottomMargin
|
implicitHeight: text_title.height + text_message.height + layout_actions.height + layout_actions.anchors.topMargin + layout_actions.anchors.bottomMargin
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id:layout_content
|
id:layout_content
|
||||||
|
@ -31,11 +32,13 @@ RibbonPopup {
|
||||||
font.pixelSize: 24
|
font.pixelSize: 24
|
||||||
text:title
|
text:title
|
||||||
view_only: true
|
view_only: true
|
||||||
topPadding: 15
|
topPadding: content_margins * 3 / 4
|
||||||
leftPadding: 15
|
leftPadding: content_margins
|
||||||
rightPadding: 15
|
rightPadding: content_margins
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
horizontalAlignment: Text.AlignHCenter
|
color: RibbonTheme.modern_style ?
|
||||||
|
dark_mode ? '#8AAAEB' : '#2C59B7' :
|
||||||
|
dark_mode ? "white" : "black"
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
anchors{
|
anchors{
|
||||||
top:parent.top
|
top:parent.top
|
||||||
|
@ -47,33 +50,48 @@ RibbonPopup {
|
||||||
id:text_message
|
id:text_message
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
text:message
|
text:message
|
||||||
view_only: true
|
view_only: true
|
||||||
topPadding: 15
|
topPadding: content_margins * 3 / 4
|
||||||
leftPadding: 15
|
leftPadding: content_margins
|
||||||
rightPadding: 15
|
rightPadding: content_margins
|
||||||
bottomPadding: 15
|
bottomPadding: content_margins * 3 / 4
|
||||||
anchors{
|
anchors{
|
||||||
top:text_title.bottom
|
top:text_title.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Rectangle{
|
||||||
|
anchors{
|
||||||
|
top: text_message.bottom
|
||||||
|
topMargin: text_message.anchors.bottomMargin
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
height: 1
|
||||||
|
width: parent.width - 4
|
||||||
|
color: control.dark_mode ? "#666666" : "#D1D1D1"
|
||||||
|
Behavior on color {
|
||||||
|
ColorAnimation {
|
||||||
|
duration: 60
|
||||||
|
easing.type: Easing.OutSine
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
RowLayout{
|
RowLayout{
|
||||||
id:layout_actions
|
id:layout_actions
|
||||||
anchors{
|
anchors{
|
||||||
topMargin: 15
|
topMargin: content_margins * 3 / 4
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: 15
|
leftMargin: content_margins
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: 15
|
rightMargin: content_margins
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
bottomMargin: 15
|
bottomMargin: content_margins * 3 / 4
|
||||||
}
|
}
|
||||||
height: 30
|
height: 30
|
||||||
spacing: 15
|
spacing: content_margins
|
||||||
RibbonButton{
|
RibbonButton{
|
||||||
id:negative_btn
|
id:negative_btn
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
Loading…
Reference in New Issue