Merge remote-tracking branch 'upstream/main'

pull/17/head
titenko 4 years ago
commit 2c296a5920

@ -4,185 +4,108 @@ import QtQuick.Window 2.12
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import FishUI 1.0 as FishUI import FishUI 1.0 as FishUI
FishUI.Window { Window {
id: control id: control
title: qsTr("Settings")
width: 400 width: 400
height: 400 height: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 4
maximumHeight: 400 maximumHeight: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 4
maximumWidth: 400 maximumWidth: 400
minimumWidth: 400 minimumWidth: 400
minimumHeight: 400 minimumHeight: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 4
flags: Qt.Dialog
modality: Qt.WindowModal
visible: false visible: false
ColumnLayout { Rectangle {
id: _mainLayout
anchors.fill: parent anchors.fill: parent
anchors.leftMargin: FishUI.Units.largeSpacing color: FishUI.Theme.secondBackgroundColor
anchors.rightMargin: FishUI.Units.largeSpacing }
spacing: FishUI.Units.largeSpacing
Item {
Layout.fillWidth: true
Layout.preferredHeight: 45
Rectangle {
anchors.fill: parent
color: FishUI.Theme.secondBackgroundColor
radius: FishUI.Theme.smallRadius
}
RowLayout {
anchors.fill: parent
anchors.leftMargin: FishUI.Units.largeSpacing
anchors.rightMargin: FishUI.Units.largeSpacing
Label {
text: qsTr("Font")
}
Item {
width: FishUI.Units.largeSpacing
}
ComboBox {
id: fontsCombobox
model: Fonts.families
Layout.fillHeight: true
Layout.fillWidth: true
onCurrentTextChanged: { GridLayout {
settings.fontName = currentText id: _mainLayout
} anchors.fill: parent
anchors.margins: FishUI.Units.largeSpacing
columns: 2
columnSpacing: FishUI.Units.largeSpacing * 2
rowSpacing: FishUI.Units.largeSpacing * 2
Component.onCompleted: { Label {
for (var i = 0; i <= fontsCombobox.model.length; ++i) { text: qsTr("Font")
if (fontsCombobox.model[i] === settings.fontName) {
fontsCombobox.currentIndex = i
break
}
}
}
}
}
} }
// Font size ComboBox {
Item { id: fontsCombobox
model: Fonts.families
// Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 45
Rectangle { onCurrentTextChanged: {
anchors.fill: parent settings.fontName = currentText
color: FishUI.Theme.secondBackgroundColor
radius: FishUI.Theme.smallRadius
} }
RowLayout { Component.onCompleted: {
anchors.fill: parent for (var i = 0; i <= fontsCombobox.model.length; ++i) {
anchors.leftMargin: FishUI.Units.largeSpacing if (fontsCombobox.model[i] === settings.fontName) {
anchors.rightMargin: FishUI.Units.largeSpacing fontsCombobox.currentIndex = i
break
Label {
text: qsTr("Font Size")
}
Item {
width: FishUI.Units.largeSpacing
}
Slider {
id: fontSizeSlider
Layout.fillHeight: true
Layout.fillWidth: true
from: 5
to: 30
stepSize: 1
Component.onCompleted: {
fontSizeSlider.value = settings.fontPointSize
} }
onValueChanged: settings.fontPointSize = fontSizeSlider.value
} }
} }
} }
Item { Label {
text: qsTr("Font Size")
}
Slider {
id: fontSizeSlider
Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 45 from: 5
to: 30
stepSize: 1
Rectangle { Component.onCompleted: {
anchors.fill: parent fontSizeSlider.value = settings.fontPointSize
color: FishUI.Theme.secondBackgroundColor
radius: FishUI.Theme.smallRadius
} }
RowLayout { onValueChanged: settings.fontPointSize = fontSizeSlider.value
anchors.fill: parent }
anchors.leftMargin: FishUI.Units.largeSpacing
anchors.rightMargin: FishUI.Units.largeSpacing
Label {
text: qsTr("Transparency")
}
Item {
width: FishUI.Units.largeSpacing
}
Slider {
id: transparencySlider
Layout.fillHeight: true
Layout.fillWidth: true
from: 0.1
to: 1.0
stepSize: 0.05
Component.onCompleted: {
transparencySlider.value = settings.opacity
}
onValueChanged: settings.opacity = transparencySlider.value Label {
} text: qsTr("Transparency")
}
} }
Item { Slider {
id: transparencySlider
Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 45 from: 0.1
to: 1.0
stepSize: 0.05
Rectangle { Component.onCompleted: {
anchors.fill: parent transparencySlider.value = settings.opacity
color: FishUI.Theme.secondBackgroundColor
radius: FishUI.Theme.smallRadius
} }
RowLayout { onValueChanged: settings.opacity = transparencySlider.value
anchors.fill: parent }
anchors.leftMargin: FishUI.Units.largeSpacing
anchors.rightMargin: FishUI.Units.smallSpacing
Label {
text: qsTr("Window Blur")
}
Item {
Layout.fillWidth: true
}
Switch { Label {
Layout.fillHeight: true text: qsTr("Window Blur")
checked: settings.blur
onCheckedChanged: settings.blur = checked
}
}
} }
Item { Switch {
Layout.alignment: Qt.AlignRight
Layout.fillHeight: true Layout.fillHeight: true
checked: settings.blur
onCheckedChanged: settings.blur = checked
} }
} }
} }

