Adjust exit dialog margins

pull/2/head
reionwong 4 years ago
parent c539266ab2
commit 1b1fdd42c8

@ -28,8 +28,8 @@ Dialog {
modal: true
width: _mainLayout.childrenRect.width + FishUI.Units.largeSpacing * 4
height: _mainLayout.childrenRect.height + FishUI.Units.largeSpacing * 4
width: _mainLayout.implicitWidth + FishUI.Units.largeSpacing * 3
height: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 3
x: (parent.width - control.width) / 2
y: (parent.height - control.height) / 2
@ -39,8 +39,11 @@ Dialog {
ColumnLayout {
id: _mainLayout
anchors.fill: parent
anchors.leftMargin: FishUI.Units.largeSpacing
anchors.rightMargin: FishUI.Units.largeSpacing
spacing: FishUI.Units.largeSpacing
anchors.leftMargin: FishUI.Units.smallSpacing
anchors.rightMargin: FishUI.Units.smallSpacing
anchors.topMargin: FishUI.Units.smallSpacing
anchors.bottomMargin: FishUI.Units.smallSpacing
Label {
text: qsTr("Process is running, are you sure you want to quit?")
@ -59,6 +62,7 @@ Dialog {
Button {
text: qsTr("OK")
Layout.fillWidth: true
flat: true
onClicked: {
control.visible = false
control.okBtnClicked()

@ -54,13 +54,13 @@ Page {
if ((event.key === Qt.Key_C)
&& (event.modifiers & Qt.ControlModifier)
&& (event.modifiers & Qt.ShiftModifier)) {
copyAction.triggered()
_copyAction.trigger()
}
if ((event.key === Qt.Key_V)
&& (event.modifiers & Qt.ControlModifier)
&& (event.modifiers & Qt.ShiftModifier)) {
pasteAction.triggered()
_pasteAction.trigger()
}
if ((event.key === Qt.Key_Q)
@ -98,10 +98,6 @@ Page {
Keys.enabled: true
Keys.onPressed: control.keyPressed(event)
onUsesMouseChanged: {
console.log(_terminal.getUsesMouse)
}
session: QMLTermSession {
id: _session
onFinished: control.terminalClosed()
@ -158,19 +154,30 @@ Page {
}
}
Action {
id: _copyAction
text: qsTr("Copy")
onTriggered: _terminal.copyClipboard()
}
Action {
id: _pasteAction
text: qsTr("Paste")
onTriggered: _terminal.pasteClipboard()
}
FishUI.DesktopMenu {
id: terminalMenu
MenuItem {
id: copyAction
text: qsTr("Copy")
onTriggered: _terminal.copyClipboard()
id: copyMenuItem
action: _copyAction
}
MenuItem {
id: pasteAction
id: pasteMenuItem
text: qsTr("Paste")
onTriggered: _terminal.pasteClipboard()
action: _pasteAction
}
MenuItem {
@ -219,7 +226,7 @@ Page {
}
function updateMenu() {
pasteAction.visible = Utils.text()
copyAction.visible = _terminal.selectedText
copyMenuItem.visible = _terminal.selectedText
pasteMenuItem.visible = Utils.text()
}
}

@ -154,7 +154,6 @@ FishUI.Window {
}
FishUI.RoundImageButton {
size: 35
source: "qrc:/images/" + (FishUI.Theme.darkMode ? "dark/" : "light/") + "add.svg"
onClicked: root.openNewTab()
Layout.alignment: Qt.AlignTop

Loading…
Cancel
Save