New, rewamped Greet Screen.

This commit is contained in:
Adsooi 2024-04-02 22:49:56 +02:00
parent 665906ecb3
commit fefb0f92b0
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
14 changed files with 182 additions and 258 deletions

View file

@ -203,7 +203,7 @@
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Changelog.qml" line="99"/>
<source>Done</source>
<source>Close</source>
<translation>Schließen</translation>
</message>
</context>
@ -407,7 +407,7 @@ Diese Einstellungen können jederzeit über das Menü &quot;Einstellungen&quot;
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml" line="224"/>
<source>Done</source>
<source>Close</source>
<translation>Schließen</translation>
</message>
</context>
@ -709,7 +709,7 @@ Diese Einstellungen können jederzeit über das Menü &quot;Einstellungen&quot;
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Settings.qml" line="119"/>
<source>Done</source>
<source>Close</source>
<translation>Schließen</translation>
</message>
</context>

View file

@ -203,8 +203,8 @@
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Changelog.qml" line="99"/>
<source>Done</source>
<translation>Done</translation>
<source>Close</source>
<translation>Close</translation>
</message>
</context>
<context>
@ -407,8 +407,8 @@ These settings can be changed at any time from the &quot;Settings&quot; menu.</t
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml" line="224"/>
<source>Done</source>
<translation>Done</translation>
<source>Close</source>
<translation>Close</translation>
</message>
</context>
<context>
@ -709,8 +709,8 @@ These settings can be changed at any time from the &quot;Settings&quot; menu.</t
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Settings.qml" line="119"/>
<source>Done</source>
<translation>Done</translation>
<source>Close</source>
<translation>Close</translation>
</message>
</context>
<context>

View file

@ -203,7 +203,7 @@
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Changelog.qml" line="99"/>
<source>Done</source>
<source>Close</source>
<translation></translation>
</message>
</context>
@ -375,7 +375,7 @@ These settings can be changed at any time from the &quot;Settings&quot; menu.</s
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml" line="224"/>
<source>Done</source>
<source>Close</source>
<translation></translation>
</message>
</context>
@ -629,7 +629,7 @@ These settings can be changed at any time from the &quot;Settings&quot; menu.</s
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Settings.qml" line="119"/>
<source>Done</source>
<source>Close</source>
<translation></translation>
</message>
</context>

View file

@ -204,7 +204,7 @@
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Changelog.qml" line="99"/>
<source>Done</source>
<source>Close</source>
<translation>Fermer</translation>
</message>
</context>
@ -399,7 +399,7 @@ Ces paramètres peuvent être modifiés à tout moment à partir du menu &quot;P
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml" line="224"/>
<source>Done</source>
<source>Close</source>
<translation>Fermer</translation>
</message>
<message>
@ -717,7 +717,7 @@ These settings can always be changed at any time from the &quot;Settings&quot; m
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Settings.qml" line="119"/>
<source>Done</source>
<source>Close</source>
<translation>Fermer</translation>
</message>
</context>

View file

@ -203,7 +203,7 @@
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Changelog.qml" line="99"/>
<source>Done</source>
<source>Close</source>
<translation>Kész</translation>
</message>
</context>
@ -407,7 +407,7 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben.
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml" line="224"/>
<source>Done</source>
<source>Close</source>
<translation>Kész</translation>
</message>
</context>
@ -709,7 +709,7 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben.
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Settings.qml" line="119"/>
<source>Done</source>
<source>Close</source>
<translation>Kész</translation>
</message>
</context>

View file

@ -203,7 +203,7 @@
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Changelog.qml" line="99"/>
<source>Done</source>
<source>Close</source>
<translation></translation>
</message>
</context>
@ -407,7 +407,7 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen.</tr
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml" line="224"/>
<source>Done</source>
<source>Close</source>
<translation></translation>
</message>
</context>
@ -709,7 +709,7 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen.</tr
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Settings.qml" line="119"/>
<source>Done</source>
<source>Close</source>
<translation></translation>
</message>
</context>

View file

@ -203,7 +203,7 @@
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Changelog.qml" line="99"/>
<source>Done</source>
<source>Close</source>
<translation></translation>
</message>
</context>
@ -375,7 +375,7 @@ These settings can be changed at any time from the &quot;Settings&quot; menu.</s
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml" line="224"/>
<source>Done</source>
<source>Close</source>
<translation></translation>
</message>
</context>
@ -629,7 +629,7 @@ These settings can be changed at any time from the &quot;Settings&quot; menu.</s
</message>
<message>
<location filename="../qml/eu/ad5001/LogarithmPlotter/Popup/Settings.qml" line="119"/>
<source>Done</source>
<source>Close</source>
<translation></translation>
</message>
</context>

View file

