HelpView: Rename to HelperWindow.

This commit is contained in:
Mentalflow 2024-04-05 02:02:42 +08:00
parent d71f5b963c
commit b2b3956dea
Signed by: Mentalflow
GPG Key ID: 5AE68D4401A2EE71
4 changed files with 27 additions and 26 deletions

2
3rdparty/RibbonUI vendored

@ -1 +1 @@
Subproject commit b48cbe6719f8ba98f61a1473811cb44a0f234a56
Subproject commit edeee77c443075ffb80a7e981a822718b47c2c7f

View File

@ -49,7 +49,7 @@ set(
qml/components/ZigBeeDataView.qml qml/components/TabBar.qml qml/components/CenterView.qml
qml/components/ListTable.qml qml/components/DeviceList.qml qml/components/KeysList.qml
qml/components/EventsHistoryList.qml qml/components/FrameChooser.qml qml/components/RibbonMarkDownViewer.qml
qml/components/HelpView.qml
qml/HelperWindow.qml
)
set(js_files js/markdown-it.js js/markdown-it-deflist.js js/markdown-it-emoji.js

View File

@ -5,26 +5,24 @@ import RibbonUI
import ProtocolParser
import "."
Item {
id:root
implicitHeight: 550
implicitWidth: 550
property string title: qsTr("帮助")
RibbonWindow {
id: root
height: 550
width: 550
title_bar.show_darkmode_btn: false
title_bar.show_style_switch: false
title: qsTr("帮助")
Component.onCompleted: Tools.writeDirtoTempDir(":/qt/qml/ProtocolParser/")
RibbonText{
anchors{
top:parent.top
topMargin: 10
horizontalCenter: parent.horizontalCenter
}
text: title
}
RibbonMarkDownViewer{
id: viewer
anchors.fill: parent
anchors.margins: 35
anchors{
topMargin: 10
leftMargin: anchors.topMargin
rightMargin: anchors.topMargin
bottomMargin: viewer.can_goback || viewer.can_goforward ? 30 : 10
}
file_name: 'qrc:/qt/qml/ProtocolParser/README.md'
base_url: 'qrc:/qt/qml/ProtocolParser/'
resource_dir: Tools.baseDir
@ -32,10 +30,11 @@ Item {
RibbonButton{
anchors{
bottom: root.bottom
bottomMargin: 10
left: root.left
leftMargin: 30
topMargin: 5
bottom: parent.bottom
bottomMargin: 5
left: parent.left
leftMargin: viewer.anchors.leftMargin
}
show_bg: false
show_hovered_bg: false
@ -48,10 +47,11 @@ Item {
RibbonButton{
anchors{
bottom: root.bottom
bottomMargin: 10
right: root.right
rightMargin: 30
topMargin: 5
bottom: parent.bottom
bottomMargin: 5
right: parent.right
rightMargin: viewer.anchors.rightMargin
}
show_bg: false
show_hovered_bg: false

View File

@ -12,6 +12,7 @@ RibbonWindow {
minimumWidth: 1200
height: 800
minimumHeight: 800
comfirmed_quit: true
title: qsTr("Protocol Parser") + ` V${PPAPP_Version}`
title_bar.right_content:RowLayout{
@ -27,7 +28,7 @@ RibbonWindow {
text_color: title_bar.title_text_color
text_color_reverse: false
onClicked: {
Window.window.popup.show_content("qrc:/qt/qml/ProtocolParser/components/HelpView.qml")
root.show_window("qrc:/qt/qml/ProtocolParser/HelperWindow.qml")
}
}
}