diff --git a/src/qml/ExitPromptDialog.qml b/src/qml/ExitPromptDialog.qml index 3ece396..f9d13f8 100644 --- a/src/qml/ExitPromptDialog.qml +++ b/src/qml/ExitPromptDialog.qml @@ -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() diff --git a/src/qml/Terminal.qml b/src/qml/Terminal.qml index 67c3412..d6e5d6a 100644 --- a/src/qml/Terminal.qml +++ b/src/qml/Terminal.qml @@ -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() } } diff --git a/src/qml/main.qml b/src/qml/main.qml index 790eb30..3a96403 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -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