@ -22,22 +22,27 @@
<context> <context>
<name>SettingsDialog</name> <name>SettingsDialog</name>
<message> <message>
<location filename="../src/qml/SettingsDialog.qml" line="43"/> <location filename="../src/qml/SettingsDialog.qml" line="10"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SettingsDialog.qml" line="39"/>
<source>Font</source> <source>Font</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SettingsDialog.qml" line="89"/> <location filename="../src/qml/SettingsDialog.qml" line="63"/>
<source>Font Size</source> <source>Font Size</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SettingsDialog.qml" line="129"/> <location filename="../src/qml/SettingsDialog.qml" line="82"/>
<source>Transparency</source> <source>Transparency</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SettingsDialog.qml" line="169"/> <location filename="../src/qml/SettingsDialog.qml" line="101"/>
<source>Window Blur</source> <source>Window Blur</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="hu">
<context>
<name>ExitPromptDialog</name>
<message>
<location filename="../src/qml/ExitPromptDialog.qml" line="49"/>
<source>Process is running, are you sure you want to quit?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/ExitPromptDialog.qml" line="63"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/ExitPromptDialog.qml" line="57"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsDialog</name>
<message>
<location filename="../src/qml/SettingsDialog.qml" line="43"/>
<source>Font</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SettingsDialog.qml" line="89"/>
<source>Font Size</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SettingsDialog.qml" line="129"/>
<source>Transparency</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SettingsDialog.qml" line="169"/>
<source>Window Blur</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Terminal</name>
<message>
<location filename="../src/qml/Terminal.qml" line="177"/>
<source>Copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Terminal.qml" line="183"/>
<location filename="../src/qml/Terminal.qml" line="197"/>
<source>Paste</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Terminal.qml" line="203"/>
<source>Select All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Terminal.qml" line="208"/>
<source>Open File Manager</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Terminal.qml" line="213"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

@ -22,22 +22,27 @@
<context> <context>
<name>SettingsDialog</name> <name>SettingsDialog</name>
<message> <message>
<location filename="../src/qml/SettingsDialog.qml" line="43"/> <location filename="../src/qml/SettingsDialog.qml" line="10"/>
<source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../src/qml/SettingsDialog.qml" line="39"/>
<source>Font</source> <source>Font</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SettingsDialog.qml" line="89"/> <location filename="../src/qml/SettingsDialog.qml" line="63"/>
<source>Font Size</source> <source>Font Size</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SettingsDialog.qml" line="129"/> <location filename="../src/qml/SettingsDialog.qml" line="82"/>
<source>Transparency</source> <source>Transparency</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SettingsDialog.qml" line="169"/> <location filename="../src/qml/SettingsDialog.qml" line="101"/>
<source>Window Blur</source> <source>Window Blur</source>
<translation></translation> <translation></translation>
</message> </message>

Loading…
Cancel
Save