@ -96,7 +96,7 @@ Popup {
Button {
id: doneBtn
text: qsTr("Done")
text: qsTr("Close")
font.pixelSize: 18
anchors.bottom: parent.bottom
anchors.bottomMargin: 7

View file

@ -18,6 +18,7 @@
import QtQuick
import QtQuick.Controls
import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting
/*!
\qmltype GreetScreen
@ -32,23 +33,16 @@ Popup {
id: greetingPopup
x: (parent.width-width)/2
y: Math.max(20, (parent.height-height)/2)
width: Math.max(welcome.width+70, checkForUpdatesSetting.width, resetRedoStackSetting.width)+20
width: greetingLayout.width+20
height: Math.min(parent.height-40, 700)
modal: true
focus: true
clip: true
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
ScrollView {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.bottomMargin: bottomButtons.height + 20
clip: true
Column {
width: greetingPopup.width - 25
id: greetingLayout
width: 600
spacing: 10
clip: true
topPadding: 35
@ -86,148 +80,75 @@ Popup {
font.italic: true
text: qsTr("Version %1").arg(Helper.getVersion())
}
}
Label {
id: helpText
Grid {
anchors.horizontalCenter: parent.horizontalCenter
wrapMode: Text.WordWrap
font.pixelSize: 14
width: parent.width - 50
text: qsTr("Take a few seconds to configure LogarithmPlotter.\nThese settings can be changed at any time from the \"Settings\" menu.")
}
CheckBox {
id: checkForUpdatesSetting
anchors.left: parent.left
checked: Helper.getSettingBool("check_for_updates")
text: qsTr('Check for updates on startup (requires online connectivity)')
onClicked: {
Helper.setSettingBool("check_for_updates", checked)
// Set in the menu bar
appMenu.settingsMenu.children[0].checked = checked
}
}
CheckBox {
id: resetRedoStackSetting
anchors.left: parent.left
checked: Helper.getSettingBool("reset_redo_stack")
text: qsTr('Reset redo stack when a new action is added to history')
onClicked: {
Helper.setSettingBool("reset_redo_stack", checked)
appMenu.settingsMenu.children[1].checked = checked
}
}
CheckBox {
id: enableLatexSetting
anchors.left: parent.left
checked: Helper.getSettingBool("enable_latex")
text: qsTr('Enable LaTeX rendering')
onClicked: {
Helper.setSettingBool("enable_latex", checked)
appMenu.settingsMenu.children[2].checked = checked
}
}
CheckBox {
id: autocloseFormulaSetting
anchors.left: parent.left
checked: Helper.getSettingBool("expression_editor.autoclose")
text: qsTr('Automatically close parenthesises and brackets in expressions')
onClicked: {
Helper.setSettingBool("expression_editor.autoclose", checked)
appMenu.settingsMenu.children[3].children[0].checked = checked
}
}
CheckBox {
id: colorizeFormulaSetting
anchors.left: parent.left
checked: Helper.getSettingBool("expression_editor.colorize")
text: qsTr('Enable syntax highlighting for expressions')
onClicked: {
Helper.setSettingBool("expression_editor.colorize", checked)
appMenu.settingsMenu.children[3].children[1].checked = checked
}
}
CheckBox {
id: autocompleteFormulaSetting
anchors.left: parent.left
checked: Helper.getSettingBool("autocompletion.enabled")
text: qsTr('Enable autocompletion interface in expression editor')
onClicked: {
Helper.setSettingBool("autocompletion.enabled", checked)
appMenu.settingsMenu.children[3].children[2].checked = checked
}
}
Row {
anchors.left: parent.left
anchors.leftMargin: 10
anchors.top: greetingLayout.bottom
anchors.topMargin: 50
columns: 2
spacing: 10
Label {
id: colorSchemeLabel
anchors.verticalCenter: parent.verticalCenter
wrapMode: Text.WordWrap
text: qsTr("Color scheme:")
}
Repeater {
model: [{
name: qsTr("Changelog"),
icon: 'common/new.svg',
onClicked: () => changelog.open()
},{
name: qsTr("Preferences"),
icon: 'common/settings.svg',
onClicked: () => preferences.open()
},{
name: qsTr("User manual"),
icon: 'common/manual.svg',
onClicked: () => Qt.openUrlExternally("https://git.ad5001.eu/Ad5001/LogarithmPlotter/wiki/_Sidebar")
},{
name: qsTr("Close"),
icon: 'common/close.svg',
onClicked: () => greetingPopup.close()
}]
ComboBox {
model: ["Breeze Light", "Breeze Dark", "Solarized", "Github Light", "Github Dark", "Nord", "Monokai"]
currentIndex: Helper.getSettingInt("expression_editor.color_scheme")
Button {
id: createBtn
width: 96
height: 96
onClicked: modelData.onClicked()
onActivated: function(index) {
Helper.setSettingInt("expression_editor.color_scheme", index)
Setting.Icon {
id: icon
width: 24
height: 24
anchors {
left: parent.left
leftMargin: (parent.width-width)/2
top: parent.top
topMargin: (label.y-height)/2
}
}
}
}
}
Rectangle {
id: bottomSeparator
opacity: 0.3
color: sysPalette.windowText
width: parent.width * 2 / 3
height: 1
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: bottomButtons.top
anchors.bottomMargin: 9
source: '../icons/' + modelData.icon
}
Row {
id: bottomButtons
anchors.bottom: parent.bottom
anchors.bottomMargin: 7
spacing: 10
anchors.horizontalCenter: parent.horizontalCenter
Button {
id: userManualBtn
text: qsTr("User manual")
font.pixelSize: 18
onClicked: Qt.openUrlExternally("https://git.ad5001.eu/Ad5001/LogarithmPlotter/wiki/_Sidebar")
Label {
id: label
anchors {
bottom: parent.bottom
bottomMargin: 5
left: parent.left
leftMargin: 4
right: parent.right
rightMargin: 4
}
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 14
text: modelData.name
wrapMode: Text.WordWrap
clip: true
}
Button {
id: changelogBtn
text: qsTr("Changelog")
font.pixelSize: 18
onClicked: changelog.open()
}
Button {
id: doneBtn
text: qsTr("Done")
font.pixelSize: 18
onClicked: greetingPopup.close()
}
}
Component.onCompleted: if(Helper.getSetting("last_install_greet") != Helper.getVersion()) {
Component.onCompleted: if(Helper.getSetting("last_install_greet") != Helper.getVersion()+1) {
greetingPopup.open()
}

View file

@ -115,7 +115,7 @@ Popup {
right: parent.right
bottom: parent.bottom
}
text: qsTr('Done')
text: qsTr('Close')
onClicked: preferencesPopup.close()
}
}
@ -183,5 +183,5 @@ Popup {
}
}
Component.onCompleted: open()
// Component.onCompleted: open()
}

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
version="1.1"
id="svg6"
sodipodi:docname="remove.svg"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs10" />
<sodipodi:namedview
id="namedview8"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="true"
inkscape:zoom="34.458333"
inkscape:cx="12"
inkscape:cy="10.505441"
inkscape:window-width="1920"
inkscape:window-height="1007"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg6">
<inkscape:grid
type="xygrid"
id="grid822" />
</sodipodi:namedview>
<path
id="rect2"
style="fill-rule:evenodd;stroke-width:3.16228"
transform="rotate(135)"
d="M -1.4142136,-26.870058 H 1.4142136 V -7.0710678 H -1.4142136 Z"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#000000;fill-rule:evenodd;stroke-width:3.16228"
d="M 20,6 6,20 4,18 18,4 Z"
id="path4"
sodipodi:nodetypes="ccccc" />
</svg>

After

(image error) Size: 1.4 KiB

View file

@ -0,0 +1 @@
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd"><path d="M14 0v10l2-1.518 2 1.518v-10h4v24h-17c-1.657 0-3-1.343-3-3v-18c0-1.657 1.343-3 3-3h9zm6 20h-14.505c-1.375 0-1.375 2 0 2h14.505v-2z"/></svg>

After

(image error) Size: 251 B

View file

@ -0,0 +1 @@
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd"><path d="M12 0l-2.138 2.63-3.068-1.441-.787 3.297-3.389.032.722 3.312-3.039 1.5 2.088 2.671-2.088 2.67 3.039 1.499-.722 3.312 3.389.033.787 3.296 3.068-1.441 2.138 2.63 2.139-2.63 3.068 1.441.786-3.296 3.39-.033-.722-3.312 3.038-1.499-2.087-2.67 2.087-2.671-3.038-1.5.722-3.312-3.39-.032-.786-3.297-3.068 1.441-2.139-2.63zm0 15.5c.69 0 1.25.56 1.25 1.25s-.56 1.25-1.25 1.25-1.25-.56-1.25-1.25.56-1.25 1.25-1.25zm1-1.038v-7.462h-2v7.462h2z"/></svg>

After

(image error) Size: 550 B

View file

@ -1,48 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
version="1.1"
id="svg6"
sodipodi:docname="remove.svg"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs10" />
<sodipodi:namedview
id="namedview8"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="true"
inkscape:zoom="34.458333"
inkscape:cx="12"
inkscape:cy="10.505441"
inkscape:window-width="1920"
inkscape:window-height="1007"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg6">
<inkscape:grid
type="xygrid"
id="grid822" />
</sodipodi:namedview>
<path
id="rect2"
style="fill-rule:evenodd;stroke-width:3.16228"
transform="rotate(135)"
d="M -1.4142136,-26.870058 H 1.4142136 V -7.0710678 H -1.4142136 Z"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#000000;fill-rule:evenodd;stroke-width:3.16228"
d="M 20,6 6,20 4,18 18,4 Z"
id="path4"
sodipodi:nodetypes="ccccc" />
</svg>

Before

(image error) Size: 1.4 KiB

After

(image error) Size: 19 B

View file

@ -0,0 +1 @@
../common/close.svg

Before

(image error) Size: 1.4 KiB

After

(image error) Size: 19 B