mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-18 12:15:27 +00:00
Merge pull request #662 from Swordfish90/unstable
Migrate to QtQuick.Controls 2.x
This commit is contained in:
commit
205a152350
@ -79,6 +79,9 @@ int main(int argc, char *argv[])
|
||||
app.setWindowIcon(QIcon(":../icons/32x32/cool-retro-term.png"));
|
||||
#endif
|
||||
|
||||
app.setOrganizationName("cool-retro-term");
|
||||
app.setOrganizationDomain("cool-retro-term");
|
||||
|
||||
// Manage command line arguments from the cpp side
|
||||
QStringList args = app.arguments();
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Window 2.0
|
||||
|
||||
@ -86,9 +86,12 @@ Window{
|
||||
}
|
||||
Component{
|
||||
id: licenseComponent
|
||||
TextArea{
|
||||
ScrollView {
|
||||
anchors.fill: parent
|
||||
clip: true
|
||||
TextArea{
|
||||
readOnly: true
|
||||
wrapMode: TextEdit.Wrap
|
||||
text: "Copyright (c) 2013 Filippo Scognamiglio <flscogna@gmail.com>\n\n" +
|
||||
"https://github.com/Swordfish90/cool-retro-term\n\n" +
|
||||
|
||||
@ -106,4 +109,5 @@ Window{
|
||||
"along with this program. If not, see <http://www.gnu.org/licenses/>."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.0
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
import "utils.js" as Utils
|
||||
|
||||
@ -336,6 +336,7 @@ QtObject{
|
||||
|
||||
_margin = settings.margin !== undefined ? settings.margin : _margin;
|
||||
|
||||
|
||||
handleFontChanged();
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import "Components"
|
||||
@ -28,8 +28,8 @@ RowLayout {
|
||||
property alias name: check.text
|
||||
|
||||
property double value
|
||||
property alias min_value: slider.minimumValue
|
||||
property alias max_value: slider.maximumValue
|
||||
property alias min_value: slider.from
|
||||
property alias max_value: slider.to
|
||||
property alias stepSize: slider.stepSize
|
||||
|
||||
signal newValue(real newValue);
|
||||
@ -67,7 +67,6 @@ RowLayout {
|
||||
}
|
||||
}
|
||||
SizedLabel {
|
||||
Layout.fillHeight: true
|
||||
text: Math.round(((value - min_value) / (max_value - min_value)) * 100) + "%"
|
||||
}
|
||||
}
|
||||
|
@ -42,8 +42,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
radius: 10
|
||||
color: rootItem.color
|
||||
border.color: "black"
|
||||
Glossy {}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: parent.height * 0.25
|
||||
|
@ -20,16 +20,14 @@
|
||||
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.0
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.0
|
||||
|
||||
// This component is simply a label with a predefined size.
|
||||
// Used to improve alignment.
|
||||
|
||||
Item {
|
||||
property alias text: textfield.text
|
||||
width: appSettings.labelWidth
|
||||
Label{
|
||||
Label {
|
||||
id: textfield
|
||||
anchors { right: parent.right; verticalCenter: parent.verticalCenter }
|
||||
}
|
||||
Layout.minimumWidth: appSettings.labelWidth
|
||||
width: appSettings.labelWidth
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
import QtQuick 2.2
|
||||
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - parent.border.width
|
||||
height: parent.height - parent.border.width
|
||||
radius:parent.radius - parent.border.width/2
|
||||
smooth: true
|
||||
|
||||
border.width: parent.border.width/2
|
||||
border.color: "#22FFFFFF"
|
||||
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0; color: "#88FFFFFF" }
|
||||
GradientStop { position: .1; color: "#55FFFFFF" }
|
||||
GradientStop { position: .5; color: "#33FFFFFF" }
|
||||
GradientStop { position: .501; color: "#11000000" }
|
||||
GradientStop { position: .8; color: "#11FFFFFF" }
|
||||
GradientStop { position: 1; color: "#55FFFFFF" }
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Window 2.0
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
||||
|
@ -19,10 +19,11 @@
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
import QMLTermWidget 1.0
|
||||
|
||||
import "menus"
|
||||
import "utils.js" as Utils
|
||||
|
||||
Item{
|
||||
@ -156,31 +157,23 @@ Item{
|
||||
Component.onCompleted: {
|
||||
appSettings.terminalFontChanged.connect(handleFontChanged);
|
||||
appSettings.initializedSettings.connect(startSession);
|
||||
appSettings.handleFontChanged()
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: linuxContextMenu
|
||||
Menu{
|
||||
id: contextmenu
|
||||
MenuItem { action: copyAction }
|
||||
MenuItem { action: pasteAction }
|
||||
MenuSeparator { visible: !appSettings.showMenubar }
|
||||
MenuItem { action: showsettingsAction ; visible: !appSettings.showMenubar}
|
||||
MenuSeparator { visible: !appSettings.showMenubar }
|
||||
CRTMainMenuBar { visible: !appSettings.showMenubar }
|
||||
}
|
||||
id: shortContextMenu
|
||||
ShortContextMenu { }
|
||||
}
|
||||
|
||||
Component {
|
||||
id: osxContextMenu
|
||||
Menu{
|
||||
id: contextmenu
|
||||
MenuItem{action: copyAction}
|
||||
MenuItem{action: pasteAction}
|
||||
}
|
||||
id: fullContextMenu
|
||||
FullContextMenu { }
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: menuLoader
|
||||
sourceComponent: (Qt.platform.os === "osx" ? osxContextMenu : linuxContextMenu)
|
||||
sourceComponent: (Qt.platform.os === "osx" || appSettings.showMenubar ? shortContextMenu : fullContextMenu)
|
||||
}
|
||||
property alias contextmenu: menuLoader.item
|
||||
|
||||
|
@ -19,18 +19,17 @@
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQml 2.0
|
||||
|
||||
import "Components"
|
||||
|
||||
Tab{
|
||||
ColumnLayout{
|
||||
anchors.fill: parent
|
||||
|
||||
ColumnLayout{
|
||||
GroupBox{
|
||||
Layout.fillWidth: true
|
||||
title: qsTr("Command")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
CheckBox{
|
||||
@ -66,12 +65,12 @@ Tab{
|
||||
Layout.fillWidth: true
|
||||
GridLayout{
|
||||
anchors.fill: parent
|
||||
rows: 2
|
||||
columns: 3
|
||||
columns: 4
|
||||
|
||||
Label{text: qsTr("Effects FPS")}
|
||||
Slider{
|
||||
Layout.fillWidth: true
|
||||
Layout.columnSpan: 2
|
||||
id: fpsSlider
|
||||
onValueChanged: {
|
||||
if (enabled) {
|
||||
@ -81,58 +80,61 @@ Tab{
|
||||
stepSize: 1
|
||||
enabled: false
|
||||
Component.onCompleted: {
|
||||
minimumValue = 0;
|
||||
maximumValue = 60;
|
||||
from = 0;
|
||||
to = 60;
|
||||
value = appSettings.fps !== 0 ? appSettings.fps - 1 : 60;
|
||||
enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
SizedLabel{text: appSettings.fps !== 0 ? appSettings.fps : qsTr("Max")}
|
||||
Label{text: appSettings.fps !== 0 ? appSettings.fps : qsTr("Max")}
|
||||
Label{text: qsTr("Texture Quality")}
|
||||
Slider{
|
||||
Layout.fillWidth: true
|
||||
id: txtslider
|
||||
Layout.fillWidth: true
|
||||
Layout.columnSpan: 2
|
||||
onValueChanged: if (enabled) appSettings.windowScaling = value;
|
||||
stepSize: 0.05
|
||||
enabled: false
|
||||
Component.onCompleted: {
|
||||
minimumValue = 0.25 //Without this value gets set to 0.5
|
||||
from = 0.25 //Without this value gets set to 0.5
|
||||
value = appSettings.windowScaling;
|
||||
enabled = true;
|
||||
}
|
||||
}
|
||||
SizedLabel{text: Math.round(txtslider.value * 100) + "%"}
|
||||
Label{text: Math.round(txtslider.value * 100) + "%"}
|
||||
|
||||
Label{text: qsTr("Bloom Quality")}
|
||||
Slider{
|
||||
Layout.fillWidth: true
|
||||
Layout.columnSpan: 2
|
||||
id: bloomSlider
|
||||
onValueChanged: if (enabled) appSettings.bloomQuality = value;
|
||||
stepSize: 0.05
|
||||
enabled: false
|
||||
Component.onCompleted: {
|
||||
minimumValue = 0.25
|
||||
from = 0.25
|
||||
value = appSettings.bloomQuality;
|
||||
enabled = true;
|
||||
}
|
||||
}
|
||||
SizedLabel{text: Math.round(bloomSlider.value * 100) + "%"}
|
||||
Label{text: Math.round(bloomSlider.value * 100) + "%"}
|
||||
|
||||
Label{text: qsTr("BurnIn Quality")}
|
||||
Slider{
|
||||
Layout.fillWidth: true
|
||||
id: burnInSlider
|
||||
Layout.columnSpan: 2
|
||||
onValueChanged: if (enabled) appSettings.burnInQuality = value;
|
||||
stepSize: 0.05
|
||||
enabled: false
|
||||
Component.onCompleted: {
|
||||
minimumValue = 0.25
|
||||
from = 0.25
|
||||
value = appSettings.burnInQuality;
|
||||
enabled = true;
|
||||
}
|
||||
}
|
||||
SizedLabel{text: Math.round(burnInSlider.value * 100) + "%"}
|
||||
Label{text: Math.round(burnInSlider.value * 100) + "%"}
|
||||
CheckBox{
|
||||
Layout.columnSpan: 2
|
||||
text: qsTr("Burnin optimization (Might display timing artifacts)")
|
||||
@ -141,5 +143,4 @@ Tab{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,12 +19,10 @@
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
Tab{
|
||||
ColumnLayout{
|
||||
anchors.fill: parent
|
||||
ColumnLayout{
|
||||
spacing: 2
|
||||
|
||||
GroupBox{
|
||||
@ -87,5 +85,4 @@ Tab{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,32 +19,34 @@
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
||||
Tab{
|
||||
ColumnLayout{
|
||||
anchors.fill: parent
|
||||
ColumnLayout{
|
||||
GroupBox{
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
title: qsTr("Profile")
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
TableView {
|
||||
ListView {
|
||||
id: profilesView
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
model: appSettings.profilesList
|
||||
headerVisible: false
|
||||
TableViewColumn {
|
||||
title: qsTr("Profile")
|
||||
role: "text"
|
||||
width: parent.width * 0.5
|
||||
delegate: Rectangle {
|
||||
width: label.width
|
||||
height: label.height
|
||||
color: (index == profilesView.currentIndex) ? palette.highlight : palette.base
|
||||
Label {
|
||||
id: label
|
||||
text: appSettings.profilesList.get(index).text
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: profilesView.currentIndex = index
|
||||
onDoubleClicked: appSettings.loadProfile(index)
|
||||
}
|
||||
}
|
||||
onActivated: {
|
||||
appSettings.loadProfile(row);
|
||||
}
|
||||
}
|
||||
ColumnLayout {
|
||||
@ -60,11 +62,11 @@ Tab{
|
||||
}
|
||||
Button{
|
||||
Layout.fillWidth: true
|
||||
property alias currentIndex: profilesView.currentRow
|
||||
property alias currentIndex: profilesView.currentIndex
|
||||
enabled: currentIndex >= 0
|
||||
text: qsTr("Load")
|
||||
onClicked: {
|
||||
var index = profilesView.currentRow;
|
||||
var index = currentIndex;
|
||||
if (index >= 0)
|
||||
appSettings.loadProfile(index);
|
||||
}
|
||||
@ -72,7 +74,7 @@ Tab{
|
||||
Button{
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Remove")
|
||||
property alias currentIndex: profilesView.currentRow
|
||||
property alias currentIndex: profilesView.currentIndex
|
||||
|
||||
enabled: currentIndex >= 0 && !appSettings.profilesList.get(currentIndex).builtin
|
||||
onClicked: {
|
||||
@ -121,7 +123,7 @@ Tab{
|
||||
}
|
||||
}
|
||||
Button{
|
||||
property alias currentIndex: profilesView.currentRow
|
||||
property alias currentIndex: profilesView.currentIndex
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
@ -230,5 +232,4 @@ Tab{
|
||||
active = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,14 +19,13 @@
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.1
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQml 2.0
|
||||
|
||||
import "Components"
|
||||
|
||||
Tab{
|
||||
ColumnLayout{
|
||||
anchors.fill: parent
|
||||
ColumnLayout{
|
||||
|
||||
GroupBox{
|
||||
title: qsTr("Font")
|
||||
@ -52,6 +51,7 @@ Tab{
|
||||
id: fontChanger
|
||||
Layout.fillWidth: true
|
||||
model: appSettings.fontlist
|
||||
textRole: "text"
|
||||
onActivated: {
|
||||
var name = appSettings.fontlist.get(index).name;
|
||||
appSettings.fontNames[appSettings.rasterization] = name;
|
||||
@ -75,19 +75,11 @@ Tab{
|
||||
Slider{
|
||||
Layout.fillWidth: true
|
||||
id: fontScalingChanger
|
||||
onValueChanged: if(enabled) appSettings.fontScaling = value
|
||||
onValueChanged: appSettings.fontScaling = value
|
||||
value: appSettings.fontScaling
|
||||
stepSize: 0.05
|
||||
enabled: false // Another trick to fix initial bad behavior.
|
||||
Component.onCompleted: {
|
||||
minimumValue = appSettings.minimumFontScaling;
|
||||
maximumValue = appSettings.maximumFontScaling;
|
||||
value = appSettings.fontScaling;
|
||||
enabled = true;
|
||||
}
|
||||
Connections{
|
||||
target: appSettings
|
||||
onFontScalingChanged: fontScalingChanger.value = appSettings.fontScaling;
|
||||
}
|
||||
from: appSettings.minimumFontScaling;
|
||||
to: appSettings.maximumFontScaling;
|
||||
}
|
||||
SizedLabel{
|
||||
text: Math.round(fontScalingChanger.value * 100) + "%"
|
||||
@ -102,11 +94,8 @@ Tab{
|
||||
onValueChanged: appSettings.fontWidth = value;
|
||||
value: appSettings.fontWidth
|
||||
stepSize: 0.05
|
||||
Component.onCompleted: {
|
||||
// This is needed to avoid unnecessary chnaged events.
|
||||
minimumValue = 0.5;
|
||||
maximumValue = 1.5;
|
||||
}
|
||||
from: 0.5
|
||||
to: 1.5
|
||||
}
|
||||
SizedLabel{
|
||||
text: Math.round(widthChanger.value * 100) + "%"
|
||||
@ -170,5 +159,4 @@ Tab{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,46 +19,50 @@
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.1
|
||||
import QtQuick.Window 2.1
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
||||
Window {
|
||||
id: settings_window
|
||||
title: qsTr("Settings")
|
||||
width: 580
|
||||
height: 400
|
||||
width: 800
|
||||
height: 600
|
||||
|
||||
property int tabmargins: 15
|
||||
|
||||
TabView{
|
||||
id: tabView
|
||||
anchors.fill: parent
|
||||
anchors.margins: 10
|
||||
SettingsGeneralTab {
|
||||
id: generalTab
|
||||
title: qsTr("General")
|
||||
anchors.fill: parent
|
||||
anchors.margins: tabmargins
|
||||
TabBar {
|
||||
id: bar
|
||||
width: parent.width
|
||||
TabButton {
|
||||
text: qsTr("General")
|
||||
}
|
||||
SettingsTerminalTab {
|
||||
id: terminalTab
|
||||
title: qsTr("Terminal")
|
||||
anchors.fill: parent
|
||||
anchors.margins: tabmargins
|
||||
TabButton {
|
||||
text: qsTr("Terminal")
|
||||
}
|
||||
SettingsEffectsTab {
|
||||
id: effectsTab
|
||||
title: qsTr("Effects")
|
||||
anchors.fill: parent
|
||||
anchors.margins: tabmargins
|
||||
TabButton {
|
||||
text: qsTr("Effects")
|
||||
}
|
||||
SettingsAdvancedTab {
|
||||
id: performanceTab
|
||||
title: qsTr("Advanced")
|
||||
anchors.fill: parent
|
||||
anchors.margins: tabmargins
|
||||
TabButton {
|
||||
text: qsTr("Advanced")
|
||||
}
|
||||
}
|
||||
|
||||
StackLayout {
|
||||
anchors {
|
||||
top: bar.bottom
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
margins: tabmargins
|
||||
}
|
||||
|
||||
currentIndex: bar.currentIndex
|
||||
|
||||
SettingsGeneralTab { }
|
||||
SettingsTerminalTab { }
|
||||
SettingsEffectsTab { }
|
||||
SettingsAdvancedTab { }
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import "Components"
|
||||
@ -27,8 +27,8 @@ import "Components"
|
||||
RowLayout {
|
||||
property alias value: slider.value
|
||||
property alias stepSize: slider.stepSize
|
||||
property alias minimumValue: slider.minimumValue
|
||||
property alias maximumValue: slider.maximumValue
|
||||
property alias minimumValue: slider.from
|
||||
property alias maximumValue: slider.to
|
||||
property real maxMultiplier: 100
|
||||
|
||||
id: setting_component
|
||||
|
@ -20,8 +20,9 @@
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Window 2.1
|
||||
import QtQuick.Controls 1.1
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import "menus"
|
||||
|
||||
ApplicationWindow{
|
||||
id: terminalWindow
|
||||
@ -37,8 +38,6 @@ ApplicationWindow{
|
||||
|
||||
// Load saved window geometry and show the window
|
||||
Component.onCompleted: {
|
||||
appSettings.handleFontChanged();
|
||||
|
||||
x = appSettings.x
|
||||
y = appSettings.y
|
||||
width = appSettings.width
|
||||
@ -55,11 +54,9 @@ ApplicationWindow{
|
||||
property bool fullscreen: appSettings.fullscreen
|
||||
onFullscreenChanged: visibility = (fullscreen ? Window.FullScreen : Window.Windowed)
|
||||
|
||||
//Workaround: Without __contentItem a ugly thin border is visible.
|
||||
menuBar: CRTMainMenuBar{
|
||||
menuBar: WindowMenu {
|
||||
id: mainMenu
|
||||
visible: (Qt.platform.os === "osx" || appSettings.showMenubar)
|
||||
__contentItem.visible: mainMenu.visible
|
||||
}
|
||||
|
||||
property string wintitle: appSettings.wintitle
|
||||
@ -136,7 +133,6 @@ ApplicationWindow{
|
||||
}
|
||||
TerminalContainer{
|
||||
id: terminalContainer
|
||||
y: appSettings.showMenubar ? 0 : -2 // Workaroud to hide the margin in the menubar.
|
||||
width: parent.width
|
||||
height: (parent.height + Math.abs(y))
|
||||
}
|
||||
|
72
app/qml/menus/FullContextMenu.qml
Normal file
72
app/qml/menus/FullContextMenu.qml
Normal file
@ -0,0 +1,72 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2013-2021 "Filippo Scognamiglio"
|
||||
* https://github.com/Swordfish90/cool-retro-term
|
||||
*
|
||||
* This file is part of cool-retro-term.
|
||||
*
|
||||
* cool-retro-term is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
Menu{
|
||||
id: contextmenu
|
||||
MenuItem { action: copyAction }
|
||||
MenuItem { action: pasteAction }
|
||||
MenuItem { action: showsettingsAction }
|
||||
|
||||
MenuSeparator { }
|
||||
|
||||
Menu {
|
||||
title: qsTr("File")
|
||||
MenuItem {
|
||||
action: quitAction
|
||||
}
|
||||
}
|
||||
Menu {
|
||||
title: qsTr("Edit")
|
||||
MenuItem {action: copyAction}
|
||||
MenuItem {action: pasteAction}
|
||||
MenuSeparator { }
|
||||
MenuItem {action: showsettingsAction}
|
||||
}
|
||||
Menu{
|
||||
title: qsTr("View")
|
||||
MenuItem {action: fullscreenAction; visible: fullscreenAction.enabled}
|
||||
MenuItem {action: showMenubarAction; visible: showMenubarAction.enabled}
|
||||
MenuItem {action: zoomIn}
|
||||
MenuItem {action: zoomOut}
|
||||
}
|
||||
Menu{
|
||||
id: profilesMenu
|
||||
title: qsTr("Profiles")
|
||||
Instantiator{
|
||||
model: appSettings.profilesList
|
||||
delegate: MenuItem {
|
||||
text: model.text
|
||||
onTriggered: {
|
||||
appSettings.loadProfileString(obj_string);
|
||||
appSettings.handleFontChanged();
|
||||
}
|
||||
}
|
||||
onObjectAdded: profilesMenu.insertItem(index, object)
|
||||
onObjectRemoved: profilesMenu.removeItem(object)
|
||||
}
|
||||
}
|
||||
Menu{
|
||||
title: qsTr("Help")
|
||||
MenuItem {action: showAboutAction}
|
||||
}
|
||||
}
|
28
app/qml/menus/ShortContextMenu.qml
Normal file
28
app/qml/menus/ShortContextMenu.qml
Normal file
@ -0,0 +1,28 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2013-2021 "Filippo Scognamiglio"
|
||||
* https://github.com/Swordfish90/cool-retro-term
|
||||
*
|
||||
* This file is part of cool-retro-term.
|
||||
*
|
||||
* cool-retro-term is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
Menu{
|
||||
id: contextmenu
|
||||
MenuItem { action: copyAction }
|
||||
MenuItem { action: pasteAction }
|
||||
}
|
@ -1,35 +1,51 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2013-2021 "Filippo Scognamiglio"
|
||||
* https://github.com/Swordfish90/cool-retro-term
|
||||
*
|
||||
* This file is part of cool-retro-term.
|
||||
*
|
||||
* cool-retro-term is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*******************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
MenuBar {
|
||||
id: defaultMenuBar
|
||||
property bool visible: true
|
||||
visible: appSettings.showMenubar
|
||||
|
||||
Menu {
|
||||
title: qsTr("File")
|
||||
visible: defaultMenuBar.visible
|
||||
MenuItem {action: quitAction}
|
||||
}
|
||||
Menu {
|
||||
title: qsTr("Edit")
|
||||
visible: defaultMenuBar.visible && appSettings.showMenubar
|
||||
MenuItem {action: copyAction}
|
||||
MenuItem {action: pasteAction}
|
||||
MenuSeparator{visible: Qt.platform.os !== "osx"}
|
||||
MenuSeparator { }
|
||||
MenuItem {action: showsettingsAction}
|
||||
}
|
||||
Menu{
|
||||
title: qsTr("View")
|
||||
visible: defaultMenuBar.visible
|
||||
MenuItem {action: fullscreenAction; visible: fullscreenAction.enabled}
|
||||
MenuItem {action: showMenubarAction; visible: showMenubarAction.enabled}
|
||||
MenuSeparator{visible: showMenubarAction.enabled}
|
||||
MenuItem {action: zoomIn}
|
||||
MenuItem {action: zoomOut}
|
||||
}
|
||||
Menu{
|
||||
id: profilesMenu
|
||||
title: qsTr("Profiles")
|
||||
visible: defaultMenuBar.visible
|
||||
Instantiator{
|
||||
model: appSettings.profilesList
|
||||
delegate: MenuItem {
|
||||
@ -45,7 +61,6 @@ MenuBar {
|
||||
}
|
||||
Menu{
|
||||
title: qsTr("Help")
|
||||
visible: defaultMenuBar.visible
|
||||
MenuItem {action: showAboutAction}
|
||||
}
|
||||
}
|
@ -12,7 +12,6 @@
|
||||
<file>TimeManager.qml</file>
|
||||
<file>SimpleSlider.qml</file>
|
||||
<file>ColorButton.qml</file>
|
||||
<file>Glossy.qml</file>
|
||||
<file>AboutDialog.qml</file>
|
||||
<file>InsertNameDialog.qml</file>
|
||||
<file>SettingsEffectsTab.qml</file>
|
||||
@ -22,7 +21,6 @@
|
||||
<file>fonts/1977-apple2/PrintChar21.ttf</file>
|
||||
<file>fonts/1971-ibm-3278/3270Medium.ttf</file>
|
||||
<file>Storage.qml</file>
|
||||
<file>CRTMainMenuBar.qml</file>
|
||||
<file>SettingsAdvancedTab.qml</file>
|
||||
<file>TerminalContainer.qml</file>
|
||||
<file>images/crt256.png</file>
|
||||
@ -44,5 +42,8 @@
|
||||
<file>fonts/modern-terminus/TerminusTTF-4.46.0.ttf</file>
|
||||
<file>NewTerminalFrame.qml</file>
|
||||
<file>SlowBurnIn.qml</file>
|
||||
<file>menus/WindowMenu.qml</file>
|
||||
<file>menus/FullContextMenu.qml</file>
|
||||
<file>menus/ShortContextMenu.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 59f967d5e1f6e9ce8e1632d9405422b071d93d30
|
||||
Subproject commit 5c47d1f49455394226e0e595f79c148f0c098006
|
Loading…
x
Reference in New Issue
Block a user